StrataFrame and EnvDTE


Author
Message
Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Ben, Trent,
I am currently having some issues with DevExpress CodeRush product crashing VS 2013 & 2015.  For several days we have been debugging and testing several hotfixes they provided and somehow in my system it will always crash Visual Studio while not on their test computers.

So far this have been happening after I installed the SF VSIX in both VS 13 & 15 and we are wondering if the StrataFrame Extension installed with the VSIX makes any changes to the EnvDTE or have anything to do with it, before I am force to uninstall StrataFrame to continue testing as per DevExpress request?

Here is the link to the DevExpress support ticket:
https://www.devexpress.com/support/center/Question/Details/T289408#comment-58a294dd-0cfc-4b2a-831c-f04949140552

Thanks!!!

Edhy Rijo

StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, Edhy, we use EnvDTE all over the place.  All VS AddIns and Extensions use it.  It's the COM object that is Visual Studio.  The EnvDTE namespace gives you a DTE object that lets you access the menus, project system, documents, tool windows... everything.  That being said, I'm not sure how we could be changing something that would cause their DTE helpers to throw an exception when they try to access a ProjectItem.

Does VS crash as soon as you open the solution?  Or is there something that you do in StrataFrame first, like open the BOMapper, or a type editor or something?
StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Also, we all had CodeRush installed here for the longest time to use the syntax highlighting.  Now that the VS2015 Power Tools has syntax highlighting, we no longer use it.  But I never got hangs or exceptions thrown when we had CodeRush installed, although we only had syntax highlighting on... all of the other extensions were disabled.
Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Ben,
Thanks for the fast reply.

Does VS crash as soon as you open the solution?  Or is there something that you do in StrataFrame first, like open the BOMapper, or a type editor or something?                                                    

No, it is just when I enable CodeRush, at this point we are running out of options and I believe that is why they are suggesting to temporarily uninstall SF and see if their crash does not show.

I am installing the new SF vsix files and will test my projects as well as CodeRush and see what happen.


Edhy Rijo

Andrew Harper
Andrew Harper
StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi Edhy,




Did the latest Strataframe VSIX and DLLs resolve the issues you were having with DevExpress?




Best regards, Andy
StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I'll let Edhy reply, too, but I believe it did resolve his issues.  The root cause was that almost every AddIn/VSPackage has to use the EnvDTE Solution/Project/ProjectItem collection of interfaces to interact with the project system of Visual Studio.  VS is written in I'm guessing C++, and exposes the object model through COM objects by way of those interfaces.  The COM objects can be accessed from any thread without error until one thread takes explicit ownership of the object.  The partial classes are built on a background thread so the UI thread is not blocked.  VS does not appear to force the main thread to take ownership of any of the COM objects, so the background thread in the BOMapper can still access them.  However, it appears that something in CodeRush or other DevExpress component does force the main thread to take ownership, so as soon as they are accessed in the BOMapper, VS crashes because the AccessViolationException cannot be caught and VS just dies.  With Edhy's debugging help, I wrapped all of the access to the COM objects in calls to Dispatcher.Invoke() so they are all accessed from the main UI thread.  This is a good case study in one AddIn not knowing what the other is doing.
Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Andy,

Andrew Harper (10/21/2015)
...Did the latest Strataframe VSIX and DLLs resolve the issues you were having with DevExpress?


Well with CodeRush, there are some performance issue I am experiencing.  Be aware that now they have CodeRush for Roslyn which is the one that will support the new versions of VB and C# with VS2015, even though the old version (which is the one I had all the issues) still can be installed in VS2015.

What I did was to disable the old CodeRush and install and use the one for Roslyn which still in beta, so that may be reason for the performance issues I am having, they may be recording diagnostics information in the background.

Due to all the time that these 2 issues (SF and CR) was taking from me, I basically dropped debugging CodeRush and focus on SF.  For now the features in CR for Roslyn are good for me, so I am good, except that some times when working on a form designer, the whole IDE may be slowing down, so I disable CR and that seems to help.

P.S.
Ben, thanks for the detail explanation on what is going on under the hood with the Addin.

Edhy Rijo

Andrew Harper
Andrew Harper
StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)StrataFrame User (392 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Thanks Edhy and Ben for the detailed replies and heads up,

Best regards, Andy
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search