Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

lr-atari800 on Pi 3B+ segfaults at startup with USB joystick attached


  • Pi Model or other hardware: Raspberry Pi 3B+
    Power Supply used: PWR+ micro USB, 3.5 amps
    RetroPie Version Used: 4.6.9
    Built From: Pre-made SD card image from RetroPie web site
    USB Devices connected: Keyboard, mouse, Atari joystick via Monster Joystick adapter (shows up as "Van Ooijen Technische Informatica Joystick" in "lsusb" output)
    Controller used: Atari 800 joystick (keyboard for Emulationstation navigation)
    Error messages received: none
    Emulator: lr-atari800

    Updates and upgrades performed via retropie-setup.sh

    Upon launch with the joystick connected, lr-atari800 will crash immediately upon startup, and return to Emulationstation immediately after. The logs themselves only show a SIGSEGV.

    I went to the trouble of attaching a debugger to it (this required writing a script that would invoke it using the same arguments as what Emulationstation used, and the script itself used gdbserver since direct control obviously wasn't available). Here's the result:

    Thread 2 "retroarch" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 17346.17353]
    0x001c13f8 in gl_raster_font_draw_vertices ()
    (gdb) info threads
      Id   Target Id                            Frame 
      1    Thread 17346.17346 "retroarch"       libc_feresetround_vfp_ctx (ctx=<synthetic pointer>) at ../sysdeps/arm/fenv_private.h:167
    * 2    Thread 17346.17353 "retroarch"       0x001c13f8 in gl_raster_font_draw_vertices ()
      3    Thread 17346.17352 "retroarch"       futex_wait_cancelable (private=0, expected=0, futex_word=0xab7ca8)
        at ../sysdeps/unix/sysv/linux/futex-internal.h:88
      4    Thread 17346.17354 "VCHIQ completio" 0x7526751c in ioctl () at ../sysdeps/unix/syscall-template.S:78
      5    Thread 17346.17355 "HDispmanx Notif" 0x76e94088 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, 
        futex_word=0x76d84480 <dispmanx_notify_available_event+24>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
      6    Thread 17346.17356 "HTV Notify"      0x76e94088 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, 
        futex_word=0x76d835f4 <tvservice_notify_available_event+24>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
      7    Thread 17346.17357 "HCEC Notify"     0x76e94088 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, 
        futex_word=0x76d84384 <cecservice_notify_available_event+24>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
      8    Thread 17346.17359 "retroarch"       0x7526751c in ioctl () at ../sysdeps/unix/syscall-template.S:78
    (gdb) where
    #0  0x001c13f8 in gl_raster_font_draw_vertices ()
    #1  0x001c1b0c in gl_raster_font_flush_block ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)
    (gdb) 
    

    This issue does not occur with an identical (near as I can tell) software load on the Raspberry Pi 4. Might be a race condition.

    How would you like to proceed with debugging this?

  • Global Moderator

    Try adding

    menu_enable_widgets = false
    

    in /opt/retropie/configs/atari800/retroarch.cfg, before the last line.


  • @mitu Wow. That worked. Okay -- why did it work?

  • Global Moderator

    The menu widgets notifications have an issue on the Pi, causing a few errors with certain cores and even crashing (though the crash only happens with the atari800 core). The issue might be fixed with a more recent RetroArch, but at the time RetroPie ships an -slightly - older version.

    When you have a controller plugged in, RetroArch pop-up a notification widgets to show it, triggering the crash. The option I posted before disables the menu widget style notifications, leaving RetroArch to use the old style (just an overlay font).


  • @mitu What's weird is that this issue is absent on the Pi 4 (which is the last place I'd expect to see a bug be absent).

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.