Test build cheat crash

Ubuntu 17.04 testing Retroarch crashes trying to enable cheats in any of multiple cores tested.

Similar failure with windows nightly builds.

gdb backtrace:

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x0000555555665f42 in strlcpy_retro__ (
    dest=dest@entry=0x555555d523c0 <menu_input_dialog_keyboard_label_setting> "", source=0x0, size=size@entry=256) at libretro-common/compat/compat_strl.c:38
38	libretro-common/compat/compat_strl.c: No such file or directory.
(gdb) bt
#0  0x0000555555665f42 in strlcpy_retro__ (
    dest=dest@entry=0x555555d523c0 <menu_input_dialog_keyboard_label_setting> "", source=0x0, size=size@entry=256) at libretro-common/compat/compat_strl.c:38
#1  0x00005555556a1848 in menu_input_dialog_start (
    line=line@entry=0x7fffffffdd40) at menu/widgets/menu_input_dialog.c:133
#2  0x00005555556a42af in action_ok_cheat (path=<optimized out>, label=0x0, 
    type=661, idx=4, entry_idx=<optimized out>) at menu/cbs/menu_cbs_ok.c:1919
#3  0x00005555556a31fe in menu_entry_action (entry=entry@entry=0x7fffffffde00, 
    i=4, action=action@entry=MENU_ACTION_OK) at menu/widgets/menu_entry.c:452
#4  0x00005555556d9980 in generic_menu_iterate (data=0x555556d010a0, 
    userdata=<optimized out>, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:234
#5  0x000055555568f9bf in menu_driver_iterate (
    iterate=iterate@entry=0x7fffffffdea0) at menu/menu_driver.c:1682
#6  0x00005555555b53ec in runloop_check_state (
    settings=settings@entry=0x7ffff7fc5010, 
    input_nonblock_state=input_nonblock_state@entry=false, 
    sleep_ms=0x7fffffffe00c) at retroarch.c:2549
#7  0x00005555555b90bf in runloop_iterate (sleep_ms=0x7fffffffe00c)
    at retroarch.c:3056
#8  0x00005555555b3080 in rarch_main (argc=<optimized out>, 
    argv=<optimized out>, data=0x0) at frontend/frontend.c:131
#9  0x00007fffefc083f1 in __libc_start_main (main=0x5555555ae690 <main>, 
    argc=1, argv=0x7fffffffe148, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe138)
    at ../csu/libc-start.c:291
#10 0x00005555555b034a in _start ()
1 Like

I made an issue for this on the github repo:

1 Like

On a different computer.

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x000055555564c452 in strlcpy_retro__ (
    dest=dest@entry=0x555555d394a0 <menu_input_dialog_keyboard_label_setting> "", source=0x0, size=size@entry=256) at libretro-common/compat/compat_strl.c:38
38	      while (--n && (*dest++ = *source++)) src_size++;
(gdb) bt
#0  0x000055555564c452 in strlcpy_retro__ (
    dest=dest@entry=0x555555d394a0 <menu_input_dialog_keyboard_label_setting> "", source=0x0, size=size@entry=256) at libretro-common/compat/compat_strl.c:38
#1  0x0000555555688138 in menu_input_dialog_start (
    line=line@entry=0x7fffffffdc10) at menu/widgets/menu_input_dialog.c:133
#2  0x000055555568ab9f in action_ok_cheat (path=<optimized out>, label=0x0, 
    type=662, idx=5, entry_idx=<optimized out>) at menu/cbs/menu_cbs_ok.c:1919
#3  0x0000555555689aee in menu_entry_action (entry=entry@entry=0x7fffffffdcd0, 
    i=5, action=action@entry=MENU_ACTION_OK) at menu/widgets/menu_entry.c:452
#4  0x00005555556c02b0 in generic_menu_iterate (data=0x555556d8f930, 
    userdata=<optimized out>, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:234
#5  0x00005555556762af in menu_driver_iterate (
    iterate=iterate@entry=0x7fffffffdd70) at menu/menu_driver.c:1682
#6  0x000055555559b90c in runloop_check_state (
    settings=settings@entry=0x7ffff7fc5010, 
    input_nonblock_state=input_nonblock_state@entry=false, 
    sleep_ms=0x7fffffffdedc) at retroarch.c:2549
#7  0x000055555559f5df in runloop_iterate (sleep_ms=0x7fffffffdedc)
    at retroarch.c:3056
#8  0x00005555555995a0 in rarch_main (argc=<optimized out>, 
    argv=<optimized out>, data=0x0) at frontend/frontend.c:131
#9  0x00007fffefc083f1 in __libc_start_main (main=0x555555594bb0 <main>, 
    argc=1, argv=0x7fffffffe148, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe138)
    at ../csu/libc-start.c:291
#10 0x00005555555b034a in _start ()

@noabody Please specify which cores, games and cheats specifically do not work so that we can try to reproduce the issue. Only cheat files that were already corrupted seem to crash for me, and in a different way than yours.

In my tests it’s any game/core/cheat when pressing the “enter” key [and controller equivalent] on any cheat in the list. Right or left arrows will toggle the cheat as expected but pressing enter doesn’t toggle, it just crashes.

Because the enter key works as a toggle in almost every case, I did not initially realize that the cheat system did work but pressing “enter” would crash in every scenario.

Using left/right to toggle a cheat and enter on the Apply Cheats function is fine but pressing enter (with the thought that it will toggle a cheat) crashes without fail (pun intended) on both native RetroArch Linux and Windows 32-bit version running in Wine.

Try this? https://github.com/libretro/RetroArch/pull/5682

Works fine in Linux native and Win32 Wine. Hasn’t hit the nightly Ubuntu Testing PPA yet but I built from source and ran the build directly without issue. Pressing enter on any cheat now brings up a cheat entry dialog.

[Personal Comment] With 25 years of troubleshooting experience, I’m a bit sheepish about the fact that I couldn’t discern cheats must obviously be working otherwise there would be tons of comments. I simply mashed the enter key on a cheat expecting it to toggle and instead, the emu crashed. Even so, I didn’t attempt to use the arrow keys to toggle until yesterday - a full five days after reporting the issue.

Maybe I’m past my prime. Then again, it took someone with my particular mindset to identify the issue in the first place; instinctively doing the least intuitive thing again and again without trying something else.