Trouble finding last line executed with VSNET 2005 before exceptionoccurs

W

Ward Bekker

Hi,

Because of a nasty exception (see below), in some non-managed/non .net
com stuff that my application is talking to, my stack trace (also below)
does not show something useful.

I would like to know what the last called managed code line is before
the exception occured. Some tips to find this?

I've already tried stepping through the code by hand (F11 in vs.net),
but because of a weird timing issue I'm not getting the exception in
that case.

Regards,

Ward


### The Exception ###

A first chance exception of type 'System.AccessViolationException'
occurred in System.Windows.Forms.dll

Additional information: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.

### The Call Stack ###

[Managed to Native Transition]

System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int
dwComponentID, int reason = -1, int pvLoopData = 0) + 0x2ea bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int
reason = -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x17d bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int
reason, System.Windows.Forms.ApplicationContext context) + 0x53 bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm) + 0x2e bytes
MyApp.IDE.exe!GenWise.IDE.MainForm.Main(string[] args =
{Dimensions:[0]}) Line 112 + 0x8 bytes C#
 
G

Guest

It seems to came into the Initializer Form's event ...
Try to run the program in debug mode without making try statement, it should
be stop in the line who calls hte COM.
--
Raffaele Garofalo
Application Developer
MCP


Ward Bekker said:
Hi,

Because of a nasty exception (see below), in some non-managed/non .net
com stuff that my application is talking to, my stack trace (also below)
does not show something useful.

I would like to know what the last called managed code line is before
the exception occured. Some tips to find this?

I've already tried stepping through the code by hand (F11 in vs.net),
but because of a weird timing issue I'm not getting the exception in
that case.

Regards,

Ward


### The Exception ###

A first chance exception of type 'System.AccessViolationException'
occurred in System.Windows.Forms.dll

Additional information: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.

### The Call Stack ###

[Managed to Native Transition]

System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int
dwComponentID, int reason = -1, int pvLoopData = 0) + 0x2ea bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int
reason = -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x17d bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int
reason, System.Windows.Forms.ApplicationContext context) + 0x53 bytes

System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm) + 0x2e bytes
MyApp.IDE.exe!GenWise.IDE.MainForm.Main(string[] args =
{Dimensions:[0]}) Line 112 + 0x8 bytes C#


--
Ward Bekker

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top