SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2013 v18 beta => Topic started by: levyossi on June 06, 2013, 02:57:13 AM

Title: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: levyossi on June 06, 2013, 02:57:13 AM
Hello,

I'm running the Mac version, beta 6.  While I definitely see some improvements comparing to SlickEdit 2011 (first native mac version) that I bought, I also noticed that the editor get "stuck" very often -- sometimes for 20-30 seconds, but more often indefinitely, requiring me to force-quit the application (basically kill the process).  It seems to be consistent with disk access that is done while saving and/or switching tabs.  I have 8Gb of memory on my machine, and the same project runs on SlickEdit 2011 much more smoothly.  Please note that I already disabled the background tagging, and that project is not huge (less than 100 files, takes less than 20 seconds to retag the whole project).

I do have many applications open on my laptop; this is the way I work, which is why I have 8Gb of memory, which is enough for most editors, including SlickEdit 2011.  Does SlickEdit 2013 requires significantly more memory (which may cause it to access the swap file on disk more often)? In any case, it can explain some slow response, but these repetitive hangs where I have to kill the process (and lose the whole state, like tabs positions, list of open files, etc.) start happening more and more often, to the point that I had to switch back to SlickEdit 2011 to get some progress.

Please advise.

Thanks,
Yossi
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: Dennis on June 06, 2013, 02:56:00 PM
Next time it happens, could you do the following so we can track down where it is hanging up?

1) Start the Activity Monitor
2) Go to the CPU tab
3) Click on the "vs" (SlickEdit) process
4) Click on "Inspect", then "Sample"
5) Then post the sample or send it me me via PM.

A few other questions:

What programming language are you working in?
Which tool windows do you have open?
Are all your files local?
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: levyossi on June 06, 2013, 05:50:28 PM
Hi Dennis,

I'll do the sampling next time it happens and post it.  In the meantime, let me address your questions:

A few other questions:

>> What programming language are you working in?

C/C++ (+ Makefiles and some shell scripts).  In the last couple of days when I tested VS2013, though, I was mostly working with Makefiles (the project has many other C/C++ files, but most of them were not open).

>> Which tool windows do you have open?

Not sure what do you mean by "tool windows"; do you mean in VS, or windows of other applications that I have open? 
If the former, then I have very few: Build, Open, Output, Projects, References, Search Result and Symbols.  Note that Build, Output and Search Result are all in the same window, and so are Projects, Open and Symbols, so I really only have 3 windows opened + the main editor screen (with one open tab, out of total of 3 or 4 files that are open in other tabs).

If you meant all windows of other applications, then it's a longer list, so let me know if you need it.


>> Are all your files local?

Yes
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: Dennis on June 06, 2013, 06:05:12 PM
A few things come to mind:

1) If you are adding the Makefiles to your project, SlickEdit might be trying to be smart and parse the makefile for targets.  Try setting def_show_makefile_target_menu to 0 (Macro > Set Macro Variable...)

2) Try closing the Symbols tool window if you do not use it frequently.  It can be slow to update under certain situations if you have something like "Global Functions" expanded.
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: levyossi on June 06, 2013, 06:46:16 PM
A few things come to mind:

1) If you are adding the Makefiles to your project, SlickEdit might be trying to be smart and parse the makefile for targets.  Try setting def_show_makefile_target_menu to 0 (Macro > Set Macro Variable...)

2) Try closing the Symbols tool window if you do not use it frequently.  It can be slow to update under certain situations if you have something like "Global Functions" expanded.


I've done #2.  As for #1, I'll do that, but I forgot to mention before that my project type is "Other", i.e. I do not have any compilation/build rules defined.  The reason is that I'm only using SlickEdit for editing locally on my machine, while the building has to be done on a remote server, so there is no point in having SlickEdit build any smart Makefiles for me.  Indeed, in project properties, all the commands for Compile/Build etc. are empty (under Tools), and under Build System I have the option of "Build with user maintained makefile or custom build command" checked and nothing in the Makefile box.  So I doubt #1 is relevant in my case, but I don't mind trying that.

Thanks,
Yossi
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: levyossi on June 07, 2013, 02:49:33 PM
Hi Dennis,

Since I implemented your suggestions it happened less often, even though I still got 5-10 seconds delay sometime when switching tabs.  However, this morning it happened again that it got stuck indefinitely (well, I waited 20 minutes).  Interestingly, the SlickEdit process was consistently consuming 0% CPU time (maybe it is waiting for another process and was put to sleep by the OS?)  In any case, I took a sample; please see attached.

Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: Dennis on June 11, 2013, 06:54:20 PM
The data makes it appear that the editor is waiting for a key press.

What emulation are you running in?

Do you remember what you had done just prior to getting stuck?

Did you try right clicking on SlickEdit in the Dock and selecting "Show All Windows" to make sure you did not have a modal dialog waiting for input?

Did you try hitting Escape to get out?
Title: Re: Beta 6, Mac: Possible bug: repetitive hangs while switching tabs and/or editing
Post by: levyossi on June 11, 2013, 07:32:25 PM
I'm running the CUA emulation.
It happens at random times when I switch windows, or even when I just scroll down or try to follow a symbol (i.e. go to declaration/definition).

The only thing that I noticed is that it happens much more frequently when the CPU is busy with other stuff, like when I'm on a video conference in a Skype call (this is very common when I need to look at the code while in a video conference).  From a quick look at the stack dump, it looks like some thread is waiting on a conditional variable.  Could it be that when the CPU gets really busy some thread gets preempted and you are getting into a deadlock?

I did try to hit escape and many other keys and it didn't help.  I can try to look at the list of windows that are open next time it happens to confirm that there is no modal dialog waiting for input, but it happened in so many different situations that should not involve any modal being opened that I doubt that this is the issue.  It really looks like something that is timing related (I don't know how many threads SlickEdit uses so I'm really just guessing based on the behavior that I'm seeing and a quick look on the stack dump).

Yossi