The type initializer for 'DevExpress.XtraTreeList.TreeList' threw an exception

Now this is a problem I have _a_lot_ .  no matter what I do (Find usages, refactor->implement missing members)  and afterwards it crashes my VS2008 so I have to restart it.

I have entered this exception a few times in the JIRA http://www.jetbrains.net/jira/browse/RSRP-89591 and http://www.jetbrains.net/jira/browse/RSRP-99326
only to found out that each issue is closed with no real explanation!  Why are these closed?

Can someone please explain what this problem is please?  And how I can solve this?

If you cannot simulate this, I'm more then willing to help you on this.

I'm feeling sad about this, because I really like R# but this isn't workable, I haven't tried DevExpress CodeRush yet, but now I'm forced, even if it doesn't offer the same functionality, at least it will offer some and perhaps will not crash me to the desktop, I hope.

We are a team of 20 developers who all tried R# but because of these problems, they all dropped it.  Perhaps 20 dev is not big enough for you, but for us it is.

TIA

System.Runtime.Serialization.SerializationException: Attempting to deserialize an empty stream.
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at System.ComponentModel.Design.DesigntimeLicenseContextSerializer.Deserialize(Stream o, String cryptoKey, RuntimeLicenseContext context)
   at System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey(Type type, Assembly resourceAssembly)
   at DevExpress.Utils.About.DXLicenseProvider.GetSavedLicenseKey(LicenseContext context, Type type)
   at DevExpress.Utils.About.DXLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
   at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
   at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
   at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
   at DevExpress.XtraTreeList.TreeList..cctor()

   --- End of inner exception stack trace ---
