SolutionBrowser Exception in latest DPack beta (VS2008)

Post general DPack questions or problem reports here.

Moderator: Sergey

SolutionBrowser Exception in latest DPack beta (VS2008)

Postby joshnorton » May 4th, 2009, 7:43 am

Hi Sergey,

Where is the place to post beta feedback -here, or should I email?

I changed the option for Solution Cache Persistence to "Solution Folder" (Tools > Options > DPack > Solution Browser > "Solution Cache Persistence") and I also have visual studio 2008's "Save new projects when created" option turned off (Tools > Options > Projects and Solutions > General > "Save new projects when created"), which by default is turned on, and when creating a new solution I recieve an error message from DPack with the following text:

---------------------------
Microsoft Visual Studio
---------------------------
DPack 2.9.1.6

Error refreshing solution information.

Value cannot be null.

Parameter name: cacheFileName

For detail error information see "SolutionBrowser 1.log" log file available under "C:\Documents and Settings\joshua.EKEU\Local Settings\Application Data\USysWare" folder.
---------------------------
OK
---------------------------

The corresponding log file contains:

13:31:59.447 *** Start logging ***
13:31:59.447 Date: 5/4/09
13:31:59.447 Version: 2.9.1.6
13:31:59.447 Runtime: 2.0.50727.4005 SP2
13:31:59.447 IDE: 9.0.30729
13:31:59.447 OS: Windows XP Service Pack 3 (5.1.2600.196608)
13:31:59.447 Process Id: 7072
13:31:59.447 Driver mode changed from ModalWindow to ToolWindow
13:32:13.221 CacheUpdater - full refresh - begin
13:32:13.221 CacheUpdater - full refresh - get solution information
13:32:13.252 Check 'WpfModelViewApplication1' project language
13:32:13.268 CacheUpdater - full refresh - refresh code model information
13:32:13.314 CacheUpdater - full refresh - update code model information
13:32:13.314 CacheUpdater - full refresh - end - 00:00.093 - 7
13:32:13.846 Error refreshing solution information.
13:32:13.846 Exception information:
System.ArgumentNullException: Value cannot be null.
Parameter name: cacheFileName
at USysWare.Drivers.SolutionBrowser.CacheSerializer.SerializeCache(BaseDriver driver, SolutionCache cache, String cacheFileName) in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\Drivers\SolutionBrowser\CacheSerializer.cs:line 70
at USysWare.Drivers.SolutionBrowser.CacheUpdater.InternalRefreshAll() in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\Drivers\SolutionBrowser\CacheUpdater.cs:line 909
at USysWare.Drivers.SolutionBrowser.CacheUpdater.Refresh() in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\Drivers\SolutionBrowser\CacheUpdater.cs:line 410

------------------------

My system continues to work fine afterwards, VS does not crash and the solution browser works as it should. I guess in this situation I don't expect the solution cache to be persisted until I save the solution.

Regards,

Josh.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Postby joshnorton » May 4th, 2009, 9:17 am

And another one:

When I reload a project in the solution (this occurs with some regularity for me due to my usage of the visual studio VisualSVN plugin which sometimes reloads projects if they changed in the SVN source repository) the 'updating cache' dialog comes up and never goes away.

Regards,

Josh.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Postby Sergey » May 4th, 2009, 9:43 am

I'm pretty sure the first issue will be easy to reproduce and fix. I'll definitely investigate the second issue. If you find anything interesting in either DPack.log or SolutionBrowser.log when it gets stuck like that, please forward that file to me. Thanks for reporting it all.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » May 5th, 2009, 11:23 am

Josh,

The "Create new projects when created" option is the culprit. It's fixed for the next beta.

I get a similar issue on project reload. In my case it just locks up. Luckily, I was able to identify the issue, which appears to be a classic deadlock scenario. I have a few ideas on how to fix it. Most likely I'll post another beta this weekend to address both issues.

Thanks for reporting it.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » May 5th, 2009, 9:48 pm

The project reload issue is fixed as well. I did observe something interesting in the way VS handles project reload that I wanted to share with you.

Basically when reload's confirmed, VS generates a series of extensibility events that go like this: remove project, add the same project. Those 2 actions happen right after another. The first action, remove project, will cause DPack to remove all cached types. The next action, add project, will unfortunately cause it to re-scan that newly added project again.

