Author Topic: Opening workspace kills Slickedit  (Read 16855 times)

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Opening workspace kills Slickedit
« on: January 13, 2008, 07:23:53 PM »
I'm using Slickedit 10.0.3 on Windows. I have a project on a network drive. I start Slickedit, create a new workspace on a local drive, then add the network project to the workspace. I wait for it to build the tag file. Everything acts fine. I can close Slickedit and re-start it, and the project opens. HOWEVER, if I close the workspace, and try to re-open it, Slickedit hangs forever. If I close the workspace and then exit Slickedit, then re-start Slickedit and try to open the workspace, it hangs. If I edit the vrestore.slk and put the workspace back in, so it opens the workspace on program start, I can start slickedit and it will open the project without hanging.

I used filemon to find out what happens when slickedit fails. The last thing I see is vs.exe trying to open j2sdk1.4.2, and not finding it. I don't know if that means anything, since when I start slickedit and it opens the workspace automatically, it never tries to look for j2sdk.

Does anyone have any ideas where slickedit is getting hung up?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Opening workspace kills Slickedit
« Reply #1 on: January 17, 2008, 10:18:49 AM »
I'm using Slickedit 10.0.3 on Windows. I have a project on a network drive. I start Slickedit, create a new workspace on a local drive, then add the network project to the workspace. I wait for it to build the tag file. Everything acts fine. I can close Slickedit and re-start it, and the project opens. HOWEVER, if I close the workspace, and try to re-open it, Slickedit hangs forever. If I close the workspace and then exit Slickedit, then re-start Slickedit and try to open the workspace, it hangs. If I edit the vrestore.slk and put the workspace back in, so it opens the workspace on program start, I can start slickedit and it will open the project without hanging.

I used filemon to find out what happens when slickedit fails. The last thing I see is vs.exe trying to open j2sdk1.4.2, and not finding it. I don't know if that means anything, since when I start slickedit and it opens the workspace automatically, it never tries to look for j2sdk.

Does anyone have any ideas where slickedit is getting hung up?

So in other words, the only way you can get that workspace open is to either never close it or to edit/replace vrestore.slk before starting slickedit.

