Yes, I am in on Linux.
I crafted a simple test project (attached), where:
procedure TForm1.Button1Click(Sender: TObject);
var
event: TNotifyEvent;
begin
event := nil;
event(nil); // <-- problem
end;
In the Lazarus debugger, I can see that the problem lies in "event(nil)":
#0 at :-1 #1 TForm1.Button1Click(TForm1($00007EFE14BE9910), TObject($00007EFE14BEA0F0)) at /home/senbuvis/Poligonas/t_13/Testas_13/unit1.pas:59 <---- problem #2 TCONTROL.CLICK(TCONTROL($00007EFE14BEA0F0)) at /home/senbuvis/Git/lazarus/lcl/include/control.inc:2968 #3 TBUTTONCONTROL.CLICK(TBUTTONCONTROL($00007EFE14BEA0F0)) at /home/senbuvis/Git/lazarus/lcl/include/buttoncontrol.inc:56 #4 TCUSTOMBUTTON.CLICK(TCUSTOMBUTTON($00007EFE14BEA0F0)) at /home/senbuvis/Git/lazarus/lcl/include/buttons.inc:169 #5 TCUSTOMBUTTON.EXECUTEDEFAULTACTION(TCUSTOMBUTTON($00007EFE14BEA0F0)) at /home/senbuvis/Git/lazarus/lcl/include/buttons.inc:144 ... ... |
Line index #1 from the debugger listing points to the address $46A67F in assembler window:
/home/senbuvis/Poligonas/t_13/Testas_13/unit1.pas:57 begin 000000000046A660 55 push rbp 000000000046A661 4889E5 mov rbp,rsp 000000000046A664 488D6424E0 lea rsp,[rsp-$20] 000000000046A669 48897DF0 mov [rbp-$10],rdi 000000000046A66D 488975F8 mov [rbp-$08],rsi /home/senbuvis/Poligonas/t_13/Testas_13/unit1.pas:58 event := nil; 000000000046A671 31D2 xor edx,edx 000000000046A673 48C745E000000000 mov qword ptr [rbp-$20],$00000000 000000000046A67B 488955E8 mov [rbp-$18],rdx /home/senbuvis/Poligonas/t_13/Testas_13/unit1.pas:59 event(nil); <----- problem 000000000046A67F 4889D7 mov rdi,rdx 000000000046A682 31F6 xor esi,esi 000000000046A684 FF55E0 call qword ptr [rbp-$20] /home/senbuvis/Poligonas/t_13/Testas_13/unit1.pas:60 end; 000000000046A687 4889EC mov rsp,rbp 000000000046A68A 5D pop rbp 000000000046A68B C3 ret 000000000046A68C 0000 add [rax],al UNIT1$_$TFORM1_$__$$_BUTTON1CLICK$TOBJECT+46 000000000046A68E 0000 add [rax],al
|
However, the program's call stack log skips that essential (for me) address where "event(nil)" is located:
.... Message: Access violation $0000000000000000 (line #0 from Lazarus log) $000000000061F526 CLICK, line 2968 of include/control.inc (line #2 from Lazarus log) $0000000000662566 CLICK, line 56 of include/buttoncontrol.inc (line #3 from Lazarus log) $0000000000662E11 CLICK, line 169 of include/buttons.inc (line #4 from Lazarus log) ..... ..... ..... |
Hmm... there address $00000000 is included.
So conclusion is: the exception call stack log is missing some lines (addresses) of my code because program's exception call stack reporting code is not powerful enough or data is modified after exception occurs?