Version 1.7.7 execution produces Segmentation Fault.
sudo apt-get install git build-essential
sudo apt-get build-dep retroarch
git clone https://github.com/libretro/RetroArch.git retroarch
./configure --disable-vulkan --disable-ffmpeg --enable-xmb --disable-materialui --disable-flac --disable-parport --disable-vulkan_display --disable-videocore --disable-videoprocessor --disable-v4l2 --enable-x11 --disable-wayland --disable-vg --disable-jack --disable-discord --disable-langextra --enable-mali_fbdev --enable-opengles --disable-opengl_core --disable-opengl1 --disable-qt
make -j4
make install
make clean
make DEBUG=1 GL_DEBUG=1 -j4
Reading symbols from ./retroarch...done.
(gdb) r
Starting program: /home/cpi/Development/retroarch/retroarch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb610a330 (LWP 4971)]
[New Thread 0xb5888330 (LWP 4972)]
[New Thread 0xb429e330 (LWP 4977)]
Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt full
#0 0x00000000 in ?? ()
No symbol table info available.
#1 0x005a54ac in video_thread_wrapper_menu_widgets_enabled (data=0x7d5930)
at gfx/video_thread_wrapper.c:1289
thr = 0x7d5930
#2 0x0046fcbc in video_driver_has_widgets () at gfx/video_driver.c:3301
No locals.
#3 0x0041a80c in drivers_init (flags=1023) at retroarch.c:640
video_is_threaded = true
settings = 0xb610b008
#4 0x0041cfd6 in retroarch_main_init (argc=1, argv=0xbefff6e4)
at retroarch.c:2057
init_failed = false
global = 0x6ec680 <g_extern>
#5 0x00441ecc in content_load (info=0xbefff560) at tasks/task_content.c:288
i = 0
retval = true
rarch_argc = 0
rarch_argv = {0x0 <repeats 32 times>}
argv_copy = {0x0 <repeats 32 times>}
rarch_argv_ptr = 0xbefff6e4
rarch_argc_ptr = 0xbefff560
wrap_args = 0x7b00b0
#6 0x00442c30 in task_load_content (content_info=0xbefff560, content_ctx=0xbefff4dc, launched_from_menu=true, launched_from_cli=true, error_string=0xbefff4d8) at tasks/task_content.c:978
contentless = false
is_inited = false
#7 0x00443e64 in task_load_content_callback (content_info=0xbefff560, loading_from_menu=true, loading_from_cli=true) at tasks/task_content.c:1713
content_ctx = {subsystem = {data = 0x0, size = 0}, name_ips = 0x0, name_bps = 0x0, name_ups = 0x0, valid_extensions = 0x0, directory_cache = 0x0, directory_system = 0x0, is_ips_pref = false, is_bps_pref = false,
is_ups_pref = false, history_list_enable = false, block_extract = false, need_fullpath = false, set_supports_no_game_enable = false, patch_is_blocked = false, bios_is_missing = false, check_firmware_before_loading = false,
temporary_content = 0x1}
ret = false
error_string = 0x0
global = 0x6ec680 <g_extern>
settings = 0xb610b008
sys_info = 0x6e7b6c <runloop_system>
#8 0x00443fc4 in task_push_load_content_from_cli (core_path=0x0, fullpath=0x0, content_info=0xbefff560, type=CORE_TYPE_PLAIN, cb=0x0, user_data=0x0) at tasks/task_content.c:1791
No locals.
#9 0x00418722 in rarch_main (argc=1, argv=0xbefff6e4, data=0x0) at frontend/frontend.c:140
info = {argc = 1, argv = 0xbefff6e4, args = 0x0, environ_get = 0x41775d <frontend_unix_get_env>}
args = 0x0
#10 0x0041878a in main (argc=1, argv=0xbefff6e4) at frontend/frontend.c:184
No locals.
Does it crash if you set this in retroarch.cfg?
menu_enable_widgets = "false"
It does not crash with menu_enable_widgets = "false" so far what I tested is working.
This is using Lima fbdev
On Tue, May 7, 2019, 13:12 Petar Mihaylov Petrov notifications@github.com
wrote:
It does not crash with menu_enable_widgets = "false" so far what I tested
is working.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/libretro/RetroArch/issues/8720#issuecomment-490190081,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANEFUHMTPUVRRCX3UXMLTDPUHBBFANCNFSM4HLKV4VA
.
@Mihaylov93 Can you perhaps make a debug build and then reproduce the error so that we can get a more meaningful back trace? It's possible there is still some thread unsafe code out there that we have to fix.
@natinusala for instance fixed some thread unsafety issues in the savestate thumbnails code which only manifested itself when we were using menu widgets.
@twinaphex What do you mean? the trace I posted is a debug build with make DEBUG=1 GL_DEBUG=1 -j4 Am I missing a flag?
Can you do thread apply all bt ?
(gdb) thread apply all bt
Thread 4 (Thread 0xb429e330 (LWP 6249)):
#0 0xb692e914 in ioctl () at ../sysdeps/unix/syscall-template.S:84
#1 0xb6ec05e8 in ?? () from /usr/lib/arm-linux-gnueabihf/libasound.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 3 (Thread 0xb5888330 (LWP 6243)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6d1dcfc in __pthread_cond_wait (cond=0x7b0638, mutex=0x7b05a0)
at pthread_cond_wait.c:188
#2 0x005a377e in scond_wait (cond=0x7b0638, lock=0x7b05a0)
at libretro-common/rthreads/rthreads.c:715
#3 0x005a43a6 in video_thread_loop (data=0x7b02b8)
at gfx/video_thread_wrapper.c:568
#4 0x005a347a in thread_wrap (data_=0x7b0680)
at libretro-common/rthreads/rthreads.c:146
#5 0xb6d195d8 in start_thread (arg=0x0) at pthread_create.c:458
#6 0xb69336fa in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 2 (Thread 0xb610a330 (LWP 6242)):
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6d1dcfc in __pthread_cond_wait (cond=0x7b0158, mutex=0x7b00d8)
at pthread_cond_wait.c:188
#2 0x005a377e in scond_wait (cond=0x7b0158, lock=0x7b00d8)
at libretro-common/rthreads/rthreads.c:715
#3 0x00440212 in threaded_worker (userdata=0x0)
at libretro-common/queues/task_queue.c:456
#4 0x005a347a in thread_wrap (data_=0x7b0190)
at libretro-common/rthreads/rthreads.c:146
#5 0xb6d195d8 in start_thread (arg=0x0) at pthread_create.c:458
#6 0xb69336fa in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 1 (Thread 0xb6147e80 (LWP 6236)):
#0 0x00000000 in ?? ()
#1 0x005a54ac in video_thread_wrapper_menu_widgets_enabled (data=0x7b02b8)
at gfx/video_thread_wrapper.c:1289
#2 0x0046fcbc in video_driver_has_widgets () at gfx/video_driver.c:3301
#3 0x0041a80c in drivers_init (flags=1023) at retroarch.c:640
#4 0x0041cfd6 in retroarch_main_init (argc=1, argv=0xbefff6b4)
at retroarch.c:2057
#5 0x00441ecc in content_load (info=0xbefff530) at tasks/task_content.c:288
#6 0x00442c30 in task_load_content (content_info=0xbefff530,
content_ctx=0xbefff4ac, launched_from_menu=true, launched_from_cli=true,
error_string=0xbefff4a8) at tasks/task_content.c:978
#7 0x00443e64 in task_load_content_callback (content_info=0xbefff530,
loading_from_menu=true, loading_from_cli=true) at tasks/task_content.c:1713
#8 0x00443fc4 in task_push_load_content_from_cli (core_path=0x0,
fullpath=0x0, content_info=0xbefff530, type=CORE_TYPE_PLAIN, cb=0x0,
user_data=0x0) at tasks/task_content.c:1791
#9 0x00418722 in rarch_main (argc=1, argv=0xbefff6b4, data=0x0)
at frontend/frontend.c:140
#10 0x0041878a in main (argc=1, argv=0xbefff6b4) at frontend/frontend.c:184
Thank you.
@Mihaylov93 Do you happen to know a bit of C coding or at least how to edit sourcecode? I could ask you to test something on your setup then.
I do. Sure I´ll test it :)
OK, here is my suggestion @Mihaylov93 - it might be
that we don't need 'video_thread_wrapper_menu_widgets_enabled' at all, and that this function instead could just be performed on the main thread. Could you try exploring that? Try setting this to NULL -
https://github.com/libretro/RetroArch/blob/master/gfx/video_thread_wrapper.c#L1317
if that is not it, @natinusala , please chime in so we can search for a solution.
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
NULL /* video_thread_wrapper_menu_widgets_enabled */
#endif
};
Doesn´t crash with menu_enable_widgets = "true"
Do menu widgets still work then though? Or does it revert to the old yellow OSD text then?
What is your video driver?
The first crash should be fixed by https://github.com/libretro/RetroArch/pull/8722
We merged this PR.
@Mihaylov93 Can you please test the master and see what the current status is?
commit 4fad77304fa2a6b447c84af345790b8f43e349d6
Author: Nathan S <[email protected]>
Date: Wed May 8 01:56:39 2019 +0200
menu_widgets: better sanity check for threaded video wrapper (#8722)
diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c
index a7cf29b2d6..85b0c60e75 100644
--- a/gfx/video_thread_wrapper.c
+++ b/gfx/video_thread_wrapper.c
@@ -1285,7 +1285,7 @@ static bool video_thread_wrapper_menu_widgets_enabled(void *data)
{
thread_video_t *thr = (thread_video_t*)data;
- if (thr && thr->driver)
+ if (thr && thr->driver && thr->driver->menu_widgets_enabled)
return thr->driver->menu_widgets_enabled(thr->driver_data);
return false;
Solved the segmentation fault.
@Mihaylov93 Do menu widgets work? Would you consider this issue resolved? :)
I still have the old yellow OSD text, do widgets by any chance come from Qt widgets? in that case i configured with --disable-qt this system I compiled for doesn´t have qt installed by default, I do have it on my system because I do some qt dev.
For what is worth, I consider this issue resolved as something that worked in previous versions was broken in 1.7.7 now with this PR works as it worked before.
SDL doesn't have menu widgets anyway
@twinaphex the Menu Widgets menu option should be hidden if video_driver_has_widgets is set to false
I assumed this bug was what was causing RetroArch on 3DS (armv6) to crash out on startup, but the latest nightly (post-PR) behaves exactly the same as all post 1.7.7 builds have. I'm not sure when this began between 1.7.6 and 1.7.7, but at best it means 1.7.6 is the most recent stable that runs on 3DS.
@vaguerant I've noticed that if I did not set user_language = "0" in the config file Retroarch 1.7.7 will segfault, maybe try that ?
@bparker06 A Lakka bug you say? ;)
@shantigilbert No change with user_language = "0" on 3DS, unfortunately.
Doesn't the 3DS have a remote gdb feature? Part of Rosalina now?
It does, @natinusala. I've never used GDB to debug on 3DS or anything else, so bear with me, but I did manage to get at least this much out of it upon launching:
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00306254 in ?? ()
(gdb) backtrace
#0 0x00306254 in ?? ()
#1 0x0040e28c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
md5-e9c89ffb1ef9397bc5a11b3fa512c6e6
(gdb) info threads
Id Target Id Frame
* 1 Thread 466 (TLS: 0x1ffb2000, running, dynamic prio.: 48, static prio.: 48, ideal core: 0, running on core 0) 0x00306254 in ?? ()
2 Thread 467 (TLS: 0x1ffb2200, idle, dynamic prio.: 49, static prio.: 49, ideal core: 0, running on core 0) 0x002f9d18 in ?? ()
3 Thread 471 (TLS: 0x1ffb2400, running, dynamic prio.: 26, static prio.: 26, ideal core: 0, running on core 0) 0x002f9cfc in ?? ()
4 Thread 474 (TLS: 0x1ffb2600, running, dynamic prio.: 24, static prio.: 24, ideal core: 0, running on core 0) 0x002f9cfc in ?? ()
Is there anything particular I should be doing to find useful information?
Can you rebuild the 3DS version with debug symbols (add DEBUG=1 to the build command) and try again? This looks promising
I don't have a build environment set up for 3DS currently, I'll see if I can get everything set up tomorrow.