One possibility is to press Ctrl Alt Shift F2 when slickedit is hung (look up "emulation tables" in the help and see the "macros" keys or search for "infinite" in the help  - as in "infinite loops" - to see what the key combination is for the emulation you're using)  - slickedit might get out of wherever it's hung up and let you see what code it's trying to execute when it hangs.

I guess you've tried to think of easy ways to get the workspace to open other than editing vrestore.slk every time.  One possibility (that might not be useful) is the -sr invocation switch that allows you to specify the location of the auto-restore information  - see invocation options in the help. 

BTW, my system also still uses j2sdk.1.4.2 for some reason.  Is the project a Java project?

Have you thought of moving the project to your local drive to see if the non-local project file is part of the problem?  Do you have any other "network" projects that don't have this problem?  If so, maybe you could investigate why just this one workspace/project has a problem.

Graeme
« Last Edit: January 17, 2008, 10:26:20 AM by Graeme »

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: Opening workspace kills Slickedit
« Reply #2 on: February 14, 2008, 05:47:08 PM »
> So in other words, the only way you can get that workspace open is to either never close it or to edit/replace vrestore.slk before starting slickedit.

Yes, exactly.

> One possibility is to press Ctrl Alt Shift F2 when slickedit is hung

No response. It's really hung.

> Is the project a Java project?

No, it's a C-project. The fact that it's looking for j2sdk might be a hint to one of the Slickedit developers, since it doesn't look for it when it opens the project on invocation (which works)

> Have you thought of moving the project to your local drive

I can't, because all of the source (lots & lots) is on the network drive, and there's no way to tell a project to look for the files in another path (a HIGHLY RECOMMENDED feature for the next version!)

This problem is a major pain, because there are times where I want to use Slickedit when I'm not connected to this network resource. In that case, I need to edit vrestore.slk and REMOVE the workspace - if I open slickedit with the workspace in place, it will hang because it can't get to the project. Hang? What ever happened to displaying a warning that the file can't be opened?

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Opening workspace kills Slickedit
« Reply #3 on: February 19, 2008, 07:43:38 PM »
I'm not sure why it would be looking for Java in a C project. I don't see it looking for that as part of a normal startup. Very strange.

I'm not sure why you say "there's no way to tell a project to look for the files in another path". SlickEdit makes no assumptions about the location of source files relative to your project files. Some IDEs require that they be in the same tree, but we don't. We always recommend that both the workspace and project files be stored locally, even when the source files can't be.

Create the workspace/project and save it to a local directory. After creating the project, select Project > Project Properties, select the Files tab, and then click the "Add Tree" or "Add Files" button. In both cases you should be able to navigate to your network drive and add files from that location.


Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: Opening workspace kills Slickedit
« Reply #4 on: February 27, 2008, 08:55:49 PM »
Well, I used FileMon to watch SlickEdit as it loads, then as I opened the project. I can send these results. I was hoping that the Java open would give a clue to a developer. I think it's odd that if the project is loaded during SlickEdit startup, it opens fine. If I open the project after SlickEdit is loaded, it fails. If there is any other data I can compile to help solve the problem, let me know.

What I meant by not being able to tell a project to look for files in another path, I'm talking about the tag file (see http://community.slickedit.com/index.php?topic=1976.0). Here's my situation:

While I'm at the office, I have local access to the  source files, and I can easily create a tagfile (which is HUGE). If I'm going to work on the road, I don't want to load that huge tagfile over a slow network. So, I want to have the tagfile on my local drive, and have it there when I connect to the network (I've tried, it's not pretty). Since the tagfile only stores "relative" paths, I have to have the PROJECT file on the network, otherwise the tagfile paths won't make sense (the workspace is on the local drive with the tagfile). I would love to see a way to set the base path for the source (the same way you can set the working directory for the project). That way, I could create my tagfile locally, then put it on my remote machine, and have a project that says look on the network drive for source. BTW, I've tried setting this up by actually creating the tagfile over the network, and letting it store the tag file locally (instead of copying a tagfile that I already created). It takes forever, but after I'm done, I still have the problem that SlickEdit hangs when I try to open the project.

If this is something that might be fixed in the next version, I'd be happy to sign up for the next beta, and work to resolve this issue. I would definitely upgrade to fix this problem.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Opening workspace kills Slickedit
« Reply #5 on: February 29, 2008, 10:02:37 PM »
@Duhhh: Maybe this http://community.slickedit.com/index.php?topic=2907.msg11920#msg11920 could be a good pointer related to your use case. Good luck, HS2

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: Opening workspace kills Slickedit
« Reply #6 on: March 11, 2008, 06:00:57 PM »
Yeah, I went through all the info in that post before I ever found this hang problem. I don't think the file location is relative to the tagfile path as stated in that post, however. It is relative to the project file (the tagfile stays with the workspace, apparently). That's why I have the workspace local, the tagfile local, and the project file remote (with all of the source). That may be the key to getting SlickEdit to hang. It might also key on the fact that there is a tagfile on the remote location (which I use when I'm local to the source). I don't know, but if someone wants more info to help find the cause, I'll run whatever tests are suggested.

I can try and duplicate this with the 2008 beta if someone can tell me how to get the beta. If not, when 2008 comes out, I'll test the trial, and if this one is fixed, I'm upgrading!

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: Opening workspace kills Slickedit
« Reply #7 on: March 12, 2008, 10:00:56 PM »
Quote
I used filemon to find out what happens when slickedit fails. The last thing I see is vs.exe trying to open j2sdk1.4.2, and not finding it.

You mean it is trying to stat to test for a j2sdk1.4.2 directory?  I think this is innocous, just happens to the the last thing that happened before the hang, I doubt there would be a causal relationship.

Are you using wildcard specs in your project?  That's gonna be pretty slow over a network drive.

Are you using "Auto-restore workspace files"?  Have you tried closing all open files before closing and re-opening the workspace?  Perhaps SlickEdit is hanging on account of something going on in one of the files you are re-opening and it has nothing [or little] to do with the network?

Are you using a significant number of annotations?  The annotation relocation code can be expensive.

Does your project have project open commands?

Have you tried Ctrl+Alt+Shift+F9 (which will stop a timer function)?

Do you have the "Files" tool window open (and set to the Workspace or Project file list)?

How about the "Projects" tool window?  Are you using custom or dynamic views in the Project tool window?  Package view could be kind of slow if you are working off of network located source.

Try closing these two tool windows and see if the re-open still causes a hang.

Finally, to eliminate any FUD brewing, the source file paths are stored in the tag file relative to the location of the tag database, which is, for a workspace tag file, is always located next door to the workspace.  I know this.  I wrote the database.  Keep in mind that you can have tag files independent of the workspace / project system, so it would make no sense to try to store source file paths relative to the project file -- you might not have one.  Source file paths within the project file are stored relative to the project file.   Finally, project file paths within the workspace file are stored relative to the location of (you guessed it), the workspace file.
« Last Edit: March 12, 2008, 10:10:16 PM by Dennis »

mikef

  • Community Member
  • Posts: 13
  • Hero Points: 2
Re: Opening workspace kills Slickedit
« Reply #8 on: March 13, 2008, 09:41:10 AM »
I have exactly the same problem: creating workspace and restarting with it works fine, but switch to another workspace or opening existing workspace causes SlickEdit to hang.
My environment is different: I work on Linux machine and use V11.0.2. The similarity with Duhhh's setup is in use of network project and a very big project: I have about 25,000 C++ files in it, a lot of subfolders, and I use Directory view (BTW, why its selection is under Auto Folder? I would never guess that this selection controls project view).
My investigation revealed the following: SlickEdit doesn't hang, it is only veeeeeeryyyyy sloooooooooow. It took 19 minutes (MINUTES!!!) to switch from one project to another. It looks like the problem is in memory management: after opening vs it uses about 38 MB, and during switchover to another project the resident memory slowly crept up to 78 MB. After close and reopen of Slickedit the resident memory went back to 38 MB.
Another thing I noticed: Slickedit is sleeping most of the time: its CPU time was only about 25 seconds, but they spread over 19 minutes.

I hope this info will help to find the problem, and maybe fix it.

Michael

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: Opening workspace kills Slickedit
« Reply #9 on: March 13, 2008, 06:19:26 PM »
@mikef

Very useful information.  Is closing and re-opening the workspace also slow if you close the Project tool window or switch it to Custom View?

mikef

  • Community Member
  • Posts: 13
  • Hero Points: 2
Re: Opening workspace kills Slickedit
« Reply #10 on: March 16, 2008, 07:07:41 AM »
I checked, and with Project tool window closed opening existing workspace is also very slow.

Looking at memory footprint (Resident Memory in gnome-system-monitor) closing workspace doesn't decrease amount of memory, and opening new workspace increases footprint by factor of two. Another close and open of workspace continues to increase memory footprint, and is even more slow.

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: Opening workspace kills Slickedit
« Reply #11 on: April 23, 2008, 08:52:44 PM »
Okay, now the $64 question - does SE2008 fix it? I can justify an upgrade if it does. For now, I've got two .slk files, one for when I want to work on the remote project, and one if I want to work on local stuff (and the world ends if I use the wrong one!).

I'm guessing I'll have to download the trial and install it to find out, but if someone knows, please share the info!

Dennis

  • Senior Community Member
  • Posts: 3954
  • Hero Points: 515
Re: Opening workspace kills Slickedit
« Reply #12 on: April 23, 2008, 09:05:19 PM »
If you can reproduce the issue with SlickEdit 2008,
there is some useful information you could send in, just do this:

  1) Go to the command line and type "profile on"
  2) Reproduce the issue (close / open workspace)
  3) When it comes back, go to the command line and type "profile save"
  4) Send the profiling data to SlickEdit support.
      You will get a buffer called "profile.txt"


Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: Opening workspace kills Slickedit
« Reply #13 on: April 24, 2008, 02:54:49 AM »
I installed the SE 2008 trial (and unfortunately, it found my older SE setup and tried to open the workspace, causing all sorts of grief). After I got it installed and running, I tried to duplicate the problem. I created an empty workspace, then added the remote project to the workspace. After a couple of hours of building the tagfile, I checked things out - it found the source, showed me references, and looked good. I shut down SE and then restarted, just to see if things would come back. I got:

