XRoar 1.6 released

A place to discuss everything Dragon related that doesn't fall into the other categories.
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: XRoar 1.6 released

Post by rolfmichelsen »

sixxie wrote: Sun Oct 06, 2024 7:51 pm Unless we can get to the bottom of why GTK+ 3 isn't working in your environment, of course.
I'll keep investigating...

-- Rolf
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: XRoar 1.6 released

Post by rolfmichelsen »

Here's the dump from gdb when running 1.5.4. This starts xroar with no arguments and then just closing it again just after the green screen has appeared.

Code: Select all

Reading symbols from xroar...
(No debugging symbols found in xroar)
(gdb) run
Starting program: /usr/bin/xroar
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
gtk2: init: GTK+ 2 UI
[New Thread 0x7ffff5b4f640 (LWP 25714)]
[Thread 0x7ffff5b4f640 (LWP 25714) exited]
[New Thread 0x7ffff5b4f640 (LWP 25715)]
[New Thread 0x7ffff5344640 (LWP 25716)]
[Thread 0x7ffff5b4f640 (LWP 25715) exited]
[Thread 0x7ffff5344640 (LWP 25716) exited]
[New Thread 0x7ffff5344640 (LWP 25717)]
[New Thread 0x7ffff5b4f640 (LWP 25718)]
[Thread 0x7ffff5344640 (LWP 25717) exited]
[Thread 0x7ffff5b4f640 (LWP 25718) exited]
gtkgl: init: GtkGLExt video
[New Thread 0x7ffff5b4f640 (LWP 25743)]
[New Thread 0x7ffff5344640 (LWP 25744)]
[New Thread 0x7fffdc3ff640 (LWP 25745)]
[New Thread 0x7fffdbbfe640 (LWP 25746)]
[New Thread 0x7fffdabfd640 (LWP 25748)]
gtk2: init: GTK+ 2 file requester
oss: init: OSS audio
ERROR: AO/OSS: failed to open device
oss: init failed: OSS audio
pulse: init: Pulse audio
[New Thread 0x7fffda2fc640 (LWP 25749)]
        16-bit signed little-endian, stereo, 48000Hz
        2 frags * 1024 frames/frag = 2048 frames buffer (42ms)
Machine: [dragon64] Dragon 64
Loading ROM image: /home/rolf/.xroar/roms/d64_1.rom
Loading ROM image: /home/rolf/.xroar/roms/d64_2.rom
        32K mode BASIC CRC = 0x60a4634c
        64K mode BASIC CRC = 0x17893a42
Loading ROM image: /home/rolf/.xroar/roms/sdose6.rom
        CRC = 0x8c1d6c45
Cartridge: [dragondos] DragonDOS
Loading ROM image: /home/rolf/.xroar/roms/sdose6.rom
        CRC = 0x8c1d6c45
Loading ROM image: /home/rolf/.xroar/roms/sdose6.rom
        CRC = 0x8c1d6c45
[Thread 0x7fffdabfd640 (LWP 25748) exited]
[Thread 0x7fffda2fc640 (LWP 25749) exited]

Thread 1 "xroar" received signal SIGSEGV, Segmentation fault.
0x00007fffeeb2235e in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
(gdb)
This is from the version installed via apt. I didn't have any success building from the 1.5.4 tag in the git repo (in an attempt at getting debug symbols). Probably some missing parameters to configure as it complained about not being able to open a gui...
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 1.6 released

Post by sixxie »

rolfmichelsen wrote: Mon Oct 07, 2024 7:34 pm This is from the version installed via apt. I didn't have any success building from the 1.5.4 tag in the git repo (in an attempt at getting debug symbols). Probably some missing parameters to configure as it complained about not being able to open a gui...
Can you type "bt" at the prompt anyway? Never know, might have enough symbols hanging around to see _something_...

Edit: oh! Also if it's from my apt repo, you could probably install the "xroar-dbgsym" package!

..ciaran
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: XRoar 1.6 released

Post by rolfmichelsen »

sixxie wrote: Mon Oct 07, 2024 7:57 pm Can you type "bt" at the prompt anyway? Never know, might have enough symbols hanging around to see _something_...
That produced the stuff below. This is for the 1.5.4 verison of xroar that segfaults on exit but otherwise seems to work just fine.

