Giter Site home page Giter Site logo

RetroArch segfaults on CAGE about cage HOT 8 CLOSED

vanfanel avatar vanfanel commented on June 28, 2024
RetroArch segfaults on CAGE

from cage.

Comments (8)

vanfanel avatar vanfanel commented on June 28, 2024 1

@joggee-fr Thanks a lot for fixing this! I am closing the issue, as it's not an issue anymore :)

from cage.

joggee-fr avatar joggee-fr commented on June 28, 2024

Hi @vanfanel,
Could you provide the used command line and Cage debug logs?

from cage.

vanfanel avatar vanfanel commented on June 28, 2024

@joggee-fr Yes, of course, sorry for my initially poor report.

This is the command line I am using to run it:

cage 2> cage.log /usr/local/bin/retroarch

Here's the resulting log:
cage.log

That is with a debug build of cage, of course.

Other programs like foot terminal emulator, or any SDL2 programs, seem to run without problems.

from cage.

joggee-fr avatar joggee-fr commented on June 28, 2024

@vanfanel, according to logs the child process launched by Cage i.e. /usr/local/bin/retroarch exits with signal 11 (SIGSEGV). That's why Cage exits with this error code. Do you have logs for retroarch? Maybe you can also extract info from a coredump to know the reason of such an issue.
It could be an issue analogue to #279.

from cage.

vanfanel avatar vanfanel commented on June 28, 2024

@joggee-fr I have the GDB session log that shows the backtrace to the RetroArch segfault:

Thread 1 "ra_debug" received signal SIGSEGV, Segmentation fault.
0x00007ffff7ea3830 in wl_proxy_get_version () from /usr/local/lib64/libwayland-client.so.0
(gdb) bt
#0  0x00007ffff7ea3830 in wl_proxy_get_version () from /usr/local/lib64/libwayland-client.so.0
#1  0x000055555587b3de in zwp_relative_pointer_manager_v1_get_relative_pointer (
    zwp_relative_pointer_manager_v1=0x0, pointer=0x55555666d350)
    at input/common/../../gfx/common/wayland/relative-pointer-unstable-v1.h:176
#2  0x000055555587c39c in wl_seat_handle_capabilities (data=0x55555666f4c0, seat=0x555556663f00, caps=3)
    at input/common/wayland_common.c:494
#3  0x00007ffff7cc6f7a in ?? () from /lib/x86_64-linux-gnu/libffi.so.8
#4  0x00007ffff7cc640e in ?? () from /lib/x86_64-linux-gnu/libffi.so.8
#5  0x00007ffff7cc6b0d in ffi_call () from /lib/x86_64-linux-gnu/libffi.so.8
#6  0x00007ffff7ea5cac in wl_closure_invoke () from /usr/local/lib64/libwayland-client.so.0
#7  0x00007ffff7ea1c39 in dispatch_event.isra () from /usr/local/lib64/libwayland-client.so.0
#8  0x00007ffff7ea3574 in wl_display_dispatch_queue_pending () from /usr/local/lib64/libwayland-client.so.0
#9  0x00007ffff7ea3acf in wl_display_roundtrip_queue () from /usr/local/lib64/libwayland-client.so.0
#10 0x000055555587cae3 in wl_registry_handle_global (data=0x55555666f4c0, reg=0x555556664ae0, id=23, 
    interface=0x555556660960 "wl_output", version=4) at input/common/wayland_common.c:713
#11 0x00007ffff7cc6f7a in ?? () from /lib/x86_64-linux-gnu/libffi.so.8
#12 0x00007ffff7cc640e in ?? () from /lib/x86_64-linux-gnu/libffi.so.8
#13 0x00007ffff7cc6b0d in ffi_call () from /lib/x86_64-linux-gnu/libffi.so.8
#14 0x00007ffff7ea5cac in wl_closure_invoke () from /usr/local/lib64/libwayland-client.so.0
#15 0x00007ffff7ea1c39 in dispatch_event.isra () from /usr/local/lib64/libwayland-client.so.0
#16 0x00007ffff7ea3574 in wl_display_dispatch_queue_pending () from /usr/local/lib64/libwayland-client.so.0
#17 0x00007ffff7ea3acf in wl_display_roundtrip_queue () from /usr/local/lib64/libwayland-client.so.0
#18 0x000055555588041b in gfx_ctx_wl_init_common (toplevel_listener=0x555556537860 <toplevel_listener>, 
    wwl=0x7fffffffd828) at gfx/common/wayland_common.c:639
