AccessViolationException help
-
Somehow an app I've written is generating this exception and I could use some help figuring out how. In the VS debugger the app stops at the
Application.Run
line when the exception occurs and the Exception helper doesn't offer anything that seems useful, just a statement that memory is corrupt somewhere. The stacktrace doesn't offer much either other than to tell me that it's crashing in some native Windows Forms method (full stacktrace below). To make things even easier, I can't even nail down a repeatable process to recreate the exception, it just seems to happen every now and then when I perform certain steps in the GUI. I've followed all of the suggestions that I can find on MSDN and the rest of Google, but to no avail. Things that I've already tried include removing all references to unmanaged code, reinstalling .Net and double buffering elements of the GUI. Can anyone offer any advice or ideas on how to diagnose this? Stacktrace: 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 Sentry.SensorEditor.Program.Main() MSDN[^] -
Somehow an app I've written is generating this exception and I could use some help figuring out how. In the VS debugger the app stops at the
Application.Run
line when the exception occurs and the Exception helper doesn't offer anything that seems useful, just a statement that memory is corrupt somewhere. The stacktrace doesn't offer much either other than to tell me that it's crashing in some native Windows Forms method (full stacktrace below). To make things even easier, I can't even nail down a repeatable process to recreate the exception, it just seems to happen every now and then when I perform certain steps in the GUI. I've followed all of the suggestions that I can find on MSDN and the rest of Google, but to no avail. Things that I've already tried include removing all references to unmanaged code, reinstalling .Net and double buffering elements of the GUI. Can anyone offer any advice or ideas on how to diagnose this? Stacktrace: 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 Sentry.SensorEditor.Program.Main() MSDN[^]The crash has probably happened in native code inside a GUI component that you're using. For any more information you'll have to use the native code debugger, then you might get more information.
DoEvents
: Generating unexpected recursion since 1991