G
Graeme Neath
I'm having a very bizarre problem. I have a vb.net application which uses
the ESRI MapObjects 2.2 component (unmanaged code). When I use the
MapObjects built-in function 'CopyMap' to copy the map to the clipboard my
app will crash sometimes.
Even stranger, sometimes if I copy the map to the clipboard (and my app
doesnt crash immediately), if I then launch Word my app will spontaneously
crash!
The CopyMap function takes a parameter 'scale' to determine how accurate an
image to put into the clipboard. It appears that a scale of 2 is ok, but
anything larger than that causes the problem. Is there a maximum size of
object that I can safely put in the clipboard?
In both cases I get the following error and stack trace:
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xd4 bytes
system.windows.forms.dll!System.Windows.Forms.Control.DefWndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x2e8 bytes
system.windows.forms.dll!System.Windows.Forms.AxHost.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x34e bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 20449702, int msg = 15, int wparam = 0, int lparam = 0) + 0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason = -1,
System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {link.Splash}) + 0x34 bytes
I would be most grateful for any insights!
Cheers
Graeme Neath
the ESRI MapObjects 2.2 component (unmanaged code). When I use the
MapObjects built-in function 'CopyMap' to copy the map to the clipboard my
app will crash sometimes.
Even stranger, sometimes if I copy the map to the clipboard (and my app
doesnt crash immediately), if I then launch Word my app will spontaneously
crash!
The CopyMap function takes a parameter 'scale' to determine how accurate an
image to put into the clipboard. It appears that a scale of 2 is ok, but
anything larger than that causes the problem. Is there a maximum size of
object that I can safely put in the clipboard?
In both cases I get the following error and stack trace:
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xd4 bytes
system.windows.forms.dll!System.Windows.Forms.Control.DefWndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x2e8 bytes
system.windows.forms.dll!System.Windows.Forms.AxHost.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x34e bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 20449702, int msg = 15, int wparam = 0, int lparam = 0) + 0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason = -1,
System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {link.Splash}) + 0x34 bytes
link.exe!link.aspSplash.Main() Line 3 + 0x1d bytes Basic
I would be most grateful for any insights!
Cheers
Graeme Neath