Closed thesourcehim closed 5 years ago
It seems that mednaffe didn't save config file properly. In the gba controls section I found the following line: gba.input.builtin.gamepad.up joystick While it should have been: gba.input.builtin.gamepad.up joystick 0x0003045e028e01100008000b00000000 abs_1-
Fixing that line manually removed the crash.
True, malformed input mapping can lead to access an array out of bounds.
Fixed with commit e967c2dc.
I deleted old mednafen.cfg and configured mednaffe again. Segfault started to happen after I configured my xbox 360 controller once and restarted mednaffe. Now every time I switch to GBA input page (no matter if controller is plugged or not), mednaffe crashes.
Thread 1 "mednaffe" received signal SIGSEGV, Segmentation fault. 0x0000000000416781 in value_to_text (listjoy=0x3106640 = {...}, value=value@entry=0x8893a0 "joystick") at widgets/joystick_linux.c:256 256 if (items[2][0] == 'b')
bt full
0 0x0000000000416781 in value_to_text (listjoy=0x3106640 = {...}, value=value@entry=0x8893a0 "joystick") at widgets/joystick_linux.c:256
1 0x0000000000414a42 in med_list_joy_value_to_text (self=, value=value@entry=0x8893a0 "joystick") at widgets/medlistjoy.c:142
2 0x0000000000413570 in med_input_convert_to_text (self=self@entry=0xbd5c10, v=v@entry=0x8893a0 "joystick", p=p@entry=0x7fffffffbba0) at widgets/medinput.c:1208
3 0x00000000004138c0 in med_input_real_set_value (base=0xbd5c10, v=0x8893a0 "joystick") at widgets/medinput.c:1257
4 0x000000000040b37b in main_window_medwid_map (sender=0xbd5c10, self=) at mainwindow.c:578