Code: Select all

(gdb) bt
#0  0x00007fffeeb2235e in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#1  0x00007fffeeaded74 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#2  0x00007fffee591169 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#3  0x00007fffee08e18a in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007fffee08e244 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007ffff74fa2a5 in  () at /lib/x86_64-linux-gnu/libgdkglext-x11-1.0.so.0
#6  0x00007ffff74da158 in gdk_gl_context_destroy () at /lib/x86_64-linux-gnu/libgdkglext-x11-1.0.so.0
#7  0x00007ffff751d5fe in  () at /lib/x86_64-linux-gnu/libgtkglext-x11-1.0.so.0
#8  0x00007ffff7671d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff768dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff768f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff768f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff7bc9e62 in gtk_widget_unrealize () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x00007ffff7bca0cd in gtk_widget_unparent () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff79e0425 in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00007ffff7671d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff768d895 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff768f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff768f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff7bca1e9 in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00007ffff7680011 in g_object_run_dispose () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00005555555da2c0 in  ()
#22 0x00007ffff701b495 in __run_exit_handlers
    (status=0, listp=0x7ffff71f0838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#23 0x00007ffff701b610 in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#24 0x00005555555a68fb in  ()
#25 0x00005555555d9d49 in  ()
#26 0x00007ffff7671d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007ffff768dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff768f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff768f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff79d2a6f in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007ffff79d31e1 in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00007ffff7671d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ffff768dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007ffff768f026 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007ffff768f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007ffff79ce62c in gtk_accel_group_activate () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#37 0x00007ffff79cf5d5 in gtk_accel_groups_activate () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#38 0x00007ffff7bd8c35 in gtk_window_activate_key () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#39 0x00005555555d81ad in gtk2_keyboard_handle_key_press ()
#40 0x00007ffff7a9b4e7 in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#41 0x00007ffff7671d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#42 0x00007ffff768dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#43 0x00007ffff768f026 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#44 0x00007ffff768f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#45 0x00007ffff7bc7024 in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#46 0x00007ffff7a9914c in gtk_propagate_event () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#47 0x00007ffff7a9a6eb in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#48 0x00007ffff78fe17b in  () at /lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#49 0x00007ffff7576d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007ffff75cc2b8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007ffff75762b3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#52 0x00007ffff7a982e2 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#53 0x000055555557a4f5 in main ()
(gdb)
Edit: oh! Also if it's from my apt repo, you could probably install the "xroar-dbgsym" package!
My apt skills may not be up to it, but it looks like only the 1.6.5 version of xroar-dbgsym is available. I can test those with the 1.6.5 version of xroar and post separately if that's interesting.

-- Rolf
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: XRoar 1.6 released

Post by rolfmichelsen »

This is getting a bit curious... I went back to my xroar 1.6.5 in Ubuntu 22.04 under wsl2 and confirmed the segfault during startup. The installed xroar-dbgsym and ran it in gdb. Now everything starts without problems, even a clean exit. Again, outside gdb, and the segfault reoccurs.

Yesterday I also dug out my old box and reinstalled a clean Ubuntu 22.04 Desktop to check if the crash was somehow related to running under wsl. I installed xroar 1.6.5 from apt on this box, and the segfault reproduced here as well. Installed gdb and xroar-symbols and tried running xroar from gdb. On this system, the segfault happened also within gdb with the stack trace below...

Code: Select all

Thread 1 "xroar" received signal SIGSEGV, Segmentation fault.
0x0000000000000003 in ?? ()
(gdb) bt
#0  0x0000000000000003 in ?? ()
#1  0x00007ffff7d2214f in XkbGetMapChanges (dpy=dpy@entry=0x555555668f90, xkb=0x55555564af00,
    changes=0x55555564ae98) at xkb/../../../src/xkb/XKBGetMap.c:848
#2  0x00007ffff7d22b85 in XKeysymToKeycode (ks=65360, dpy=0x555555668f90)
    at xkb/../../../src/xkb/XKBBind.c:147
#3  XKeysymToKeycode (dpy=0x555555668f90, ks=65360) at xkb/../../../src/xkb/XKBBind.c:141
#4  0x00005555555db7c3 in hk_x11_update_keymap ()
#5  0x0000555555582b3d in hk_update_keymap ()
#6  0x00005555555ddbd6 in gtk3_keyboard_init ()
#7  0x00005555555e0720 in ui_gtk3_new ()
#8  0x0000555555586946 in module_init ()
#9  0x00005555555ab271 in xroar_init ()
#10 0x00005555555765a6 in main ()
(gdb)
There seems to be a lot of keyboard stuff in the stack trace, so I might mention that I'm using a Norwegian keyboard.

Edit: I messed up the wsl2-based test since there are now two xroar 1.6.5 on that system (one with GTK2). Clearing that out and retesting indeed reproduces the segfault here as well, with a different stack trace.

Code: Select all

Thread 1 "xroar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7d1d678 in _XkbReloadDpy () from /lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0  0x00007ffff7d1d678 in _XkbReloadDpy () at /lib/x86_64-linux-gnu/libX11.so.6
#1  0x00007ffff7d1dc2c in XKeysymToKeycode () at /lib/x86_64-linux-gnu/libX11.so.6
#2  0x00005555555db7c3 in hk_x11_update_keymap ()
#3  0x0000555555582b3d in hk_update_keymap ()
#4  0x00005555555ddbd6 in gtk3_keyboard_init ()
#5  0x00005555555e0720 in ui_gtk3_new ()
#6  0x0000555555586946 in module_init ()
#7  0x00005555555ab271 in xroar_init ()
#8  0x00005555555765a6 in main ()
(gdb)

-- Rolf
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 1.6 released

Post by sixxie »

Thanks for that, that could be useful. At least it might lead to avoiding a segfault even if it doesn’t make something workable… I’ll check tomorrow.

It feels like maybe it’s got X11 libraries present but isn’t actually using X. Maybe WSL uses wayland or something; a system I’ve never even tried because it won’t support my environment.

..ciaran
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: XRoar 1.6 released

Post by rolfmichelsen »

sixxie wrote: Tue Oct 08, 2024 10:42 pm Thanks for that, that could be useful. At least it might lead to avoiding a segfault even if it doesn’t make something workable… I’ll check tomorrow.

It feels like maybe it’s got X11 libraries present but isn’t actually using X. Maybe WSL uses wayland or something; a system I’ve never even tried because it won’t support my environment.

..ciaran
According to these docs wsl supports both X and Wayland, but I don't really know how this works. Anyway, the top stack trace in the last post is a plain Ubuntu install with no Windows or wsl in the mix.

-- Rolf
Alastair
Posts: 689
Joined: Fri Jul 18, 2008 11:33 pm

Re: XRoar 1.6 released

Post by Alastair »

rolfmichelsen wrote: Tue Oct 08, 2024 6:34 pm [snip]
There seems to be a lot of keyboard stuff in the stack trace, so I might mention that I'm using a Norwegian keyboard.
[snip]
Have you tried changing your keyboard layout to a UK one? This should at least eliminate one or narrow down the problem area.
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 1.6 released

Post by sixxie »

It's crashing as it tries to identify the keyboard layout - you're actual layout won't matter here, it will always do that anyway.

The weird thing is that the "dpy" argument being passed to the X11 calls is not NULL, so the GTK+ call that gets the X11 display must have returned something it thought was useful, which implies it _is_ X11 (well, unless GTK always _lets_ you call that even if it's going to return nonsense... ;)

I see the X11 call eventually punts out to Xkb. Maybe something to consider after the meet-up will be migrating to querying Xkb instead of X11 for such information, which may be wayland-compatible...

The more odd thing is that the GTK+ 2 UI calls the exact same keyboard querying routines, so I wonder what's different.
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 1.6 released

Post by sixxie »

Can you try the "x11fix" branch (or download http://www.6809.org.uk/tmp/xroar/xroar-x11fix.tar.gz) and see if that helps? I make an explicit call to XkbQueryExtension() when the display is set. It's _just about_ possible that GTK+ 3 hasn't initialised it by that point where for some reason GTK+ 2 has.
Post Reply