System.TypeInitializationException: The type initializer for 'DevExpress.XtraTreeList.TreeList' threw an exception. ---> System.Runtime.Serialization.SerializationException: Attempting to deserialize an empty stream.
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at System.ComponentModel.Design.DesigntimeLicenseContextSerializer.Deserialize(Stream o, String cryptoKey, RuntimeLicenseContext context)
   at System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey(Type type, Assembly resourceAssembly)
   at DevExpress.Utils.About.DXLicenseProvider.GetSavedLicenseKey(LicenseContext context, Type type)
   at DevExpress.Utils.About.DXLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
   at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
   at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
   at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
   at DevExpress.XtraTreeList.TreeList..cctor()
   --- End of inner exception stack trace ---
   at DevExpress.XtraTreeList.TreeList..ctor()
   at JetBrains.UI.TreeView.TreeModelView..ctor(ITreeViewController controller) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpress\TreeModelView.cs:line 88
   at JetBrains.UI.TreeView.TreeModelView..ctor(TreeModel model, ITreeViewController controller) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpress\TreeModelView.cs:line 105
   at JetBrains.UI.TreeView.TreeModelViewChecked..ctor(TreeModel model, ITreeViewController controller) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpress\TreeModelViewChecked.cs:line 31
   at JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage.InitializeSelectorView() in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GeneratorPage.cs:line 239
   at JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage.InitializeView(String elementsCaption) in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GeneratorPage.cs:line 203
   at JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage..ctor(IList`1 elements, IList`1 options, IList`1 resultElements, String elementsCaption, IGeneratorWorkflow workflow) in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GeneratorPage.cs:line 73
   at JetBrains.ReSharper.Features.Altering.Generate.GeneratorWorkflowForm.InitializeWorkflow() in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GeneratorWorkflowForm.cs:line 62
   at JetBrains.ReSharper.Features.Altering.Generate.GeneratorWorkflowForm..ctor(IGeneratorWorkflow workflow, String title, String description) in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GeneratorWorkflowForm.cs:line 50
   at JetBrains.ReSharper.Features.Altering.Generate.StandardGeneratorItem.Execute(IDataContext context) in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\StandardGeneratorItem.cs:line 82
   at JetBrains.ReSharper.Features.Altering.Generate.GenerateAction.<>c__DisplayClass3.<>c__DisplayClass5.<Execute>b__2() in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GenerateAction.cs:line 66
   at JetBrains.Threading.Invocator.<>c__DisplayClass4.<ExecuteOrQueueReadLock>b__3() in c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invocator.cs:line 162
   at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 306

   --- End of inner exception stack trace ---
LoggerException: The type initializer for 'DevExpress.XtraTreeList.TreeList' threw an exception.
   at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 311
   at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 339
   at JetBrains.Threading.Invocator.ExecuteOrQueue(String name, Action action) in c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invocator.cs:line 145
   at JetBrains.Threading.Invocator.ExecuteOrQueueReadLock(String name, Action action) in c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invocator.cs:line 159
   at JetBrains.ReSharper.Features.Altering.Generate.GenerateAction.<>c__DisplayClass3.<Execute>b__1(Object key) in c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\GenerateAction.cs:line 65
   at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 280
   at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 390
   at JetBrains.DataFlow.Signal`1.Fire(TValue value) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 360
   at JetBrains.UI.PopupMenu.JetPopupMenu.<>c__DisplayClassb.<Show>b__5(JetPopupMenuItem item) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\JetPopupMenu.cs:line 368
   at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 280
   at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 390
   at JetBrains.DataFlow.Signal`1.Fire(TValue value) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 360
   at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 280
   at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 390
   at JetBrains.DataFlow.Signal`1.Fire(TValue value) in c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!1.cs:line 360
   at JetBrains.UI.PopupMenu.Impl.JetPopupMenuDoc.ExecuteSelectedItem() in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\JetPopupMenuDoc.cs:line 272
   at JetBrains.UI.PopupMenu.Impl.JetPopupMenuMainpartView.OnKeyDownLowPriority(KeyEventArgs args) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\JetPopupMenuMainpartView.cs:line 1502
   at JetBrains.UI.PopupMenu.Impl.JetPopupMenuView.OnKeyDown(KeyEventArgs args) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\JetPopupMenuView.cs:line 809
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at JetBrains.UI.PopupMenu.Impl.JetPopupMenuView.WndProc(Message& m) in c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\JetPopupMenuView.cs:line 1006
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

0
20 comments

Hello Christiaan,

This looks like a problem in DX component we are using for UI (TreeList),
and we were never able to reproduce it. It looks like it verifies license
and fails. Here is what additional information may help:

  • Do you use DX controls in your solution?

  • Do you have them installed?

  • Which version if so?

  • Do you have App_Licenses assembly somewhere?

  • Create and execute the following macro, tell us what is shows

Sub ShowLicense()
MsgBox("<" & AppDomain.CurrentDomain.SetupInformation.LicenseFile
& ">")
End Sub

Thanks!

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


C> Now this is a problem I have alot_ . no matter what I do (Find
C> usages, refactor->implement missing members) and afterwards it
C> crashes my VS2008 so I have to restart it.
C>
C> I have entered this exception a few times in the JIRA
C> http://www.jetbrains.net/jira/browse/RSRP-89591 and
C> http://www.jetbrains.net/jira/browse/RSRP-99326
C>
C> only to found out that each issue is closed with no real explanation!
C> Why are these closed?
C>
C> Can someone please explain what this problem is please? And how I
C> can solve this?
C>
C> If you cannot simulate this, I'm more then willing to help you on
C> this.
C>
C> I'm feeling sad about this, because I really like R# but this isn't
C> workable, I haven't tried DevExpress CodeRush yet, but now I'm
C> forced, even if it doesn't offer the same functionality, at least it
C> will offer some and perhaps will not crash me to the desktop, I hope.
C>
C> We are a team of 20 developers who all tried R# but because of these
C> problems, they all dropped it. Perhaps 20 dev is not big enough for
C> you, but for us it is.
C>
C> TIA
C>

System.Runtime.Serialization.SerializationException:
C> Attempting to deserialize an empty stream.
C> at
C> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
C> alize(Stream serializationStream, HeaderHandler handler, Boolean
C> fCheck, Boolean isCrossAppDomain, IMethodCallMessage
C> methodCallMessage)
C> at
C> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
C> alize(Stream serializationStream)
C> at
C> System.ComponentModel.Design.DesigntimeLicenseContextSerializer.Deser
C> ialize(Stream o, String cryptoKey, RuntimeLicenseContext context)
C> at
C> System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey
C> (Type type, Assembly resourceAssembly)
C> at
C> DevExpress.Utils.About.DXLicenseProvider.GetSavedLicenseKey(LicenseCo
C> ntext context, Type type)
C> at
C> DevExpress.Utils.About.DXLicenseProvider.GetLicense(LicenseContext
C> context, Type type, Object instance, Boolean allowExceptions)
C> at
C> System.ComponentModel.LicenseManager.ValidateInternalRecursive(Licens
C> eContext context, Type type, Object instance, Boolean
C> allowExceptions, License& license, String& licenseKey)
C> at System.ComponentModel.LicenseManager.ValidateInternal(Type
C> type, Object instance, Boolean allowExceptions, License& license)
C> at System.ComponentModel.LicenseManager.Validate(Type type, Object
C> instance)
C> at DevExpress.XtraTreeList.TreeList..cctor()
C> --- End of inner exception stack trace ---
C> System.TypeInitializationException: The type initializer for
C> 'DevExpress.XtraTreeList.TreeList' threw an exception. --->
C> System.Runtime.Serialization.SerializationException: Attempting to
C> deserialize an empty stream.
C> at
C> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
C> alize(Stream serializationStream, HeaderHandler handler, Boolean
C> fCheck, Boolean isCrossAppDomain, IMethodCallMessage
C> methodCallMessage)
C> at
C> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
C> alize(Stream serializationStream)
C> at
C> System.ComponentModel.Design.DesigntimeLicenseContextSerializer.Deser
C> ialize(Stream o, String cryptoKey, RuntimeLicenseContext context)
C> at
C> System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey
C> (Type type, Assembly resourceAssembly)
C> at
C> DevExpress.Utils.About.DXLicenseProvider.GetSavedLicenseKey(LicenseCo
C> ntext context, Type type)
C> at
C> DevExpress.Utils.About.DXLicenseProvider.GetLicense(LicenseContext
C> context, Type type, Object instance, Boolean allowExceptions)
C> at
C> System.ComponentModel.LicenseManager.ValidateInternalRecursive(Licens
C> eContext context, Type type, Object instance, Boolean
C> allowExceptions, License& license, String& licenseKey)
C> at System.ComponentModel.LicenseManager.ValidateInternal(Type
C> type, Object instance, Boolean allowExceptions, License& license)
C> at System.ComponentModel.LicenseManager.Validate(Type type, Object
C> instance)
C> at DevExpress.XtraTreeList.TreeList..cctor()
C> --- End of inner exception stack trace ---
C> at DevExpress.XtraTreeList.TreeList..ctor()
C> at JetBrains.UI.TreeView.TreeModelView..ctor(ITreeViewController
C> controller) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpres
C> s\TreeModelView.cs:line 88
C> at JetBrains.UI.TreeView.TreeModelView..ctor(TreeModel model,
C> ITreeViewController controller) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpres
C> s\TreeModelView.cs:line 105
C> at JetBrains.UI.TreeView.TreeModelViewChecked..ctor(TreeModel
C> model, ITreeViewController controller) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\TreeView\DevExpres
C> s\TreeModelViewChecked.cs:line 31
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage.Initiali
C> zeSelectorView() in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> eratorPage.cs:line 239
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage.Initiali
C> zeView(String elementsCaption) in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> eratorPage.cs:line 203
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GeneratorPage..ctor(IL
C> ist`1 elements, IList`1 options, IList`1 resultElements, String
C> elementsCaption, IGeneratorWorkflow workflow) in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> eratorPage.cs:line 73
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GeneratorWorkflowForm.
C> InitializeWorkflow() in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> eratorWorkflowForm.cs:line 62
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GeneratorWorkflowForm.
C> .ctor(IGeneratorWorkflow workflow, String title, String description)
C> in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> eratorWorkflowForm.cs:line 50
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.StandardGeneratorItem.
C> Execute(IDataContext context) in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Sta
C> ndardGeneratorItem.cs:line 82
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GenerateAction.<>c__Di
C> splayClass3.<>c__DisplayClass5.<Execute>b__2() in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> erateAction.cs:line 66
C> at
C> JetBrains.Threading.Invocator.<>c__DisplayClass4.<ExecuteOrQueueReadL
C> ock>b__3() in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invoc
C> ator.cs:line 162
C> at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action
C> action) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\Reen
C> trancyGuard.cs:line 306
C> --- End of inner exception stack trace ---
C> LoggerException: The type initializer for
C> 'DevExpress.XtraTreeList.TreeList' threw an exception.
C> at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action
C> action) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\Reen
C> trancyGuard.cs:line 311
C> at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name,
C> Action action) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\Concurrency\Reen
C> trancyGuard.cs:line 339
C> at JetBrains.Threading.Invocator.ExecuteOrQueue(String name,
C> Action action) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invoc
C> ator.cs:line 145
C> at JetBrains.Threading.Invocator.ExecuteOrQueueReadLock(String
C> name, Action action) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Shell\src\Threading\Invoc
C> ator.cs:line 159
C> at
C> JetBrains.ReSharper.Features.Altering.Generate.GenerateAction.<>c__Di
C> splayClass3.<Execute>b__1(Object key) in
C> c:\Agent\work\18999c274dda3ce5\src\Features\Altering\src\Generate\Gen
C> erateAction.cs:line 65
C> at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 280
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
C> in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 390
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 360
C> at
C> JetBrains.UI.PopupMenu.JetPopupMenu.<>c__DisplayClassb.<Show>b__5(Jet
C> PopupMenuItem item) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\JetPopup
C> Menu.cs:line 368
C> at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 280
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
C> in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 390
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 360
C> at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 280
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
C> in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 390
C> at JetBrains.DataFlow.Signal`1.Fire(TValue value) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\Util\src\DataFlow\Signal!
C> 1.cs:line 360
C> at
C> JetBrains.UI.PopupMenu.Impl.JetPopupMenuDoc.ExecuteSelectedItem() in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\Jet
C> PopupMenuDoc.cs:line 272
C> at
C> JetBrains.UI.PopupMenu.Impl.JetPopupMenuMainpartView.OnKeyDownLowPrio
C> rity(KeyEventArgs args) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\Jet
C> PopupMenuMainpartView.cs:line 1502
C> at
C> JetBrains.UI.PopupMenu.Impl.JetPopupMenuView.OnKeyDown(KeyEventArgs
C> args) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\Jet
C> PopupMenuView.cs:line 809
C> at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
C> at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
C> at System.Windows.Forms.Control.WmKeyChar(Message& m)
C> at System.Windows.Forms.Control.WndProc(Message& m)
C> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
C> at System.Windows.Forms.ContainerControl.WndProc(Message& m)
C> at System.Windows.Forms.Form.WndProc(Message& m)
C> at JetBrains.UI.PopupMenu.Impl.JetPopupMenuView.WndProc(Message&
C> m) in
C> c:\Agent\work\18999c274dda3ce5\Platform\src\UI\src\PopupMenu\Impl\Jet
C> PopupMenuView.cs:line 1006
C> at
C> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
C> m)
C> at
C> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
C> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
C> hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

C> ---
C> Original message URL:
C> http://www.jetbrains.net/devnet/message/5234213#5234213


0
Avatar
Permanently deleted user

Dear Ilya,

No, I don't use any DX components in my projects (only infragistics)
I've used to have a free package of the DX controls installed but I removed it some time ago, with no result.
I have App_licenses.dll files on my system, but these are all in Infragistics folders:
     C:\Program Files\Infragistics\NetAdvantage for .NET 2008 Vol. 2 CLR 3.5\ASP.NET\Forms\WebSchedule\Bin\App_Licenses.dll
     C:\Documents and Settings\christiaanv\My Documents\Infragistics\NetAdvantage for .NET 2008 Vol. 2 CLR 2.0\Samples\ASP.NET\Bin\App_Licenses.dll
     C:\Inetpub\wwwroot\aspnet_client\infragistics\20082CLR35\Forms\WebSchedule\Bin\App_Licenses.dll
The output of the macro is: "<>"

Thanks for the swift response!
C+++

0
Avatar
Permanently deleted user

for what it's worth, if you want I can start a webex session so you can take over my coputer if you ever need to.

C+++

0

Hello Christiaan,

Do I understand correctly that the last entry is in your current solution?
Could you please try to remove it temporary and see if ReSharper continues
to crash (or not)?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Dear Ilya,
IR>
IR> No, I don't use any DX components in my projects (only infragistics)
IR> I've used to have a free package of the DX controls installed but I
IR> removed it some time ago, with no result.
IR> I have App_licenses.dll files on my system, but these are all in
IR> Infragistics folders:
IR> C:\Program Files\Infragistics\NetAdvantage for .NET 2008 Vol. 2
IR> CLR 3.5\ASP.NET\Forms\WebSchedule\Bin\App_Licenses.dll
IR> C:\Documents and Settings\christiaanv\My
IR> Documents\Infragistics\NetAdvantage for .NET 2008 Vol. 2 CLR
IR> 2.0\Samples\ASP.NET\Bin\App_Licenses.dll
IR>
IR> C:\Inetpub\wwwroot\aspnet_client\infragistics\20082CLR35\Forms\WebSc
IR> hedule\Bin\App_Licenses.dll
IR> The output of the macro is: "<>"
IR> Thanks for the swift response!
IR> C+++
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5234222#5234222


0
Avatar
Permanently deleted user

Do you mean by 'last entry' the app_licenses.dll?
If so, no, that is not part of my project.

Sorry, if my previous post was misleading.

C+++

0

Please run the following macro:

Sub ShowLicense()
Dim comparer As CompareInfo = CultureInfo.InvariantCulture.CompareInfo
Dim sb As New StringBuilder
For Each asm As Assembly In AppDomain.CurrentDomain.GetAssemblies()
Dim assemblyShortName As String = asm.GetName.Name
For Each resource As String In asm.GetManifestResourceNames
If comparer.Compare(resource, Name, CompareOptions.IgnoreCase)
= 0 _
OrElse comparer.Compare(resource, assemblyShortName + ".exe.licenses")
= 0 _
OrElse comparer.Compare(resource, assemblyShortName + ".licenses")
= 0 _
OrElse comparer.Compare(resource, assemblyShortName + ".dll.licenses")
= 0 Then
sb.AppendLine(resource)
End If
Next
Next
MsgBox(sb.ToString)
End Sub

Hint: you can use Ctrl+C in message boxes to copy its content to clipboard.


Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Do you mean by 'last entry' the app_licenses.dll?
IR> If so, no, that is not part of my project.
IR> Sorry, if my previous post was misleading.
IR>
IR> C+++
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5234233#5234233


0
Avatar
Permanently deleted user

orangy wrote:

Please run the following macro:


    Sub ShowLicense()
        Dim comparer As CompareInfo = CultureInfo.InvariantCulture.CompareInfo
        Dim sb As New StringBuilder
        For Each asm As Assembly In AppDomain.CurrentDomain.GetAssemblies()
            Dim assemblyShortName As String = asm.GetName.Name
            For Each resource As String In asm.GetManifestResourceNames
                If comparer.Compare(resource, Name, CompareOptions.IgnoreCase)
= 0 _
                OrElse comparer.Compare(resource, assemblyShortName + ".exe.licenses")
= 0 _
                OrElse comparer.Compare(resource, assemblyShortName + ".licenses")
= 0 _
                OrElse comparer.Compare(resource, assemblyShortName + ".dll.licenses")
= 0 Then
                    sb.AppendLine(resource)
                End If
            Next
        Next
        MsgBox(sb.ToString)
    End Sub


Hint: you can use Ctrl+C in message boxes to copy its content to clipboard.


Sincerely,
Ilya Ryzhenkov


JetBrains, Inc
http://www.jetbrains.com

"Develop with pleasure!"

When I run this macro: the result is an empty MsgBox

---------------------------
Visual Studio Macros
---------------------------

---------------------------
OK  
---------------------------


When I change the macro to show me the loaded assemblies (so before the If statement) the result is:

---------------------------
Visual Studio Macros
---------------------------
mscorlib

VBAssembly

Microsoft.VisualBasic

System.Windows.Forms

Microsoft.Vsa

EnvDTE80

EnvDTE


---------------------------
OK  
---------------------------


The code is:

    Sub ShowLicense()

        Dim comparer As CompareInfo = CultureInfo.InvariantCulture.CompareInfo

        Dim sb As New StringBuilder

        For Each asm As Assembly In AppDomain.CurrentDomain.GetAssemblies()

            sb.AppendLine(asm.GetName.Name)
            'Dim assemblyShortName As String = asm.GetName.Name

            'For Each resource As String In asm.GetManifestResourceNames

            '    If comparer.Compare(resource, Name, CompareOptions.IgnoreCase) = 0 _
            '    OrElse comparer.Compare(resource, assemblyShortName + ".exe.licenses") = 0 _
            '    OrElse comparer.Compare(resource, assemblyShortName + ".licenses") = 0 _
            '    OrElse comparer.Compare(resource, assemblyShortName + ".dll.licenses") = 0 Then

            '        sb.AppendLine(resource)

            '    End If

            'Next

        Next

        MsgBox(sb.ToString)

    End Sub


Now, I've attached a debugger to the VS instance and listed the loaded modules and this is the result:

Ankh.Ids.dll
Ankh.Package.dll
Ankh.Trigger.dll
CookComputing.XmlRpc.dll
CustomMarshalers.dll
DevExpress.Data.v7.1.dll
DevExpress.Utils.v7.1.dll
DevExpress.XtraEditors.v7.1.dll
DevExpress.XtraTreeList.v7.1.dll
DPack.dll
EnvDTE.dll
EnvDTE80.dll
Extensibility.dll
JetBrains.Annotations.dll
JetBrains.Platform.CommonServices.dll
JetBrains.Platform.ReSharper.AbstractTreeBuilder.dll
JetBrains.Platform.ReSharper.ActionManagement.dll
JetBrains.Platform.ReSharper.ActivityTracking.dll
JetBrains.Platform.ReSharper.DocumentManager.dll
JetBrains.Platform.ReSharper.DocumentModel.dll
JetBrains.Platform.ReSharper.IDE.dll
JetBrains.Platform.ReSharper.Interop.WinApi.dll
JetBrains.Platform.ReSharper.Metadata.dll
JetBrains.Platform.ReSharper.ProjectModel.dll
JetBrains.Platform.ReSharper.Shell.dll
JetBrains.Platform.ReSharper.TextControl.dll
JetBrains.Platform.ReSharper.UI.dll
JetBrains.Platform.ReSharper.Util.dll
JetBrains.Platform.ReSharper.VSIntegration.dll
JetBrains.ReSharper.Asp.dll
JetBrains.ReSharper.BuildScriptSupport.dll
JetBrains.ReSharper.Daemon.CSharp.dll
JetBrains.ReSharper.Daemon.dll
JetBrains.ReSharper.Daemon.Specific.dll
JetBrains.ReSharper.Daemon.VB.dll
JetBrains.ReSharper.Daemon.Xaml.dll
JetBrains.ReSharper.Daemon.Xml.dll
JetBrains.ReSharper.ExternalProcessStorage.dll
JetBrains.ReSharper.ExternalProcessStorage.Process.exe
JetBrains.ReSharper.Feature.Services.CSharp.dll
JetBrains.ReSharper.Feature.Services.dll
JetBrains.ReSharper.Feature.Services.VB.dll
JetBrains.ReSharper.Feature.Services.Xaml.dll
JetBrains.ReSharper.Feature.Services.Xml.dll
JetBrains.ReSharper.Features.Altering.dll
JetBrains.ReSharper.Features.Browsing.dll
JetBrains.ReSharper.Features.Common.dll
JetBrains.ReSharper.Features.Environment.dll
JetBrains.ReSharper.Features.Finding.dll
JetBrains.ReSharper.Features.Intellisense.dll
JetBrains.ReSharper.Intentions.CSharp.dll
JetBrains.ReSharper.Intentions.dll
JetBrains.ReSharper.Intentions.VB.dll
JetBrains.ReSharper.Intentions.Xaml.dll
JetBrains.ReSharper.Intentions.Xml.dll
JetBrains.ReSharper.LiveTemplates.CSharp.dll
JetBrains.ReSharper.LiveTemplates.dll
JetBrains.ReSharper.LiveTemplates.VB.dll
JetBrains.ReSharper.LiveTemplates.Xml.dll
JetBrains.ReSharper.NewRefactorings.dll
JetBrains.ReSharper.Psi.CSharp.dll
JetBrains.ReSharper.Psi.dll
JetBrains.ReSharper.Psi.Services.CSharp.dll
JetBrains.ReSharper.Psi.Services.dll
JetBrains.ReSharper.Psi.Services.VB.dll
JetBrains.ReSharper.Psi.Services.Xml.dll
JetBrains.ReSharper.Psi.VB.ConstantCalculatorLib.dll
JetBrains.ReSharper.Psi.VB.dll
JetBrains.ReSharper.Psi.Xaml.dll
JetBrains.ReSharper.Psi.Xml.dll
JetBrains.ReSharper.Refactorings.CSharp.dll
JetBrains.ReSharper.Refactorings.VB.dll
JetBrains.ReSharper.Refactorings.Xaml.dll
JetBrains.ReSharper.Resources.dll
JetBrains.ReSharper.SolutionAnalysis.dll
JetBrains.ReSharper.SolutionBuilder.dll
JetBrains.ReSharper.TaskRunner.exe
JetBrains.ReSharper.TaskRunnerFramework.dll
JetBrains.ReSharper.TestFramework.dll
JetBrains.ReSharper.TodoExplorer.dll
JetBrains.ReSharper.UnitTestExplorer.dll
JetBrains.ReSharper.UnitTestProvider.MSTest.dll
JetBrains.ReSharper.UnitTestProvider.nUnit.dll
JetBrains.ReSharper.VS.dll
JTLeigh.Tools.Development.CopySourceAsHtml.dll
Microsoft.Build.Engine.dll
Microsoft.Build.Framework.dll
Microsoft.Build.Tasks.v3.5.dll
Microsoft.Build.Utilities.v3.5.dll
Microsoft.Data.Entity.Design.Package.dll
Microsoft.Internal.VisualStudio.Shell.Interop.9.0.dll
Microsoft.VisualBasic.dll
Microsoft.VisualStudio.CommandBars.dll
Microsoft.VisualStudio.CommonIDE.dll
Microsoft.VisualStudio.Design.dll
Microsoft.VisualStudio.Designer.Interfaces.dll
Microsoft.VisualStudio.dll
Microsoft.VisualStudio.ManagedInterfaces.9.0.dll
Microsoft.VisualStudio.ManagedInterfaces.dll
Microsoft.VisualStudio.OLE.Interop.dll
Microsoft.VisualStudio.Publish.dll
Microsoft.VisualStudio.Shell.9.0.dll
Microsoft.VisualStudio.Shell.Design.dll
Microsoft.VisualStudio.Shell.dll
Microsoft.VisualStudio.Shell.Interop.8.0.dll
Microsoft.VisualStudio.Shell.Interop.9.0.dll
Microsoft.VisualStudio.Shell.Interop.dll
Microsoft.VisualStudio.ShellConfig.dll
Microsoft.VisualStudio.TextManager.Interop.8.0.dll
Microsoft.VisualStudio.TextManager.Interop.dll
Microsoft.VisualStudio.TextTemplating.dll
Microsoft.VisualStudio.TextTemplating.VSHost.dll
Microsoft.VisualStudio.VSHelp80.dll
Microsoft.VisualStudio.Windows.Forms.dll
Microsoft.Vsa.Vb.CodeDOMProcessor.dll
Microsoft.VSDesigner.dll
mscorlib.dll
System.Configuration.dll
System.Data.dll
System.Design.dll
System.dll
System.Drawing.Design.dll
System.Drawing.dll
System.Windows.Forms.dll
System.Xml.dll
VSLangProj.dll
VSLangProj2.dll
VSLangProj80.dll
VsWebSite.Interop.dll
WindowsBase.dll
ydm9c

Hope this helps

0

Do you have .NET Shared Sources? If so, could you please put breakpoint at
"System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey" (Debug
| New breakpoint | Break at function) and tell me parameters to that function?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

orangy wrote:

Do you have .NET Shared Sources? If so, could you please put breakpoint at
"System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey" (Debug
| New breakpoint | Break at function) and tell me parameters to that function?

Yes, I have.

I've been doing my normal stuff, as I always do: find references, refactor -> implement missing members, I've got the exception when I did a rename of a class

The result is the always same for each call to 'GetSavedLicensKey':

+        type    {Name = "RepositoryItem" FullName = "DevExpress.XtraEditors.Repository.RepositoryItem"}    System.Type {System.RuntimeType}
+        resourceAssembly    null    System.Reflection.Assembly

0

Christiaan,

Thanks for the info, that makes sense. Looks like it scans all assemblies
and finds empty license resources in some assembly. Could you please step
through that method to find what assembly it believes contains license stream?
We then probably will be able to reproduce it here and continue in-house.

Thanks!

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR>

orangy wrote:
IR>
IR> Do you have .NET Shared Sources? If so, could you please put
IR> breakpoint at
IR> "System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseK
IR> ey" (Debug
IR> | New breakpoint | Break at function) and tell me parameters to that
IR> function?
IR>

