Giter Club home page Giter Club logo

Comments (8)

complexlogic avatar complexlogic commented on May 16, 2024

How are you executing the script? Can you post the relevant part of your config file?

from flex-launcher.

smoores-dev avatar smoores-dev commented on May 16, 2024

The script is being executed by systemd just by virtue of being in that directory. The only relevant part of my config (at least, I think) is:

[Hotkeys]
Hotkey1=#40000065;:sleep

from flex-launcher.

smoores-dev avatar smoores-dev commented on May 16, 2024

More info about system-sleep if you're interested!

from flex-launcher.

smoores-dev avatar smoores-dev commented on May 16, 2024

I tried a few more things out just to have some more data points.

If I have a script like this:

# ~/.bin/suspend.sh
#!/usr/bin/env bash

/usr/bin/systemctl suspend

And leave the system-sleep script as above, and configure Flex Launcher with:

Hotkey1=#40000065;/home/<username>/.bin/suspend.sh

Flex Launcher also crashes.

If I instead include the cec command in the script itself (and remove the system-sleep script):

# ~/.bin/cec-suspend.sh
#!/usr/bin/env bash

/bin/echo 'standby 0' | /usr/bin/cec-client -s
/usr/bin/systemctl suspend
Hotkey1=#40000065;/home/<username>/.bin/cec-suspend.sh

Then I need to run flex-launcher as root (so that cec-client has the permissions it needs) ... and that also gets a crash.

It's weird because in all of these scenarios, the scripts all execute successfully (the cec-client turns off the TV and the computer is out to sleep), but then Flex Launcher gets a seg fault!

from flex-launcher.

complexlogic avatar complexlogic commented on May 16, 2024

It would help you you could use gdb to trace the segfault, which may assist in diagnosis. Build Flex Launcher from source, but pass -DCMAKE_BUILD_TYPE=Debug during the CMake generation step which will retain the debug symbols in the executable. Then, execute the following:

  1. gdb /path/to/flex-launcher
  2. run -d
  3. Reproduce the segfault
  4. backtrace

Then post the output.

from flex-launcher.

smoores-dev avatar smoores-dev commented on May 16, 2024
Thread 1 "flex-launcher" received signal SIGSEGV, Segmentation fault.
0x00007ffff7cfcf48 in decoration_frame_configure (frame=0x5555556b58a0, configuration=0x555555ec6030, user_data=0x5555555e1ba0) at ./src/video/wayland/SDL_waylandwindow.c:782
782        ./src/video/wayland/SDL_waylandwindow.c: Directory not empty.
(gdb) backtrace
#0    0x00007ffff7cfcf48 in decoration_frame_configure
      (frame=0x5555556b58a0, configuration=0x555555ec6030, user_data=0x5555555e1ba0)  at ./src/video/wayland/SDL_waylandwindow.c:782
#1    0x00007ffff74027ec in xdg_surface_configure
      (user_data=0x5555556b58a0, xdg_surface=<optimized out>, serial=355)
#2    0x00007ffff6faae2e in ffi_call_unix64 () at ../src/x86/unix64.S:105
#3    0x00007ffff6fa7493 in ffi_call_int
      (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:672

from flex-launcher.

complexlogic avatar complexlogic commented on May 16, 2024

Thanks. Looks like it's actually an issue in SDL, then. Could you try to run SDL_VIDEODRIVER=x11 flex-launcher and try to reproduce again? That will enable XWayland compatibility mode, which would confirm it's an issue with the SDL Wayland backend if the segfault can not be reproduced.

from flex-launcher.

smoores-dev avatar smoores-dev commented on May 16, 2024

Interestingly, I still see a seg fault (and still seemingly in SDL):

Thread 1 "flex-launcher" received signal SIGSEGV, Segmentation fault.
0x00007ffff7cfcf5c in SDL_IBus_UpdateTextRect (rect=0x5555555f3c370), at ./src/core/linux/SDL_ibus.c:667
667      ./src/core/linux/SDL_ibus.c: Directory not empty.
(gdb) backtrace
#0    0x00007ffff7cfcf5c in SDL_IBus_UpdateTextRect (rect=0x5555555f3c370 at ./src/core/linux/SDL_ibus.c:667
#1    0x00007ffff7dd1086 in SDL_IME_UpdateTextRect (rect=0x0) at ./src/core/linux/SDL_ime.c:142
#2    X11_DispatchEvent (_this=0x5555555abde0, _this@entry=<error reading variable: Cannot access memory at address 0x7fffffffdcb8, xevent=0x7fffffffdce0, xevent@entry=<error reading variable: Cannot access memory at address 0x7fffffffdca8)
      at ./src/video/x11/SDL_x11events.c:1169
#3    0x00007ffff7dd297b in X11_PumpEvents (_this=<error reading variable: Cannot access memory at address 0x7fffffffdcb8)
      at ./src/video/x11/SDL_x11events.c:1715
Backtrace stopped: Cannot access memory at address 0x7fffffffddd8

from flex-launcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.