Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Debian 12? #61

Open
docelic opened this issue Oct 18, 2023 · 3 comments
Open

Crash on Debian 12? #61

docelic opened this issue Oct 18, 2023 · 3 comments

Comments

@docelic
Copy link

docelic commented Oct 18, 2023

Hello,

I am trying to run AHK_X11 on Debian 12, and getting the following results:

  1. Compiled AppImage crashes:
./Downloads/ahk_x11-1.0.2-x86_64.AppImage
Invalid memory access (signal 11) at address 0x0
[0x5be890d12579] ?? +101054420166009 in /tmp/.mount_ahk_x1Bn3w2w/AppRun.wrapped
[0x5be890d12540] ?? +101054420165952 in /tmp/.mount_ahk_x1Bn3w2w/AppRun.wrapped
[0x78dfc9ffffd0] ?? +132902562037712 in /lib/x86_64-linux-gnu/libc.so.6
[0x78dfca119d59] ?? +132902563192153 in /lib/x86_64-linux-gnu/libc.so.6
[0x5be890cd701a] __crystal_main +24602 in /tmp/.mount_ahk_x1Bn3w2w/AppRun.wrapped
[0x5be890d55d80] main +160 in /tmp/.mount_ahk_x1Bn3w2w/AppRun.wrapped
[0x78dfc9feb1ca] ?? +132902561952202 in /lib/x86_64-linux-gnu/libc.so.6
[0x78dfc9feb285] __libc_start_main +133 in /lib/x86_64-linux-gnu/libc.so.6
[0x5be890cd0f3e] _start +46 in /tmp/.mount_ahk_x1Bn3w2w/AppRun.wrapped
[0x0] ???
  1. Manually compiled AHK_X11 also crashes, with a little bit more info:
...
... # (Prints the content of AHK install script from line 0 to the end; the first part is removed for brevity.)
...
[debug] 101:
[debug] 102: Uninstall:
[debug] 103:  ; Bin
[debug] 104:  FileDelete, %binary_path%
[debug] 105:
[debug] 106:  ; Icon
[debug] 107:  RunWait, xdg-icon-resource uninstall --context mimetypes --size 48 application-x-%app_name%
[debug] 108:
[debug] 109:  ; Unregister MIME
[debug] 110:  RunWait, xdg-mime uninstall %A_Home%/.local/share/mime/application/x-%app_name%.xml
[debug] 111:  RunWait, update-mime-database %A_Home%/.local/share/mime
[debug] 112:
[debug] 113:  ; Remove apps
[debug] 114:  FileDelete %A_Home%/.local/share/applications/%app_name%.desktop
[debug] 115:  FileDelete %A_Home%/.local/share/applications/%app_name%-compiler.desktop
[debug] 116:  FileDelete %A_Home%/.local/share/applications/%app_name%-windowspy.desktop
[debug] 117:  RunWait, update-desktop-database %A_Home%/.local/share/applications
[debug] 118:
[debug] 119:  MsgBox, Uninstall complete.
[debug] 120: Return
[debug] 121:
[debug] x11: root_win = 1327
Invalid memory access (signal 11) at address 0x0
[0x650226] *Exception::CallStack::print_backtrace:Nil +118 in ./bin/ahk_x11.dev
[0x621f36] ~procProc(Int32, Pointer(LibC::SiginfoT), Pointer(Void), Nil) +310 in ./bin/ahk_x11.dev
[0x76e889d7bfd0] ?? +130741117108176 in /lib/x86_64-linux-gnu/libc.so.6
[0xa3f420] *Run::X11#active_window:UInt64 +208 in ./bin/ahk_x11.dev
[0xa3ed39] *Run::X11#initialize<Run::Runner>:(UInt64 | Nil) +281 in ./bin/ahk_x11.dev
[0xa3ec04] *Run::X11::new<Run::Runner>:Run::X11 +148 in ./bin/ahk_x11.dev
[0xa64f55] *Run::Display#initialize<Run::Runner>:Run::PressedKeys +37 in ./bin/ahk_x11.dev
[0xa64f21] *Run::Display::new<Run::Runner>:Run::Display +273 in ./bin/ahk_x11.dev
[0xa5ea4b] *Run::Runner#run:(Fiber | Run::Thread) +187 in ./bin/ahk_x11.dev
[0x5fd926] __crystal_main +9430 in ./bin/ahk_x11.dev
[0xb6b7d6] *Crystal::main_user_code<Int32, Pointer(Pointer(UInt8))>:Nil +6 in ./bin/ahk_x11.dev
[0xb6b74a] *Crystal::main<Int32, Pointer(Pointer(UInt8))>:Int32 +58 in ./bin/ahk_x11.dev
[0x6280f7] main +215 in ./bin/ahk_x11.dev
[0x76e889d671ca] ?? +130741117022666 in /lib/x86_64-linux-gnu/libc.so.6
[0x76e889d67285] __libc_start_main +133 in /lib/x86_64-linux-gnu/libc.so.6
[0x5fb381] _start +33 in ./bin/ahk_x11.dev
[0x0] ???
  1. All precompiled/release versions newer than 0.5.1 crash in this way. Version 0.5.1 does open the installer.

Any hints maybe? Thanks!

@docelic
Copy link
Author

docelic commented Oct 18, 2023

In case it is related, 0.5.1 works and runs basic scripts that I tried, but opening the window spy reports:

Runtime error in line 21:
Arithmetic overflow.

The current thread will exit.

@docelic
Copy link
Author

docelic commented Oct 18, 2023

On another/different Debian 12 that I tried, the 1.0.2 release works. Interesting.

phil294 added a commit that referenced this issue Oct 21, 2023
@phil294
Copy link
Owner

phil294 commented Oct 21, 2023

Hi @docelic!

Thanks for the report. The detailed stack trace was very helpful. The problem is probably that your system doesn't support _NET_ACTIVE_WINDOW. I didn't know that was actually possible in any non-legacy X11 Linux distro. On the failing Debian distro, are you using a certain special desktop environment or the default Gnome? Did you (un)install anything unusual such as X11 components?

Could you please run xdotool getactivewindow and report the output? You might have to install xdotool if it isn't present already.

I have now added more guards to the active_window check but not released it yet. You can now either pull and build from source again or wait a few days until I have made a new release, so you can try with the binary. No promise it will work though, as I couldn't reproduce it so far.

Edit: Release now already created, so just use the last one 1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants