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: Thu Oct 10, 2024 10:00 am 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.
Sorry about the delay. It's been a busy day. The fix doesn't compile for me...

Code: Select all

gtk2/drivecontrol.c: In function ‘gtk2_create_dc_window’:
gtk2/drivecontrol.c:86:31: error: ‘struct vdrive_interface’ has no member named ‘update_drive_cyl_head’
   86 |         xroar.vdrive_interface->update_drive_cyl_head = DELEGATE_AS3(void, unsigned, unsigned, unsigned, update_drive_cyl_head, uigtk2);
      |                               ^~
gtk2/drivecontrol.c: In function ‘dc_toggled_we’:
gtk2/drivecontrol.c:205:9: warning: implicit declaration of function ‘xroar_set_write_enable’ [-Wimplicit-function-declaration]
  205 |         xroar_set_write_enable(0, drive, set);
      |         ^~~~~~~~~~~~~~~~~~~~~~
gtk2/drivecontrol.c: In function ‘dc_toggled_wb’:
gtk2/drivecontrol.c:211:9: warning: implicit declaration of function ‘xroar_set_write_back’ [-Wimplicit-function-declaration]
  211 |         xroar_set_write_back(0, drive, set);
      |         ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:2796: gtk2/xroar-drivecontrol.o] Error 1
make[3]: Leaving directory '/home/rolf/tmp/xroar-x11fix/src'
make[2]: *** [Makefile:983: all] Error 2
make[2]: Leaving directory '/home/rolf/tmp/xroar-x11fix/src'
make[1]: *** [Makefile:439: all-recursive] Error 1
make[1]: Leaving directory '/home/rolf/tmp/xroar-x11fix'
make: *** [Makefile:380: all] Error 2
And to Alastair: I tried a UK keyboard layout with no change in behavior.

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

Re: XRoar 1.6 released

Post by sixxie »

rolfmichelsen wrote: Thu Oct 10, 2024 9:56 pm Sorry about the delay. It's been a busy day. The fix doesn't compile for me...
Ah I was imagining you’d try a GTK+ 3 build there, as that’s what your backtraces were from.
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: Thu Oct 10, 2024 10:02 pm
rolfmichelsen wrote: Thu Oct 10, 2024 9:56 pm Sorry about the delay. It's been a busy day. The fix doesn't compile for me...
Ah I was imagining you’d try a GTK+ 3 build there, as that’s what your backtraces were from.
I think that was what I was doing. Just unpacking and then

Code: Select all

./configure
make
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 1.6 released

Post by sixxie »

rolfmichelsen wrote: Thu Oct 10, 2024 10:15 pm I think that was what I was doing. Just unpacking and then

Code: Select all

./configure
make
Ah but previously you only installed binary packages? You might need the dev packages then:

Code: Select all

apt install libgtk-3-dev libpulse-dev libpng-dev
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 »

Sorry about that. Adding the libraries fixed the build, but not the segfault.

Code: Select all

Thread 1 "xroar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7e19678 in _XkbReloadDpy () from /lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0  0x00007ffff7e19678 in _XkbReloadDpy () at /lib/x86_64-linux-gnu/libX11.so.6
#1  0x00007ffff7e19c2c in XKeysymToKeycode () at /lib/x86_64-linux-gnu/libX11.so.6
#2  0x00005555555c9cac in hk_x11_update_keymap () at x11/hkbd_x11.c:109
#3  0x0000555555580e3f in hk_update_keymap () at hkbd.c:1159
#4  0x00005555555812f9 in hk_init () at hkbd.c:1129
#5  0x00005555555cf639 in ui_gtk3_new (cfg=0x55555562c860 <xroar_ui_cfg>) at gtk3/ui_gtk3.c:438
#6  0x0000555555585557 in module_init
    (module=module@entry=0x55555562dae0 <ui_gtk3_module>, cfg=cfg@entry=0x55555562c860 <xroar_ui_cfg>) at module.c:74
#7  0x00005555555a0fb7 in xroar_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffdb78) at xroar.c:1032
#8  0x0000555555577aaa in main (argc=1, argv=0x7fffffffdb78) at main_unix.c:48
(gdb)
Tested both in wsl2 and on a plain Ubuntu 22.04.

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

Re: XRoar 1.6 released

Post by sixxie »

I've replaced the tarball, can you give it another try?

I'm trying querying the X display _after_ the window is created. Wasn't necessary in GTK+2, but maybe some initialisation is deferred in 3...
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 »

Thanks.

I really appreciate the effort, but unfortunately, still more or less the same result. Only tested under wsl2 this time...

Code: Select all

Thread 1 "xroar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7e1920b in XkbGetMapChanges () from /lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0  0x00007ffff7e1920b in XkbGetMapChanges () at /lib/x86_64-linux-gnu/libX11.so.6
#1  0x00007ffff7e19c90 in XKeysymToKeycode () at /lib/x86_64-linux-gnu/libX11.so.6
#2  0x00005555555c9c0c in hk_x11_update_keymap () at x11/hkbd_x11.c:103
#3  0x0000555555580e1f in hk_update_keymap () at hkbd.c:1159
#4  0x00005555555812d9 in hk_init () at hkbd.c:1129
#5  0x00005555555cf599 in ui_gtk3_new (cfg=0x55555562c860 <xroar_ui_cfg>) at gtk3/ui_gtk3.c:439
#6  0x0000555555585537 in module_init
    (module=module@entry=0x55555562dae0 <ui_gtk3_module>, cfg=cfg@entry=0x55555562c860 <xroar_ui_cfg>) at module.c:74
#7  0x00005555555a0f97 in xroar_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffdb58) at xroar.c:1032
#8  0x0000555555577a8a in main (argc=1, argv=0x7fffffffdb58) at main_unix.c:48
(gdb)
-- Rolf
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 14, 2024 8:56 pm Thanks.

I really appreciate the effort, but unfortunately, still more or less the same result. Only tested under wsl2 this time...
Well, thank you for testing...

This article mentions an identical crash in pa-applet on a switch to wayland, so I'm at least moderately sure this is due to wayland not doing X11 properly.

The last thing I can think of trying is to force the backend to X11, running like this:

Code: Select all

GDK_BACKEND=x11 xroar
Might do nothing different, as it may already be assuming that backend, but it may be that GTK+ has been doing wayland things all along and just mistakenly returns a valid value when the X11 display it's using is requested from it. XRoar then takes that value and goes on using it to query things.

Otherwise I'm going to have to find some way to try things in wayland...

..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 »

That actually did it! Seems to work with that trick!

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

Re: XRoar 1.6 released

Post by sixxie »

rolfmichelsen wrote: Tue Oct 15, 2024 7:54 pm That actually did it! Seems to work with that trick!
Oh, excellent. I'll push out a release embedding the setenv() into the UI code then.
Post Reply