#19 0x0000555555881052 in gfx_ctx_wl_init (data=0x55555666d4c0) at gfx/drivers_context/wayland_vk_ctx.c:137
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x000055555566e9fd in video_context_driver_init (core_set_shared_context=false, settings=0x7ffff7c35010, 
    data=0x55555666d4c0, ctx=0x555556537880 <gfx_ctx_vk_wayland>, ident=0x7ffff7c36ed1 "", 
    api=GFX_CTX_VULKAN_API, major=1, minor=0, hw_render_ctx=false, ctx_data=0x7fffffffd940)
    at gfx/video_driver.c:889
#21 0x000055555589e79a in vk_context_driver_init_first (runloop_flags=29360128, settings=0x7ffff7c35010, 
    data=0x55555666d4c0, ident=0x7ffff7c36ed1 "", api=GFX_CTX_VULKAN_API, major=1, minor=0, 
    hw_render_ctx=false, ctx_data=0x7fffffffd940) at gfx/drivers/vulkan.c:1921
#22 0x000055555589e856 in vulkan_get_context (vk=0x55555666d4c0, settings=0x7ffff7c35010)
    at gfx/drivers/vulkan.c:1945
#23 0x00005555558a1e98 in vulkan_init (video=0x7fffffffdb10, input=0x5555565c3780 <input_driver_st+672>, 
    input_data=0x5555565c3788 <input_driver_st+680>) at gfx/drivers/vulkan.c:3236
#24 0x000055555567403c in video_driver_init_internal (video_is_threaded=0x7fffffffdc30, 
    verbosity_enabled=false) at gfx/video_driver.c:3245
#25 0x000055555560495a in drivers_init (settings=0x7ffff7c35010, flags=4095, lifetime_flags=0, 
    verbosity_enabled=false) at retroarch.c:847
#26 0x000055555560e9e1 in retroarch_main_init (argc=1, argv=0x7fffffffe4d8) at retroarch.c:6662
#27 0x000055555563ce6c in content_load (info=0x7fffffffe350, p_content=0x55555656c018 <runloop_state+1912>)
    at tasks/task_content.c:1455
#28 0x000055555563e991 in task_load_content_internal (content_info=0x7fffffffe350, loading_from_menu=true, 
    loading_from_cli=true, loading_from_companion_ui=false) at tasks/task_content.c:2579
#29 0x000055555563ec2b in task_push_load_content_from_cli (core_path=0x0, fullpath=0x0, 
    content_info=0x7fffffffe350, type=CORE_TYPE_PLAIN, cb=0x0, user_data=0x0) at tasks/task_content.c:2673
#30 0x000055555560b5de in rarch_main (argc=1, argv=0x7fffffffe4d8, data=0x0) at retroarch.c:4891
#31 0x000055555560b648 in main (argc=1, argv=0x7fffffffe4d8) at retroarch.c:5003

Does it give any clues?

from cage.

joggee-fr avatar joggee-fr commented on June 28, 2024

It seems Cage does not implement (yet) the relative pointer protocol and RetroArch does not manage well the case.

Here, zwp_relative_pointer_manager_v1_get_relative_pointer() is called with wl->relative_pointer_manager = NULL.

from cage.

vanfanel avatar vanfanel commented on June 28, 2024

I see... Cage is also lacking the ability to restrict cursor movement to an screen area, so cursor in Scummvm games (4:3 screen area inside a 16:9 video mode) is sticky around the sides :(

Are there plans to implement those? Are those complex things to add?
Labwc, another wl-roots based compositor, has both. Maybe it's just a matter of copy/pasting?

from cage.

joggee-fr avatar joggee-fr commented on June 28, 2024

Pointer constraints protocol is not implemented in Cage. It should be the cause of this issue. Issue #163 is opened since several years now, contributions needed.

from cage.

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.