a.schaefer-esri-de-esridist

AccessViolationException in MapControlApplication Measure Tool

Discussion created by a.schaefer-esri-de-esridist on Nov 27, 2009
Latest reply on Dec 1, 2009 by rgottschalk-esristaff
Hi.

- I've created a simple standard MapControlApplication in VisualStudio 2008 on Vista 32-bit.

- I run the application and click the "Measure" Tool.

- A AccessViolationException is thrown. Details below.

This is reproducable at:

- Windows Vista 32-bit
- Windows 7 64-bit (project application set to 32-bit)

System.AccessViolationException was unhandled 
Message="Attempted to read or write protected memory. This is often an indication that other memory has been corrupted." 
Source="System.Windows.Forms" 
StackTrace: 
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) 
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) 
at System.Windows.Forms.Control.DefWndProc(Message& m) 
at System.Windows.Forms.Control.WmMouseMove(Message& m) 
at System.Windows.Forms.Control.WndProc(Message& m) 
at System.Windows.Forms.AxHost.WndProc(Message& m) 
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) 
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) 
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) 
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) 
at System.Windows.Forms.Application.Run(Form mainForm) 
at MapControlApplication2.Program.Main() in C:\Users\axxl\Documents\Visual Studio 2008\Projects\MapControlApplication2\MapControlApplication2\Program.cs:Zeile 27. 
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
at System.Threading.ThreadHelper.ThreadStart() 
InnerException:  


Very simple to reproduce. Can anyone reproduce it also?

Best regards,
Axel

Outcomes