Hi guys,

I hope you can help me with this one. Using FPC 2.0.4 and Lazarus 0.9.23 rev.11447M. I am converting my main Delphi project to Lazarus under Linux/GTK1 and I get an odd error. As far as I can determine the error happens when a function in another unit is called the second time.

The error dialog says:
Raised exception class RunError(202)"

The Execution Paused dialog after that says:
Adress: $08062902
Procedure: SYSTEMHANDLEERRORADDFRAME$LONGINT$POINTER$POINTER

gdb backtrace:
(gdb) bt
#0  0x0805f482 in fpc_raiseexception ()
#1  0x0818d88d in ?? ()
#2  0x00000000 in ?? ()
(gdb)

If I run under gdb without putting in "break fpc_raiseexception", when the error happens the console shows:

TApplication.HandleException Unknown Run-Time error : 202
Stack trace:
$08062511
$08137BA8  XMLWRITEDD,  line 727 of ConvUnit.pas
$080E7A51  TMZ__SVD,  line 102 of MZJ.pas
$080F1D70  TPZ__CDDA,  line 8603 of PZJ.pas
$080AD251  TH__UDSSCR,  line 12371 of HJ.pas
$080EFD2F  TVZ__CU1CLICK,  line 171 of VZJ.pas
$08205826  TCONTROL__CLICK,  line 1993 of ./include/control.inc
$0821712D  TBUTTONCONTROL__CLICK,  line 57 of ./include/buttoncontrol.inc
$082177F1  TCUSTOMBUTTON__CLICK,  line 186 of ./include/buttons.inc
$08217C1D  TBUTTON__CLICK,  line 312 of ./include/buttons.inc
$082179A8 TCUSTOMBUTTON__WMDEFAULTCLICKED, line 241 of ./include/buttons.inc
$0805EA00
$08204DDE  TCONTROL__WNDPROC,  line 1545 of ./include/control.inc
$081FC5BA  TWINCONTROL__WNDPROC,  line 3498 of ./include/wincontrol.inc
$08299885  DELIVERMESSAGE,  line 3576 of gtkproc.inc
$082B54EC  GTKWSBUTTON_CLICKED,  line 958 of gtkwsstdctrls.pp
$B7CE8B06  LAZARUSPACKAGEINTF_finalize,  line 49 of ./unix/cupsdyn.pp

Which seems to confirm that the ConvUnit.XMLWRITEDD function is being called from the TMZ_SVD procedure when the error happens. If I put in a showmessage() as the first thing in XMLWRITEDD code, it does not get shown. There is no problem running this code under Delphi, and looking at it I don't see anything abnormal it that location. One strange thing is that I commented out some code in the TH__UDSSCR procedure after the point where the code branches to the error location, which code-wise is quite far away, to trace where its happening and problem disappeared, but then reappeared even after commenting and uncommenting the same code to trace it. If I run without a debugger, if I click to ignore the error, the program runs fine and will even run through the same code again without any further errors. There is at least one other different location in the program where a seemingly normal function call is causing an error for no apparent reason. Any ideas?

George



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to