[fltk.coredev] Wayland crash and potential patch

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Wayland crash and potential patch Albrecht Schlosser 11:13 Oct 17 top right image
 
Hi Manolo,

when testing the Wayland port (commit 611fe0fee48cea6) for a totally different reason [1] I found a crash related to menu handling.

My demo program is attached as menu_test.cxx. The crash happens when you open a menu as advised by the program, then move the mouse away from the menu and wait for the popup (all within 5 seconds after the start). Close the popup (the menu is still open), move back to the menu, and move the mouse around so that another menu item opens. Or something very similar.

If you miss the 5 second interval you can use the "Restart Timer" menu for another test.

Stack trace attached: crash.txt. The top two lines (#0 and #1) show the issue: "this=0x0".

The fix is to provide another "target" (whatever that means here, I just fixed the symptoms). Maybe the patch must be totally different. My proof of concept is attached as wayland_menu_crash.diff. It fixes the crash for me.

Not directly related: I observed some menu positioning issues after the test scenario is completed (after the patch was applied). I found similar issues with other WM's, so this may not be the fault of the Wayland port.

A second Wayland port related issue is that the menus are not positioned correctly after pressing ctrl/+/- to zoom. It seemed to work fine if you set the FLTK_SCALING_FACTOR env. variable before the start, but I'm not entirely sure about the latter.

Other than that, I didn't have much time to test the Wayland port but I'll go ahead and do some more tests. Thanks for the great work!

––––

[1] STR #1986, STR #1896, and STR 3179 are about similar menu issues in conjunction with popup message. I thought this issue was generally fixed but today I managed to crash my WM (Linux Mint: Cinnamon) with such a menu/popup test. I tested with different WM's and found totally different behaviors. One of my tests was Wayland (Weston).

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1f4fd4f1-e557-0c41-5aa2-3b91e0413558%40online.de.
#0  0x000000000040bd8c in Fl_Widget::parent() const (this=0x0) at ../FL/Fl_Widget.H:241
#1  0x0000000000423398 in Fl_Widget::top_window() const (this=0x0) at Fl_Window.cxx:121
#2  0x0000000000442ccb in Fl_Wayland_Window_Driver::makeWindow() (this=0x628e20) at drivers/Wayland/Fl_Wayland_Window_Driver.cxx:960
#3  0x0000000000441303 in Fl_Wayland_Window_Driver::show() (this=0x628e20) at drivers/Wayland/Fl_Wayland_Window_Driver.cxx:440
#4  0x0000000000423e97 in Fl_Window::show() (this=0x5e0050) at Fl_Window.cxx:542
#5  0x000000000044133e in Fl_Wayland_Window_Driver::show_menu() (this=0x628e20) at drivers/Wayland/Fl_Wayland_Window_Driver.cxx:451
#6  0x0000000000463ae6 in Fl_Menu_Window::show() (this=0x5e0050) at Fl_Menu_Window.cxx:28
#7  0x0000000000462d2b in Fl_Menu_Item::pulldown(int, int, int, int, Fl_Menu_Item const*, Fl_Menu_ const*, Fl_Menu_Item const*, int) const (this=0x499880 <menutable>, X=0, Y=0, W=600, H=30, initial_item=0x0, pbutton=
    0x7fffffffd8c0, title=0x0, menubar=1) at Fl_Menu.cxx:927
#8  0x00000000004183dc in Fl_Menu_Bar::handle(int) (this=0x7fffffffd8c0, event=1) at Fl_Menu_Bar.cxx:52
#9  0x00000000004115a4 in send(Fl_Widget*, int) (o=0x7fffffffd8c0, event=1) at Fl_Group.cxx:95
#10 0x0000000000411ced in Fl_Group::handle(int) (this=0x7fffffffd960, event=1) at Fl_Group.cxx:225
#11 0x0000000000424080 in Fl_Window::handle(int) (this=0x7fffffffd960, ev=1) at Fl_Window.cxx:590
#12 0x0000000000409b06 in send_event(int, Fl_Widget*, Fl_Window*) (event=1, to=0x7fffffffd960, window=0x7fffffffd960) at Fl.cxx:1044
#13 0x0000000000409d02 in Fl::handle_(int, Fl_Window*) (e=1, window=0x7fffffffd960) at Fl.cxx:1173
#14 0x0000000000409b9d in Fl::handle(int, Fl_Window*) (e=1, window=0x7fffffffd960) at Fl.cxx:1124
#15 0x000000000043c5ca in pointer_button(void*, wl_pointer*, uint32_t, uint32_t, uint32_t, uint32_t) (data=0x4c64f0, wl_pointer=0x4c7dc0, serial=3905, time=2405637708, button=272, state=1)
    at drivers/Wayland/Fl_Wayland_Screen_Driver.cxx:402
#16 0x00007ffff74cfff5 in  () at /usr/lib/x86_64-linux-gnu/libffi.so.7
#17 0x00007ffff74cf40a in  () at /usr/lib/x86_64-linux-gnu/libffi.so.7
#18 0x00007ffff7dad3a8 in  () at /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#19 0x00007ffff7da9c48 in  () at /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#20 0x00007ffff7dab21c in wl_display_dispatch_queue_pending () at /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#21 0x000000000043debd in fd_callback(int, wl_display*) (unused=3, display=0x4c0dd0) at drivers/Wayland/Fl_Wayland_Screen_Driver.cxx:990
#22 0x000000000044973a in Fl_Wayland_Screen_Driver::poll_or_select_with_delay(double) (this=0x4c0b80, time_to_wait=1.9162669999999997) at drivers/Wayland/Fl_wayland.cxx:226
#23 0x000000000043e730 in Fl_Wayland_Screen_Driver::wait(double) (this=0x4c0b80, time_to_wait=1.9162669999999997) at drivers/Wayland/Fl_Wayland_Screen_Driver.cxx:1201
#24 0x0000000000408c8c in Fl::wait(double) (time_to_wait=1e+20) at Fl.cxx:449
#25 0x0000000000408cb3 in Fl::run() () at Fl.cxx:469
#26 0x0000000000408472 in main(int, char**) (argc=1, argv=0x7fffffffdb88) at menu_test.cxx:88
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.