Sign in Join

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

Mailing lists / lazarus / 2011-09

App Seg Faults when -gh is unchecked

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

John Repucci

I've had this happen to me twice now.

I'm developing the app in the Lazarus IDE and all is well. Then I uncheck the -gh option ("Use Heaptrc Unit"), run my program and I get a Segmentation Fault before any of the program shows up. This happens both within the IDE (via F9) and when I run the program outside of the IDE.

When I remove heaptrc from my uses clause AND uncheck -gh, all is well.

Thoughts? Is this a bug which I should report?

0.9.31-31848-2.5.1, win32-Vista.

Here is the gdb output.

(gdb) file rim.exe
Reading symbols from C:\Programming\RIM/rim.exe...done. (gdb) run
Starting program: C:\Programming\RIM/rim.exe
[New Thread 2996.0x1468]

Program received signal SIGSEGV, Segmentation fault. 0x005b4a3f in HEAPTRC_UPDATECRC32$LONGWORD$formal$LONGWORD$$LONGWORD () (gdb) info stack
#0 0x005b4a3f in HEAPTRC_UPDATECRC32$LONGWORD$formal$LONGWORD$$LONGWORD () #1 0x002b3508 in ?? ()
#2 0x0040e2f8 in SYSTEM_REALLOCMEM$POINTER$LONGWORD$$POINTER () #3 0x0043f999 in CLASSES_TFPLIST_$__SETCAPACITY$LONGINT () #4 0x002229e8 in ?? ()
#5 0x005bb7e0 in DBCTRLS_init () at lcl_dbnav_images.lrs:101 #6 0x0040d9f4 in fpc_initializeunits ()
#7 0x7ffd9000 in ?? ()
#8 0x00412421 in SYSTEM_EXE_ENTRY$TENTRYINFORMATION () -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110903/fb4d59fe/attachment.html>

Reply by email

Ludo Brands
to John Repucci
Earlier message 33 lines
-----Message d'origine----- De : John Repucci [mailto:] Envoy? : dimanche 4 septembre 2011 03:47 ? : Objet : [Lazarus] App Seg Faults when -gh is unchecked I've had this happen to me twice now. I'm developing the app in the Lazarus IDE and all is well. Then I uncheck the -gh option ("Use Heaptrc Unit"), run my program and I get a Segmentation Fault before any of the program shows up. This happens both within the IDE (via F9) and when I run the program outside of the IDE. When I remove heaptrc from my uses clause AND uncheck -gh, all is well. Thoughts? Is this a bug which I should report? If understand you correctly, the app crashes when heaptrc is in the uses clause and -gh unchecked. Where do you use heaptrc ? The heaptrc unit, as all memory managers, should be the first unit in the lpr. The -gh compiler options is doing exactly that. Manually inserting heaptrc is discouraged. The stack trace indicates that a memory block is reallocated that was allocated before heaptrc was loaded and heaptrc doesn't find the crc for that block. Ludo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110904/d967bb51/attachment.html>

Reply by email