Author Topic: Slick jumps to the first line  (Read 3481 times)

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Slick jumps to the first line
« on: October 01, 2017, 06:10:11 AM »
Using beta 3, windows 10.
Don't know if this will be reproducible for anyone else but with the attached text file as the current buffer, go to line 1000 or something, then close slick (save config when prompted, slick always asks me that, I have to figure out why sometime), then open slick.  Slick shows the file at the correct line for about one second, then it jumps to line one for no obvious reason.

If I have the text file (file f1) at line 1000, then switch to some other file (f2), close slick, re-open, it comes up at the correct place for file f2, then I switch to file f1, the current line goes straight to line one.  It goes wrong every single time, even if I don't save my configuration.  I've been making changes to my xretrace macro but the problem happens even with xretrace disabled.  I guess I could have messed up my slick state file somehow though.  I saved a copy of my entire config folder if anyone wants it.


Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Slick jumps to the first line
« Reply #1 on: October 01, 2017, 10:10:02 AM »
I can't repro this problem with RC2 and a new configuration folder but I have a copy of the old config folder if you want it.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Slick jumps to the first line
« Reply #2 on: October 01, 2017, 02:50:17 PM »
If you upload your config, I'll take a look. The sub-folder config data isn't needed which will save a ton of space.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Slick jumps to the first line
« Reply #3 on: October 01, 2017, 08:01:34 PM »
I put it here, let me know if you can't get it

« Last Edit: October 09, 2017, 11:41:38 AM by Graeme »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Slick jumps to the first line
« Reply #4 on: October 02, 2017, 12:43:51 AM »
I wasn't able to reproduce this with your config.

The way to trace which of your macros is causing SlickEdit to always prompt to save the config on exit is to uncomment out the lines in the function _config_modify_flags() in main.e. That's what we do here. The Slick-C stack dump makes it obvious. You can copy/paste the Slick-C stack dump lines from the say window into the Slick-C Stack tool window and then double click to go to a stack entry item. Also, the command "st -f 1234" (macro file names and code offsets are displayed in the stack) will compile the current buffer Slick-C macro and stop at the offset specified. We do this when a customer shows us a screen shot of a Slick-C stack dump and we can't copy/paste the lines.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Slick jumps to the first line
« Reply #5 on: October 02, 2017, 10:30:19 AM »
I can reproduce the "jump to the first line" thing with my 21.0.3 configuration as well as with beta3.

The first time I tried the stackdump I got two of them, one from a image file I had with no leading underscore.  I fixed that then I still got two which I don't understand.  I closed both of my own custom toolwindows in case they were causing it but I still got two stackdumps on every restart.  Using RC2.
Is there anything else I can do?

Code: [Select]
_config_modify_flags: CONFIGURATION MODIFICATION FLAGS CHANGED!
 Slick-C STACK TRACE ******************************
 Created on 10/2/2017 at 23:4:13 (130 ms)
 SlickEdit Pro Version 22.0.0.5 Copyright 1988-2017 SlickEdit Inc.
 Edit module and type "st -f <offset>" to get the
 run-time error position

main.ex 1965 _config_modify_flags(256,-1)   p_window_id: 5   p_object: OI_FORM   p_name:
main.ex 19885 _set_emulation_key_bindings(0,0)   p_window_id: 5   p_object: OI_FORM   p_name:
main.ex 19626 _plugin_eventtab_apply_all_bindings()   p_window_id: 5   p_object: OI_FORM   p_name:
main.ex 7039 _firstinit()   p_window_id: 5   p_object: OI_FORM   p_name:
_config_modify_flags: CONFIGURATION MODIFICATION FLAGS CHANGED!
 Slick-C STACK TRACE ******************************
 Created on 10/2/2017 at 23:4:13 (787 ms)
 SlickEdit Pro Version 22.0.0.5 Copyright 1988-2017 SlickEdit Inc.
 Edit module and type "st -f <offset>" to get the
 run-time error position

main.ex 1965 _config_modify_flags(48,-1)   p_window_id: 35   p_object: OI_FORM   p_name: _tbfilelist_form
stdprocs.ex 14714 _update_picture(31054,bbsave.svg@24,0)   p_window_id: 35   p_object: OI_FORM   p_name: _tbfilelist_form
picture.ex 5973 resizeToolButton(360)   p_window_id: 35   p_object: OI_FORM   p_name: _tbfilelist_form
tbfilelist.ex 4397 _tbfilelist_form.on_resize(1)   p_window_id: 35   p_object: OI_FORM   p_name: _tbfilelist_form
tbfilelist.ex 2608 tbfilelist:forceFilterList(1)   p_window_id: 39   p_object: OI_TEXT_BOX   p_name: ctl_filter
tbfilelist.ex 5538 tbfilelist:showOpenFiles()   p_window_id: 43   p_object: OI_TREE_VIEW   p_name: ctl_file_list
tbfilelist.ex 3814 _tbfilelist_form.ctl_file_list.on_create(0,0,26)   p_window_id: 43   p_object: OI_TREE_VIEW   p_name: ctl_file_list
toolwindow.ex 11793 _on_create_tool_window(0)   p_window_id: 35   p_object: OI_FORM   p_name: _tbfilelist_form
mainwindow.ex 880 mainwindow:autorestore_layout(r,63 1 45 13 4 N 0,APP_LAYOUT,0)   p_window_id: 12   p_object: OI_EDITOR   p_name:
mainwindow.ex 2812 _sr_app_layout(r,63 1 45 13 4 N 0,1,<empty>)   p_window_id: 5   p_object: OI_FORM   p_name:
restore.ex 2174 restore:restore2(,<empty>,1,1,0)   p_window_id: 5   p_object: OI_FORM   p_name:
restore.ex 865 restore:_restore(I,0,<empty>,0)   p_window_id: 5   p_object: OI_FORM   p_name:
restore.ex 188 restore(I,0,<empty>,0)   p_window_id: 5   p_object: OI_FORM   p_name:

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Slick jumps to the first line
« Reply #6 on: October 02, 2017, 01:43:38 PM »
Top stack looks ok but the second one looks like a bug. We will look into this.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Slick jumps to the first line
« Reply #7 on: October 02, 2017, 11:07:10 PM »
The problem with the configuration always being modified has been fixed in the next build as well as it can be for now.

There's still a problem where images are dynamically loaded either because the image hasn't been loaded yet or you changed an image size option. Once the image is loaded, it won't be loaded again (that was the bug fix). For example, when the Files tool window is first displayed, some images are loaded. After that, displaying the Files tool window won't modify the state file. Hope that makes sense. In the future, we may come up with a better way to handle supporting a ton of different icon sizes so no images are loaded even the first time the Files tool window (or a similar dialog) is displayed.

I'm using the same prompt before saving the config option that you are.

UPDATE: Dennis made some modifications to prevent some of the tool windows/dialogs from needing to update the state file. I've tested the Files tool window and it doesn't seem to need to update any images since they've all been pre-added to the state file.
« Last Edit: October 03, 2017, 01:24:21 AM by Clark »