Just wanted to let you know this would be a downside of reloading the project with Solution Browser engaged. I might look into improving project reload scenario in one of the next versions.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby joshnorton » May 6th, 2009, 3:00 am

Thanks for the fixes, it's interesting that there's no 'reload project' event, but I guess even so for my scenario it's still good to have the types rescanned (since I'm only reloading the project because someone else changed it in the source repository and the types probably did change).

Do you think it would be hard to get the best of both worlds and have the type scanning happen on a background thread, and have the type definitions be persisted across solution loads? Thoughts for the next next version I guess. :) The current beta is an awesome improvement.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Postby Sergey » May 6th, 2009, 9:39 am

joshnorton wrote:Do you think it would be hard to get the best of both worlds and have the type scanning happen on a background thread, and have the type definitions be persisted across solution loads?


It might be possible to improve it but it won't be error prone. Suppose I introduce a concept of "stale" cache items. Instead on getting rid on cached files info on project removal, I'd make them stale and keep around. I could then add them back w/o re-scanning when project's added back to the solution.

It gets tricky when say you have a second class added to one of the stale files. Unless I re-scan the file right away when project's being added, I won't see the new class. The good thing is that DPack's cache is self-correcting. If file is not supposed to be there, it's deleted on next project load. When file being opened hasn't been scanned yet, it's re-scanned once.

As far as scanning of new projects on the main thread vs. in the background, that was done intentionally. Due to VS extensibility and COM performance issues, major re-scans like the initial scan and project added event must be done on the main thread. Everything else is pushed onto the secondary thread. The performance improvements you seeing in this version is the result of that approach.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » May 10th, 2009, 11:20 pm

Sorry, still working on the new version. Wanted to get to a good stopping point before I get it out. Hopefully I'll have it out within next few days.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » May 12th, 2009, 5:08 pm

Hi Josh,

I got project reload handling finished last night. You'll still be getting a "Processing project..." dialog on reload but it should be up for just a short while processing new files only.

As I mentioned earlier, it won't be error prone. The way it's gonna work is that any deleted files will be removed, new files processed and files that were there before left intact w/o being re-processed on reload. There is no way to determine whether existing files have been modified or not w/o actually processing them, which would slow things down and is what I'm trying to avoid in the first place.

So, if one of the existing files gets a new class added, you won't see that class in the list until after you open that file. I guess that would be a small price to pay for performance.

FYI, I've modified solution cache file format a bit. If you have cache persistence enabled, it might not load the existing cache file correctly. If it fails with an exception then you'll get a dialog asking to ignore invalid cache and rescan. I suggest you pick that. If you don't get that dialog, I'd suggest you refresh cache manually.

I'll make sure to post the new beta this weekend.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » May 17th, 2009, 9:23 pm

The new beta version 2.9.1.7 is up. It addresses the project reload issue you mentioned earlier. It also extends the beta into mid June.

Disregard my earlier comment on cache file format changes. Cache file naming convention's been modified slightly, which would make DPack ignore old cache files all together. Of course, this is not gonna change moving forward. It's just the kind of stuff that could change from beta to beta.

The new beta version for VS 2008 is available at:
http://www.usysware.com/files/DPackSetup2008Beta.exe (809Kb)

Let me know how it works for you or if you run into any issues. Thanks.

PS FTR, I still have C++ and web projects processing to look into to see if I can improve the performance there.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Thanks

Postby joshnorton » May 20th, 2009, 5:41 am

Hey, sorry, I didn't get an email notification that you'd posted an update. I've installed the new beta, will let you know how it goes.

Thanks again,

Josh.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Postby Sergey » May 24th, 2009, 8:18 pm

Just posted a new and final v2.9.1.8. All issues I wanted to address for this release have been addressed. Consider this a RC release. I'll sit on it for a couple of weeks before making it a GA release.

I've made just a few caching improvements in this beta. Nothing really major. The only major change was the C++ projects performance improvement that was on my todo list for this release.

The new beta version for VS 2008 is available at:
http://www.usysware.com/files/DPackSetup2008Beta.exe (811Kb)

Thanks for all of help.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 553
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA


Return to DPack Support

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron