Question

How can I debug this error?

Access violation at address 00498AD7 in module 'MyApp.exe' read of address 00000008

I have an app that has a pagecontrol aligned with client, and when I am in a particular tabSheet, if I click the Windows Minimize button, I get access violation error (and the app minimizes). I can maximize it back looks like nothing's wrong. But that message annoys me and my customer. Also it only happens in one TabSheet. When I'm in any other Tabsheet, thye error does not appear when I minimize.

I wanted to enter the number of the error in Search | Go to Address... but it is not enabled so I cant. What can be the problem? I do not work with dynamically created components, they are all added at designtime, so there is no way that this is a Free problem.

How do I track the source of this problem? Thanks

Was it helpful?

Solution

You are accessing a variable at an address of 8. This usually means that you have a nil object reference and you are trying to access the member at offset 8. The address 00498AD7 is the location in the executable of the code that caused the fault. If you have a detailed map file for your executable you could cross-reference that address to a function in your program. However, that is usually of limited use.

It's easy enough to debug this. Make sure that the debugger options are configured to break in the IDE when an exception is raised. Then run under the debugger and when the error occurs the debugger will highlight the line of code which caused the error. Or perhaps you have to look up the call stack a couple of levels.

Beyond the immediate problem, using a tool like madExcept or EurekaLog will allow you to debug such problems when they occur remote to you. For instance on your customers' machines.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top