Nullreference at Dispose RRS feed

  • Question

  • Hi, I'm currently working n an Blackbox Testkit, based on the System.Reflection Framework.
    While Testing and I noticed the following Error:

     System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       bei System.ComponentModel.Design.ComponentDesigner.ShadowPropertyCollection.GetShadowedPropertyDescriptor(String propertyName)
       bei System.ComponentModel.Design.ComponentDesigner.ShadowPropertyCollection.get_Item(String propertyName)
       bei System.Windows.Forms.Design.ControlDesigner.get_ContextMenu()
       bei System.Windows.Forms.Design.ControlDesigner.Dispose(Boolean disposing)
       bei System.ComponentModel.Design.ComponentDesigner.Dispose()

    I'm not sure, if this is an Error in my CleanUp, the Tested Component (an Control Designer) or somewhere else.

    I'm using the dotNet Framework 3.5

    Thursday, January 29, 2009 9:55 AM


  • The error is in ControlDesigner.

    In Dispose(Boolean disposing), you can only Dispose other managed objects; you cannot do anything else with them.


    • Marked as answer by Zhi-Xin Ye Wednesday, February 4, 2009 10:17 AM
    Thursday, January 29, 2009 6:26 PM