Latest DPack beta crashes VS 2008 when a XAML file is opened

Post general DPack questions or problem reports here.

Moderator: Sergey

Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 14th, 2010, 6:36 am

Hi Sergey,

I just installed the latest (April 2010) beta and it's great, except... now when I open a XAML file in VS, VS crashes. I confirmed it is the latest DPack beta causing this by de-installing the latest beta and installing the latest release version. That causes the problem to go away.

To reproduce:

Open a XAML file, wait 10 seconds or so, VS will suddenly dissappear (but the process is still hanging around taking as much CPU time as it can get).

I don't know if it makes a difference but I have my VS configured not to open XAML files in the standard WPF designer, instead my default editor mode is "Source Code (Text) Editor)" - right click on a XAML file, choose "Open With", select that option from the list. This is configured that way because that editor is much faster than the WPF one and I don't care about loosing the visual designer.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 14th, 2010, 10:20 am

Unfortunately, I can't reproduce this one. Perhaps you could help me repro it here. I don't use much of WPF yet so I may need your help there too.

I assume it's a VB project, correct? Which WPF project template did you use to create it?

Did you pick 'Tool Window' mode during DPack installation? You can double check per-browser setting in Tools|Options dialog, DPack|Browsers node.

Also, do you have VS 2008 SP1 installed?

Do you see anything in the log files (DPack.log, CodeBrowser.log, SolutionBrowser.log, FileBrowser.log) which would indicate some sort of processing error?

Does that happen on any Xaml file, and if so, is there a test case you could send to me?

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

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 16th, 2010, 4:59 am

Hi Sergey,

It's a C# 3.5 project and the item was originally created using the WPF User Control template. I was using the Tool Window Mode setting, for all windows created by DPack (File, Solution, Code). Yes, I have VS 2008 SP1 installed (Version 9.0.30729.1 SP).

I see this in the SolutionBrowser log but I don't know if it's related:

10:21:51.713 System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.CodeClass'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B1F42514-91CD-4D3A-8B25-A317D8032B24}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
>>>>> at USysWare.Driver.CodeModelEnum.GetXmlDoc(CodeElement elt, FileTypeResolver fileType, Log log) in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\BaseDriver\CodeModelEnum.cs:line 1137
>>>>> at USysWare.Driver.CodeModelEnum.AddCodeElement(CodeElement parentElt, CodeElement elt, ICollection`1 filterExps, CodeModelMembers membersFilter) in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\BaseDriver\CodeModelEnum.cs:line 1004
>>>>> at USysWare.Driver.CodeModelEnum.ProcessCodeElement(CodeElements elts, CodeElement elt, ICollection`1 filterExps, CodeModelMembers membersFilter, Boolean parented) in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\BaseDriver\CodeModelEnum.cs:line 748
>>>>> at USysWare.Driver.CodeModelEnum.ProcessCodeElement(CodeElements elts, CodeElement elt, ICollection`1 filterExps, CodeModelMembers membersFilter, Boolean parented) in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\BaseDriver\CodeModelEnum.cs:line 732
>>>>> at USysWare.Driver.CodeModelEnum.Refresh() in C:\Users\Sergey\Documents\Visual Studio 2008\Projects\DPackVSIP2008\DPack\BaseDriver\CodeModelEnum.cs:line 549

This from Dpack.log:

11:58:16.190 Error processing code model change Deleted for element 'None' of vsCMElementVariable kind.
11:58:16.190 Exception information:
>>>>> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
>>>>> at EnvDTE.CodeElement.get_ProjectItem()
>>>>> at USysWare.Drivers.SolutionBrowser.CacheUpdater.Refresh(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Drivers.SolutionBrowser.SolutionBrowserDriver.CodeModelChanged(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Driver.DriverFactory.CodeModelChanged(CodeElement element, CodeModelChangeType change)
11:58:16.659 Error processing code model change Deleted for element 'Top' of vsCMElementVariable kind.
11:58:16.659 Exception information:
>>>>> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
>>>>> at EnvDTE.CodeElement.get_ProjectItem()
>>>>> at USysWare.Drivers.SolutionBrowser.CacheUpdater.Refresh(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Drivers.SolutionBrowser.SolutionBrowserDriver.CodeModelChanged(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Driver.DriverFactory.CodeModelChanged(CodeElement element, CodeModelChangeType change)
11:58:16.909 Error processing code model change Deleted for element 'Bottom' of vsCMElementVariable kind.
11:58:16.909 Exception information:
>>>>> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
>>>>> at EnvDTE.CodeElement.get_ProjectItem()
>>>>> at USysWare.Drivers.SolutionBrowser.CacheUpdater.Refresh(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Drivers.SolutionBrowser.SolutionBrowserDriver.CodeModelChanged(CodeElement element, CodeModelChangeType change)
>>>>> at USysWare.Driver.DriverFactory.CodeModelChanged(CodeElement element, CodeModelChangeType change)

The other log files look uninteresting.

I'll try to send you a test case next week, first I have to re-install the newest beta again.

Thanks,

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

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 17th, 2010, 12:43 pm

Hi Josh,

joshnorton wrote:I'll try to send you a test case next week, first I have to re-install the newest beta again.


Great, thanks! That would be very helpful. Also, tell me which which DPack version you're using please? You can use Help|About box. Alternatively, you can include log's info starting with '*** Start logging ***'. It logs bunch of system info there, including your OS verion, VS version + SP#, DPack version, etc.

Edit: never mind, you said April beta, which is v3.0.0.3.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 17th, 2010, 7:49 pm

Just posted a new beta v3.0.0.5. Give that one a try and see how that works for you. Thanks again.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 21st, 2010, 10:37 pm

Any updates? Just interested to see how the new beta is working out for you. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 22nd, 2010, 8:48 am

Hi Sergey,

It still crashes and unfortunately the log files don't look interesting at all. I've attached them all for you to take a look at.

This is only happening in the project I work with all the time - I can't seem to reproduce this in a sample project. Also, if I open a XAML file, then quickly close it again, VS doesn't crash. It's only when I open a file a leave it open for 10 seconds or so, then it crashes (and doesn't appear to log anything). The VS process still hangs around too, taking 100% of my CPU.

Thanks,

Josh.
Attachments
DPack Logs.zip
(3.54 KiB) Downloaded 357 times
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 22nd, 2010, 11:20 pm

Hi Josh,

Yeah, not whole a lot in the logs. I do see that it did crash just by not seeing "Stop logging" message there. The last message logged in the Solution Browser I see, which is for the file I suspect is causing it, about PatientLabel.xaml file. Is that the one it normally bombs on right when you open it?

I'd suggest enabling 'Show All' using Solution Explorer's toolbar button, excluding that file and it's siblings from the project and then including them again. *If* somehow file was not added to the project correctly then re-adding it back might solve the problem.

In the mean time, I've been adding safe guards every place I suspect as well as adding more logging to indicate what DPack was attempting to do at that given time.

Sucks that I can't reproduce it here. I appreciate you sticking around to help me troubleshoot this issue. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 23rd, 2010, 4:14 am

Hmm... Removing items from the project and re-adding them didn't help. I did try viewing a XAML file in another project belonging to the same solution - that worked. It seems that only XAML files in that particular project cause it to crash. It's gotta be something about the project file since even a new XAML file created from one of the built in VS templates (Solution Explorer -> right click -> Add... -> Window) in that project will cause VS to crash.

Would you like me to post the project file for you to take a look at? I took a look at it myself and can't find anything too out of the ordinary, however maybe it might help you to reproduce the problem with a debugger attached?

Do you have a way I can upload files without them being publicly visible and permanently on the forum? This is at the end of the day data belonging to my company, and not my personal property.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 23rd, 2010, 4:42 am

A click on 'Go to Definition' is also suddenly reliably killing VS when the type in question is a type with a corresponding XAML file.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 23rd, 2010, 11:21 am

joshnorton wrote:Hmm... Removing items from the project and re-adding them didn't help. I did try viewing a XAML file in another project belonging to the same solution - that worked. It seems that only XAML files in that particular project cause it to crash.


Really weird. I was thinking that perhaps there is one other thing you could try. I suspect, if that is in fact the case, that toolwindow mode processing is somehow contributing to that. So, I'd suggest:
1 - Load that solution.
2 - Got to DPack's options (Tools|Options, DPack) and change Solution Browser options to 'Dialog Mode' and 'In Memory' cache.
3 - Restart VS and try open the same Xaml file again.

If problem persists, repeat the above steps for Code Browser (it offers no caching option though).

Let me know how that goes. Also, it might help to get the latest v3.0.0.6 installed too.

joshnorton wrote:Do you have a way I can upload files without them being publicly visible and permanently on the forum? This is at the end of the day data belonging to my company, and not my personal property.


The best thing to do is to email it to me. You can do that using Tools|DPack|Help|Email Us.

Thanks!
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 25th, 2010, 2:46 pm

Josh,

I've just posted a new private beta for you to try please. I've identified several areas where errors weren't getting handled correctly. I basically tried sprinkling random exceptions here and there to see how well browsers recover. I've also found and fixed a problem which *might* have contributed to a crash. And on top of that, I improved error reporting as well. So, hopefully all of that combined should help us pin point the issue and, holding my fingers crossed :), prevent future crashes.

http://www.usysware.com/files/DPackSetu ... .0.0.7.exe (845Kb)
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » April 26th, 2010, 4:06 am

Hey Sergey,

I've tried everything you suggested, and a few things you didn't, with the latest beta you created for me. Unfortunately there was no improvement and no new log entries. I've sent you an email (support@usysware.com) with the log files and the project file of the VS project whose XAML files are crashing.

If you can't get any further with this then maybe I'll have to try to creating a new project file.
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby Sergey » April 27th, 2010, 12:51 am

Hi Josh,

Got your project file today, thanks. Did some testing with that. I copied one of my simple test Xaml files into that project's folder and renamed it such so I'd be able to open it in Solution Explorer. That's ignoring the rest of the missing files of course.

Interestingly enough, I do see a similar delay of roughly 10 seconds or so when opening that test Xaml file via 'Open with' (using your project). The output window shows that lots of UriFormatException and FileNotFoundExceptions are being logged, which leads me to believe that some Xml/Xaml processing is busy doing something. It opens fine w/o a VS crash though. A few seconds later, 5-10+, I see a thread terminatation logged in the output as well. It once actually said "The thread 'Parse Thread' (0xXXXX) has exited with code 0". I don't create a such thread so that confirms my Xaml parser theory.

Now, I think what might be happening is that some early DPack's request for file code model during Xaml file load or some of its internal thread processing gets in the way, somehow. That I think causes that thread to die a horrible death later on, taking VS along with it. That's why we haven't seen any legit DPack errors logged despite of my trying to narrow down the error spot.

So, here's what we can try to confirm my theory. You could start VS w/o any project loaded, go to DPack options General page and disable 3 main browsers. It should be disabled but go ahead and restart VS just to be sure. Try your test and see if your Xaml files opens fine. If so, close the project, enable one of DPack browsers, restart and try it with that Xaml file again. I'd suggest start enabling it in this order: File, Solution and then Code Browser.

Also, try it with this new beta I've just posted. Just mainly has more logging and exception handling:
http://www.usysware.com/files/DPackSetu ... .0.0.8.exe (845Kb)

Why it happens on that single project baffles me though. Thanks for staying on it with me. You're a brave man. :)
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 557
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Latest DPack beta crashes VS 2008 when a XAML file is opened

Postby joshnorton » May 3rd, 2010, 2:50 am

Hi Sergey, sorry for the slow turnarounds on my part. I'm about to go on 3 1/2 weeks of holiday so I'm a bit pressed for time.

Unfortunately, the latest beta didn't help and nothing extra was logged either. :(
joshnorton
Senior Member
 
Posts: 39
Joined: January 23rd, 2009, 4:05 am

Next

Return to DPack Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron