[Lazarus] Tracking down an intermittent termination exception

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Mar 26 10:54:28 CET 2013


On Tue, 26 Mar 2013 09:39:50 +0000
Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:

> I've got a program here with main and background thread, it doesn't do 
> anything fancy like explicitly hooking the event loop. Intermittently it 
> displays something like this during termination:
> 
> An unhandled exception occurred at $08080639 :
> EInOutError :
>    $08080639  CDONECRITICALSECTION,  line 503 of ../unix/cthreads.pp
>    $08075B84  DONECRITICALSECTION,  line 199 of 
> /usr/local/src/fpc/fpcbuild-2.6.2/fpcsrc/rtl/inc/thread.inc
>    $080D5404  COMMONCLEANUP,  line 1751 of 
> /usr/local/src/fpc/fpcbuild-2.6.2/fpcsrc/rtl/objpas/classes/classe 
> s.inc
>    $080DD8A8  CLASSES_finalize,  line 51 of ../unix/classes.pp
>    $08072DAF  FINALIZEUNITS,  line 833 of 
> /usr/local/src/fpc/fpcbuild-2.6.2/fpcsrc/rtl/inc/system.inc
>    $08072F28  INTERNALEXIT,  line 886 of 
> /usr/local/src/fpc/fpcbuild-2.6.2/fpcsrc/rtl/inc/system.inc
>    $08073038  DO_EXIT,  line 937 of 
> /usr/local/src/fpc/fpcbuild-2.6.2/fpcsrc/rtl/inc/system.inc
>    $0805E44B  main,  line 69 of BorgUM.lpr
>    $B6E57CA6
> 
> Looking at classes.inc, I see that the affected line is
> 
>    DoneCriticalSection(SynchronizeCritSect);
> 
> Assuming that this is a problem in my own code, what sort of thing 
> should I be looking for?

Double call of DoneCriticalSection, missing InitCriticalSection, heap
corruption.

 
> Laz+LCL 1.1, FPC 2.6.2, Linux x86. This might in practice happen most 
> often when X is tunneled over ssh: could this mess up LCL termination?

As far as I know: no

Mattias
 




More information about the Lazarus mailing list