• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Application crash with no warning.

My Delphi App using a dll written in VC++ which inturn uses some other dlls and services.
Occasionally my Delphi App closes itself (crashed???) with no warning. (System event log shows some AV @ pointer blah..blah)
I have created try...except in all those suspected locations but not successful.
How do I know whether this problem is due to the dll or other dlls used by this dll.
Or at least how can I isolate the problem so that I can sure of the source.
Thanx.
0
pcssecure
Asked:
pcssecure
  • 8
  • 3
  • 3
  • +1
1 Solution
 
pritaeasSoftware EngineerCommented:
Why not use something like CodeSite to send msgs each time you enter a function. That way you can isolate the last function called. When you have to function, then put some more msgs in there to isolate in what part of the function the crash occurs.

hth, pritaeas
0
 
geobulCommented:
Hi,

Try madExcept from http://www.madshi.net 
I think that's what you need.

Regards, Geo
0
 
pcssecureAuthor Commented:
Thanks Geo.
Looks very promising. www.madshi.net really contains other useful handy tools as well.

Let me comeback to you tomorrow with resuts after testing with madExcept.

Thanks
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
geobulCommented:
Madshi is one of the top experts here (Delphi area). His work is excellent. You won't be disapointed I hope.

Regards, Geo
0
 
pcssecureAuthor Commented:
Hi Geo,
Not successful. My Application crashed again but madExcept didn't caputure it.
What will be the possibilities...?
0
 
MadshiCommented:
Thanks geobul!

pcssecure, what AV pointers does the System event log show?
0
 
geobulCommented:
The right man has come. For nothing, Madshi. I wouldn't say that if I didn't mean it.
0
 
pcssecureAuthor Commented:
Thanks guys. I really appreciate your help and feel comfortable now.
Let me comeback with the AV message....
0
 
pcssecureAuthor Commented:
I've the following AV which is not captured by madExcept.
Any idea what coold be the cause?

The instruction at "0x005df6a1" referenced memory at "0x00000000". The memore could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
0
 
pcssecureAuthor Commented:
In an another instance which is captured by madExcept is
What should I look for in case of application frozen...

exception message : The application seems to be frozen.
main thread ($7ec):
7ffe0304 ???        
77d03e17 user32.dll  SetWindowPos
77d07061 user32.dll  DispatchMessageA

thread $2c8:
7ffe0304 ???        
77f4313d ntdll.dll   NtReplyWaitReceivePortEx
>> created by main thread ($7ec) at:
77c65696 RPCRT4.dll  

thread $5f8:
7ffe0304 ???          
77f4373f ntdll.dll     NtWaitForSingleObject
77e41811 kernel32.dll  WaitForSingleObjectEx
77e4168a kernel32.dll  WaitForSingleObject
....
....
0
 
pcssecureAuthor Commented:
Just to be more clearer,
The above mention
The instruction at "0x005df6a1" referenced memory at "0x00000000". The memore could not be "read".
is from screen captured and the following are from the application log.

Faulting application MyExe.exe, version 0.0.0.0, faulting module kernel32.dll, version 5.2.3790.0, fault address 0x000249d3.
0
 
MadshiCommented:
0x005df6a1 seems to be an address inside of your exe. Try this:

(1) Open the project in Delphi. You need to have *exactly* the same sources with which this 0x005df6a1 exception occurred.
(2) Press F7 to start debugger execution of your program with a single step.
(3) In the Delphi menu search for runtime error.
(4) Give in $5df6a1.

Now Delphi should jump to the code address where this exception occurred.

The application log seems to be something totally different. Not sure what that is.

The madExcept freeze detection probably doesn't help here. I'd turn freeze detection off for now, except if you really have freezes in your application, which you want to track down.
0
 
pcssecureAuthor Commented:
Thanx Madshi.
But I may not have "that exact" version now. What should I really do in future if I encounter this kind of error.
Moreover I'm not able to run Delphi in the deploymnet version. FYI.
0
 
MadshiCommented:
Well, you could store the map file for each version. Then you can lookup crash addresses there. Normally madExcept should do that for you. I don't really know why it doesn't do that in your case!
0
 
pcssecureAuthor Commented:
Actulally I want to split points/or assited answer with geobul. But after accepting Madshi's answer I couldn't do anything.
Sorry. I'll seek administrator's help to do it again.

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now