dwManager Causes Exception on Form

DockableWindow/TabStripPanel for Windows Forms Forum

Posted 19 years ago by medyanik - Software Developer, Direct EDI, Inc.
Avatar
Hi All.
I have VS autogenerated code in my main form which starts from
this.dwManager = new ActiproSoftware.DockableWindow.DWManager();
this.SuspendLayout();
.....
this.Controls.Add(this.dwManager);

the last string of code causes exception which becomes visible when you set
Break into Debugger for Common Language Runtime Exceptions.

Details:
A first chance exception of type 'System.NullReferenceException' occurred in actiprosoftware.dockablewindow.dll
Additional information: Object reference not set to an instance of an object.
Some additional info
System.Object {System.NullReferenceException} System.Object
_className null string
_COMPlusExceptionCode -532459699 int
_exceptionMethod <undefined value> System.Reflection.MethodBase
_exceptionMethodString null string
_helpURL null string
_HResult -2147467261 int
_innerException { } System.Exception
_message "Object reference not set to an instance of an object." string
_remoteStackIndex 0 int
_remoteStackTraceString null string
_source null string
_stackTrace <undefined value> System.Object
_stackTraceString null string
_xcode -1073741819 int
_xptrs 1237856 int
HelpLink null string
HResult -2147467261 int
InnerException { } System.Exception
Message "Object reference not set to an instance of an object." string
Source null string
StackTrace null string
TargetSite <undefined value> System.Reflection.MethodBase


Has someone faced this before?
Any help is appreciated.

Sincerely yours, Oleg Medyanik

Comments (3)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I haven't seen that before. Without a proper stack trace, I'm not sure what it could be.


Actipro Software Support

Posted 19 years ago by medyanik - Software Developer, Direct EDI, Inc.
Avatar
I've put screenshots below.
Some More Info (May be this will help)
- we use Version 2.00.0195 (Full Release).

Non - User Code from Call Stack
actiprosoftware.dockablewindow.dll!ActiproSoftware.DockableWindow.DWManager.OnParentChanged(System.EventArgs e = {System.EventArgs}) + 0x4c bytes

system.windows.forms.dll!System.Windows.Forms.Control.AssignParent(System.Windows.Forms.Control value = {DirectEDI2.MapperApplication.XmlMapFormat.MapEditor}) + 0x10c bytes

system.windows.forms.dll!System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control value = {ActiproSoftware.DockableWindow.DWManager}) + 0x28e bytes

<IMG SRC="http://www.medyanik.nm.ru/shot1.GIF">
<IMG SRC="http://www.medyanik.nm.ru/shot2.GIF">

Sincerely yours, Oleg Medyanik

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, in our OnParentChanged code, it's accessing the FindForm() method and trying to attach to events on the parent form there. There is a try...catch around the call. We should check to see if the FindForm returns a null as well before attempting to attach to the events. We'll change the code to do that for the next release.


Actipro Software Support

The latest build of this product (v2.0.0208) was released 19 years ago, which was after the last post in this thread.