IR> Yes, I have.
IR> I've been doing my normal stuff, as I always do: find references,
IR> refactor -> implement missing members, I've got the exception when I
IR> did a rename of a class
IR>
IR> The result is the always same for each call to 'GetSavedLicensKey':
IR>
IR>

+ type {Name = "RepositoryItem" FullName =
IR> "DevExpress.XtraEditors.Repository.RepositoryItem"} System.Type
IR> {System.RuntimeType}
IR>
IR> + resourceAssembly null
IR> System.Reflection.Assembly

IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5234252#5234252


0

Hello Christiaan,

I've reproduced the exception by creating fake empty embedded resource with
specially formed name. I will try to make a workaround, but it may be very
hard if even possible (DX checks their license in static ctor, so if it fails,
type is not accessible). When you have time, please debug the process and
tell us what assembly contains such ill-formed license resource. We would
like to know if it is a problem in project, installed package or whatever.
Thanks for your help!

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

orangy wrote:

Hello Christiaan,


I've reproduced the exception by creating fake empty embedded resource with
specially formed name. I will try to make a workaround, but it may be very
hard if even possible (DX checks their license in static ctor, so if it fails,
type is not accessible). When you have time, please debug the process and
tell us what assembly contains such ill-formed license resource. We would
like to know if it is a problem in project, installed package or whatever.
Thanks for your help!


