View Single Post
  #3  
Old 09-25-2015, 18:31
TechLord TechLord is offline
Banned User
 
Join Date: Mar 2005
Location: 10 Steps Ahead of You
Posts: 759
Rept. Given: 384
Rept. Rcvd 247 Times in 112 Posts
Thanks Given: 789
Thanks Rcvd at 2,022 Times in 571 Posts
TechLord Reputation: 200-299 TechLord Reputation: 200-299 TechLord Reputation: 200-299
Quote:
I have patched a program, which now starts O.K. but runs for exactly 4 min and then unexpectedly terminates.

If I tried to trace the exe/dll which throws the exception, but the debugger does not give me any clues.

How can I trace the exception event?
First and foremost, it is critical to understand FULLY , the way Structured Exception Handling (SEH) is implemented in Windows.

This is a very CONCISE but a very classic paper :
Quote:
https://www.microsoft.com/msj/0197/Exception/Exception.aspx
After that, you can go through this :
Tracing Exception Handlers : http://www.hexblog.com/?p=19

That gives an excellent overview of the entire process.

In all probability, your program is simply having a "timer" that terminate the process, after 4 minutes, if the required conditions are not met, by using SEH ...

You would need to follow through by checking the entire SEH "tree" to see from WHICH level exactly the exception is generated and at which level of the SEH tree is is actually handled.

For an "unhandled" exception , it can simply traverse many levels above right up to the TOP level, before showing it to the user or terminating the process.
Reply With Quote
The Following 5 Users Say Thank You to TechLord For This Useful Post:
abhi93696 (03-14-2017), rcer (09-26-2015), sh3dow (09-26-2015), tonyweb (12-20-2016)