Unhandled exception at 0x1016bc8c in vs.exe: 0xC0000005: Access violation reading location 0x00f4d000.

Removing the workspace from vrestore.slk didn't get the error to go away. I uninstalled SE 2008, then removed my old version of SE from my system (so SE 2008 wouldn't read any junk out of it). I then re-installed SE 2008, and made sure it could open & close without a trap. I then tried to repeat the problem (including waiting a couple more hours to build that tag file - yeah, I know, I could probably use a much smaller test, but I want to be sure)...

I can open & close the workspace without hanging.... so far. I'm going to keep beating on it to be sure, but initial results look good.

I then tried the other side of this coin. I noticed that if I closed SE with the workspace open, then disconnected from the network, and opened SE (so I could edit a local file), it went into the weeds trying to access the remote project. I did the same with SE 2008, and it did go dead. It stayed unresponsive for a few minutes (didn't even paint the client area), and then finally popped up a message that said:

Project 'C:\Program Files\SlickEdit 2008\' should have a .vpj extension

Hmmm, it seems a bit confused. When I dismissed that popup, I saw one that said Error opening project file (with the correct name of the unavailable network project). I dismissed that one, and immediately got another one of the first popups. After a few minutes, I could finally get the main SE window to respond so I could close the workspace, and then I could work on local files. However, I think it was still a bit sick, because when I closed SE (this should have saved a state that didn't have a workspace open) and re-opened it, I went through the same business with the futile search for the missing project file.

Enough testing for one day, I've got code to write!
« Last Edit: April 24, 2008, 05:03:35 AM by Duhhh »

mikef

  • Community Member
  • Posts: 13
  • Hero Points: 2
Re: Opening workspace kills Slickedit
« Reply #14 on: April 24, 2008, 06:50:51 AM »
se_12000300_linux_trial solved this problem for me.