Great, I've narrowed it down to one of our assemblies which contains an empty xxx.dll.license resource (0 bytes).  This was caused by having an empty .licx.

I've removed it, and now I can rename classes without having R# crashing me to the desktop (which was the main cause of my crashes)

If this is the problem, I'm glad this is solved.

A big thanks for your support.

0

Hello Christiaan,

Great to hear the problem is resolved. However, I wonder why your project
assembly was loaded into main AppDomain? Is it some code containing designers?
Could you please give us more information about that assembly? I'm trying
to understand how it happens, so that we have real repro case we can work
with, not just fake exception generator.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR>

orangy wrote:
IR>
IR> Hello Christiaan,
IR>
IR> I've reproduced the exception by creating fake empty embedded
IR> resource with
IR> specially formed name. I will try to make a workaround, but it may
IR> be very
IR> hard if even possible (DX checks their license in static ctor, so if
IR> it fails,
IR> type is not accessible). When you have time, please debug the
IR> process and
IR> tell us what assembly contains such ill-formed license resource. We
IR> would
IR> like to know if it is a problem in project, installed package or
IR> whatever.
IR> Thanks for your help!
IR>

IR>
IR> Great, I've narrowed it down to one of our assemblies which contains
IR> an empty xxx.dll.license resource (0 bytes). This was caused by
IR> having an empty .licx.
IR>
IR> I've removed it, and now I can rename classes without having R#
IR> crashing me to the desktop (which was the main cause of my crashes)
IR>
IR> If this is the problem, I'm glad this is solved.
IR>
IR> A big thanks for your support.
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5234268#5234268


