Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-01

SIGSEGV unknown reason

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexander Todorov

Hello,
I have a program written in Delphi and now it is compiled with FPC 2.0.4 and running on Linux. I am having troubles to find what is causing it to break.
The error I get is EAccessViolation.

A short gdb backtrace is provided below. What makes me puzzle is SYSTEM_RECORDRTTI.

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1518343248 (LWP 12918)]
0x08057c05 in SYSTEM_RECORDRTTI$POINTER$POINTER$TRTTIPROC () (gdb) backtrace
#0 0x08057c05 in SYSTEM_RECORDRTTI$POINTER$POINTER$TRTTIPROC () (gdb) continue
Continuing.

Breakpoint 1, 0x080554a2 in fpc_raiseexception ()
(gdb) backtrace
#0 0x080554a2 in fpc_raiseexception ()
#1 0x0808884d in SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER () #2 0x08058941 in SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER () #3 0x080603aa in SYSTEM_SIGNALTORUNERROR$LONGINT$PSIGINFO$PUCONTEXT () #4 0x080599fc in SYSTEM_LINUX_RESTORE ()
(gdb) continue
Continuing.

Breakpoint 1, 0x080554a2 in fpc_raiseexception ()
(gdb) backtrace
#0 0x080554a2 in fpc_raiseexception ()
#1 0x0808884d in SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER () #2 0x08058941 in SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER () #3 0x080589e8 in SYSTEM_HANDLEERRORFRAME$LONGINT$POINTER () #4 0x08058a14 in SYSTEM_HANDLEERROR$LONGINT ()
#5 0x0805ad2b in SYSTEM_CONCAT_TWO_BLOCKS$PMEMCHUNK_VAR$PMEMCHUNK_VAR () #6 0x0805add0 in SYSTEM_TRY_CONCAT_FREE_CHUNK_FORWARD$PMEMCHUNK_VAR () #7 0x0805adea in SYSTEM_TRY_CONCAT_FREE_CHUNK$PMEMCHUNK_VAR$$PMEMCHUNK_VAR () #8 0x0805b40b in SYSTEM_SYSFREEMEM_VAR$PMEMCHUNK_VAR$$LONGINT () #9 0x0805b45f in SYSTEM_SYSFREEMEM$POINTER$$LONGINT () #10 0x0805a657 in SYSTEM_FREEMEM$POINTER$$LONGINT () #11 0x0804b9cb in fpc_ansistr_decr_ref ()
#12 0xa57fdb60 in ?? ()

Next entries are from my program:

#13 0x080f563d in TNCONNECTION__SENDCOMMAND (ACOMM=0x9a0c7488, this=0xa7a7f178) at nconnection.pas:170
#14 0x080f5a05 in TNCONNECTION__SENDSERIAL (AOBJ=0x9a0a14c8, ACOMMANDID=NCERROR, this=0xa7a7f178) at nconnection.pas:224

.... continues ...

Any hints what may cause this backtrace? I suspect assignment or comparisson of variant and/or strings because they are used havily under Delphi.

Any comments are welcome.