[Lazarus] App crash at TScreen.GetCustomFormsZOrdered

Petr Hlozek petr at ok2cqr.com
Fri Jun 27 15:51:08 CEST 2014


>> I added to all autocreated and used form into OnDestroy what you've
>> writen to me, in Project -> Option -> Debugging checked the -gh
>> option, Run -> Ru parameters in Environment tab added  HEAPTRC
>> variable.
>>
>> After the crash, the callstack window shows
>>
>> #0 HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD at :0
>
> This could mean that you double free an object/record.
> Make sure all references become nil when an object is freed.

I'd like to do that and hopefuly already did but the app is quite big
and I'm not sure fo 100%. Is there any way how to find out with any
utility?

>> When I click to View source, it jumps to the top of the heaptrc unit.
> If there are other lines (not #0, but #1, #2, ...) click on them.

There is only #1 line with this:
#1 ?? at :0

Nothing more.

>> When I run the app from terminal with environment variable set, I got this:
>>
>> An unhandled exception occurred at $000000000044139A :
>> EAccessViolation :
>>   $000000000044139A
>>   $00000000005DDD29
>>
>> The same like before :(
>
> Something destroys your heap.
> Have you tried gdb?
>
> Heaptrc has some more options.

I trid also gdb but I'm not so keen with it. When I tried bt after it
crashed, I got this:

Program received signal SIGSEGV, Segmentation fault.
0x000000000044139a in HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD ()
(gdb) bt
#0  0x000000000044139a in HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD ()
#1  0x0000000000000000 in ?? ()
(gdb)

Petr




More information about the Lazarus mailing list