0
Avatar
Permanently deleted user

orangy wrote:

Hello Christiaan,


Great to hear the problem is resolved. However, I wonder why your project
assembly was loaded into main AppDomain? Is it some code containing designers?
Could you please give us more information about that assembly? I'm trying
to understand how it happens, so that we have real repro case we can work
with, not just fake exception generator.


Sincerely,
Ilya Ryzhenkov



in fact, this assembly (which contained the empty .licenses resource) is a reference and contains controls which are used in the current solution, so that could the reason why this assembly is also checked for valid licenses.

Once again, a big thanks for your support, I owe you a beer (or more)

C+++

0
Avatar
Permanently deleted user

Hello Ilya,

I have some more info on why there was an empty .licenses in the assembly, in fact our nantbuild script doesn't handle license.licx well, it just compiles it as a resource not as a license.

That's why this resource is empty (0 bytes) when you compile it with VS it is not null and there is no problem (read: crash)

Cya
C+++

0
Avatar
Permanently deleted user

I am having the same problem.

As soon as I use (tried Run unit test-, Rename, and Run all test in solution- commands) my Visual Studio 2008 crasches.

I had DevExpress on my system - but uninstalled it when the problems arose...

After reading this thread I searched my system for .licx-files and deleted them (none of 0 bytes though). I only had .licx files that related to DevExpress.

But no use - Visual Studio still crasches.

I have Visual Studio 2008 with Resharper 4.5 installed.

The strangest thing is that this worked just two days ago.

Any help on how to solve this?

/Marcus
www.marcusoft.net

0
Avatar
Permanently deleted user

Hello Marcus
     Do you see any exception messages from ReSharper or Visual Studio just crashes?

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Avatar
Permanently deleted user

Hello,

I managed to capture a errormessage if I was real quick. See attached files.

Screen shot 2010-02-08 at 18.06.33.pngScreen shot 2010-02-08 at 18.06.23.png

Just to clarify - I have unistalled all DevExpress stuff before I reinstalled Resharper again. Of course i rebooted my computer in between.

0
Avatar
Permanently deleted user

Hello Marcus
     Please run Visual Studio (devenv.exe) with '/ReSharper.LogFile C:\log.txt /ReSharper.LogLevel Verbose' command line parameters, wait until it crashes with exception and attach the resulting log.txt here. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Avatar
Permanently deleted user

OK - said and done!

Here you are
/Marcus
www.marcusoft.net



Attachment(s):
log.txt.zip
0

Please sign in to leave a comment.