[DUG] app terminating abruptly

Robert martin rob at wildsoft.co.nz
Wed Nov 30 08:58:02 NZDT 2005


Hi

Its often hard to find bugs with Threaded code.  We have had our app 
terminate unexpected as you describe because one of the settings on a 
database component was wrong!  I have actually had this issue where the 
app was terminating because an error occurred in a thread and was being 
trapped and (inappropriately) displaying a MessageDlg to display the 
error.  This was causing a conflict with the VCL and closing the app 
(not displaying the error).  Do you have any messageDlgs etc in your 
thread (I know its left field)? 

You might also want to log where your code is running in a file log, 
this might give you a hint as to where the error is occurring.




Rob Martin
Software Engineer

phone +64 03 377 0495
fax   +64 03 377 0496
web www.chreos.com

Wild Software Ltd



Ross Levis wrote:

>The problem code I fixed turned out to not be the cause of the app
>termination.  It's still occuring, just less often for some reason.
>
>While I'm running in the debugger, I occasionally get an access
>violation at 0220F750.  It is always the same location and I suspect 
>this must be causing the instant termination when not running in the 
>debugger.
>
>In the CPU window if I click "Caller", it jumps to a function
>called IsChild inside USER32.DLL.  EAX = 7FFDD000
>
>I'm not sure where to go from here to track this down to code in my app!
>
>I don't think it is a stack overflow problem since the program has been 
>running for 2 days on another PC now, and I've had the problem occur in 
>the debugger within only a few minutes.
>
>It is not a thread issue.  The error is occuring in the main thread and 
>I've checked the other thread code and no unprotected access of the main 
>thread is occuring.
>
>The only one thought I had was with the fisSharedMemory component.  This 
>uses a file mapping system but without a file.  I'm accessing the same 
>memory block written in one app and being read in another app at 50ms 
>intervals in both apps, with no locking protection or anything like 
>that.  I'm not worried about reading incorrect data, but surely this 
>cannot cause an access violation to a memory location that seems totally 
>unrelated, or could it?
>
>Cheers,
>Ross.
>
>_______________________________________________
>Delphi mailing list
>Delphi at ns3.123.co.nz
>http://ns3.123.co.nz/mailman/listinfo/delphi
>
>  
>


More information about the Delphi mailing list