SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2016 v21 Beta Discussion => Topic started by: jporkkahtc on September 02, 2016, 08:05:53 PM

Title: Fun corner case in Options -> App Colors.
Post by: jporkkahtc on September 02, 2016, 08:05:53 PM
Right click in the SampleCode box.


You can set breakpoints :-)
And code annotations (though, the annotations get set on whatever buffer most recently had focus.




Bookmarks work better here -- then when you goto the bookmark it opens buffer with the same code in it!
(Bookmarks work in the beautifier settings too - cool).


Oops - after closing Options, trying to delete the bookmarks:

---------------------------
Slick-C Error
---------------------------


file=bookmark.ex offset=13799
---------------------------
OK   
---------------------------

stack[2016-09-02T13:01:38Z] Slick-C STACK TRACE ******************************
stack[2016-09-02T13:01:38Z] Created on 9/2/2016 at 13:1:38 (805 ms)
stack[2016-09-02T13:01:38Z] SlickEdit Pro Version 21.0.0.5 Copyright 1988-2016 SlickEdit Inc.
stack[2016-09-02T13:01:38Z] Edit module and type "st -f <offset>" to get the
stack[2016-09-02T13:01:38Z] run-time error position
stack[2016-09-02T13:01:38Z]
stack[2016-09-02T13:01:38Z] error code=-3009
stack[2016-09-02T13:01:38Z] Invalid number argument
stack[2016-09-02T13:01:38Z]

Then Slick crashes and is terminated by Windows :-(
(I can upload a minidump if you need it).
Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 02, 2016, 09:56:18 PM
I tried to reproduce this but no luck. Minidump won't be useful since this is really a Slick-C bug.

I added a bookmark by using the context menu "Toggle Bookmark". Then I displayed the bookmarks tool window and deleted it but nothing happened. I tried some other things too.

Can you post steps to reproduce this?
Title: Re: Fun corner case in Options -> App Colors.
Post by: jporkkahtc on September 02, 2016, 10:38:20 PM
The minidump was for the access violation crash, not the slick stack.

Repro:
Open a CPP File.
Document-> C/C++ Options.
Select the bookmarks tool window (my is docked on the bottom of slick main window).
In Options click Tools > Options > Languages > Application Languages > C/C++ > Formatting
Right click in the CodePreview.
Select ToggleBookmark


In the bookmarks toolwindow a new bookmark shows up "Something::getStorage():15"
Dismiss options.
Double-click on the bookmark -- nothing happens.
RightClick->Delete that bookmark.
SlickC error and Slick Stack appear.

Dismiss the error and now Slick crashes and is terminated by Windows.


When I start slick again, my workspace and buffers get restored, but no buffer windows are restored. The tool windows show up the way they ought to.


When I try to add a bookmark on an <Untitled> buffer, it failed "buffer has no name"

Same stack and crash doing Alt+F2 to toggle bookmark in RegExEvaluator tool and calculator.

Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 02, 2016, 10:49:02 PM
The toggle_bookmark command should be disabled here.

I think the new_annotations command should be disabled here too.

I managed to get a crash after a Slick-C stack but I don't know what the trick was. I was deleting a bookmark for an untitled buffer that I closed but not the one that was in the options dialog. I don't know if was related or not. It could just have to do with bookmarks in untitled files.
Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 02, 2016, 10:55:56 PM
Crash has nothing to do with setting a bookmark in the options dialog. I getting close to reproducible steps.
Title: Re: Fun corner case in Options -> App Colors.
Post by: jporkkahtc on September 02, 2016, 10:57:35 PM
Weird - since for me it clearly is related to deleting the bookmark - since it happens with options, RegEx and Calculator.
Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 02, 2016, 11:34:08 PM
Setting a bookmark in an Untitled buffer causes a similar problem to what you're seeing.

I've fixed the crash. The crash is a down stream error handling problem due to setting a bookmark in an Untitled buffer, closing it, then deleting the bookmark. There's a little other hocus pocus needed to get the crash but not much.
Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 02, 2016, 11:40:41 PM
Weird - since for me it clearly is related to deleting the bookmark - since it happens with options, RegEx and Calculator.

Since toggle_bookmark will be disabled for these scenarios, I probably won't bother looking into it further. I think the problem here has to be with certain callbacks not being called to notify the bookmark handling.
Title: Re: Fun corner case in Options -> App Colors.
Post by: jporkkahtc on September 14, 2016, 05:58:21 PM
RC1: Toggle bookmarks (Ctrl+f2) still works in options, calculator and regex.
It doesn't crash anymore though.

Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 14, 2016, 08:31:51 PM
RC1: Toggle bookmarks (Ctrl+f2) still works in options, calculator and regex.
It doesn't crash anymore though.

RC1: toggle-bookmark doesn't set a bookmark for me in the calculator or regex. I ran with your config too.
Title: Re: Fun corner case in Options -> App Colors.
Post by: jporkkahtc on September 14, 2016, 08:44:02 PM
Oops, I meant Alt+f2 -- Set-bookmark

Title: Re: Fun corner case in Options -> App Colors.
Post by: Clark on September 14, 2016, 08:52:33 PM
Ah...That one can be hot fixed if necessary.