Forum > Debugger

Mysterious Debugger message

(1/2) > >>

winni:
Hi!

A simple App runs without problems - all checks enabled.

But when I want to close it - then it crashes with 216 General Protection fault


If I run it from a Konsole then after closing this mysterious message appears:



--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---[DEBUG] Name com.canonical.AppMenu.Registrar does not exist on the session bus Exception at 00000000004372D7: EAccessViolation:Access violation.WARNING: TButton.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event? 
The Buttons have only onClick assigned.

The Debugger shows:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---00000000004372ED c3                       ret    00000000004372EE 0000                     add    %al,(%rax)SYSTEM_$$_WAITFREE_VAR$PMEMCHUNK_VAR 00000000004372F0 53                       push   %rbx00000000004372F1 4889fb                   mov    %rdi,%rbx00000000004372F4 488d3d55867600           lea    0x768655(%rip),%rdi        # 0xb9f950 <U_$SYSTEM_$$_HEAP_LOCK>00000000004372FB e8d00c0000               call   0x437fd0 <SYSTEM_$$_ENTERCRITICALSECTION$TRTLCRITICALSECTION>0000000000437300 4889d8                   mov    %rbx,%rax0000000000437303 488b5008                 mov    0x8(%rax),%rdx0000000000437307 488b92b8000000           mov    0xb8(%rdx),%rdx000000000043730E 48895018                 mov    %rdx,0x18(%rax)0000000000437312 488b5008                 mov    0x8(%rax),%rdx0000000000437316 488982b8000000           mov    %rax,0xb8(%rdx)000000000043731D 488d3d2c867600           lea    0x76862c(%rip),%rdi        # 0xb9f950 <U_$SYSTEM_$$_HEAP_LOCK>0000000000437324 e8e70c0000               call   0x438010 <SYSTEM_$$_LEAVECRITICALSECTION$TRTLCRITICALSECTION>0000000000437329 5b                       pop    %rbx000000000043732A c3                       ret    000000000043732B 0000                     add    %al,(%rax)000000000043732D 0000                     add    %al,(%rax)000000000043732F 00                       add    %dl,0x41(%rbx)SYSTEM_$$_SYSFREEMEM_FIXED$PFREELISTS$PMEMCHUNK_FIXED$$QWORD 0000000000437330 53                       push   %rbx0000000000437331 4154                     push   %r120000000000437333 4155                     push   %r130000000000437335 4889f3                   mov    %rsi,%rbx 

Has anyone an idea what the hell is going on?

Linux64 fpc 3.2 Lazarus 2.0.12

Winni

Martin_fr:
The first bit "com.cannonical" is OS related.

The last bit "refcount" could be a consequence of the crash. Strange though, I would have expected it before the crash.
Did you press any button, and could you be inside that button's "OnClick" (or MouseDown/Up) code?

As for the Access-violation. This is what would stop the app in the debugger.
If you are in some package for which no debug info was generated then you want see any sources. (You can add debug info to most packages, using "Additions and Overrides".

Have you opened the debuggers stack window? What does it show?

winni:
Thanx Martin_fr

Some more info:

Start in Konsole. If I stop the app with ALT-F4 the message about the button disappears and there is only left:


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---[DEBUG] Name com.canonical.AppMenu.Registrar does not exist on the session bus Exception at 0000000000437307: EAccessViolation:Access violation. 
Second: The crash does not happen always. I have tried to detect some logic, but that was not successful.

Third: I am not alone. This problem appeared in 2019 but without a solution:

https://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg52052.html

And I forgot: The cursor of the assembler is at


--- Code: ASM  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---0000000000437307 488b92b8000000           mov    0xb8(%rdx),%rdx 
Winni

Bart:
I remember having a similar issue when the OnClick actually lead to the destruction (freeing) of the control.
I solved that by calling Application.ReleaseComponent instead.

May or may not be applicable to your problem.

Bart

Martin_fr:
If it appears "at random", it may be a double free / dangling pointer.

As you are on Linux, run your app under
  valgrind --tool=memcheck   yourapp

Navigation

[0] Message Index

[#] Next page

Go to full version