Bug 5453

Summary: Mythtv segfault on playback in Wayland
Product: Fedora Reporter: Russell Odom <russ+bz-rf>
Component: mythtvAssignee: Richard <hobbes1069>
Status: RESOLVED WORKSFORME    
Severity: major CC: jarod, leigh123linux, sergio
Priority: P1    
Version: f31   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description Russell Odom 2019-11-12 21:25:48 CET
I've just upgraded from f29 to f31. Now, on attempting to play a recorded programme on mythfrontend, it crashes. This appears in the output if I run it in a terminal:

2019-11-12 20:13:45.534004 E  mythxdisplay.cpp:257:CheckErrors  
XError type: 0
  serial no: 8
   err code: 9 (BadDrawable (invalid Pixmap or Window parameter))
   req code: 55
 minor code: 0
resource id: 1

Handling Segmentation fault
Segmentation fault (core dumped)

This is on mythtv-frontend-30.0-12.20190904git5cde0578d8.fc31.x86_64 and appears to be 100% consistent regardless of which recording I pick.
Comment 1 Richard 2019-11-12 21:32:18 CET
I'm still on f30 so there's not much to go on. I usually wait a month or so just to let things settle down :)

At this point I just haven't had time. 

Are you logging in with Wayland or Xorg?
Comment 2 Russell Odom 2019-11-12 21:39:40 CET
I was just testing that very thing when you replied. I can confirm it crashes under Wayland but not with Xorg.
Comment 3 Richard 2019-11-12 21:43:08 CET
Ok, followup question... What video chipset? I'm guessing not Nvidia since it should default to Xorg.
Comment 4 Russell Odom 2019-11-12 21:53:30 CET
In "About" it says "Intel® Ironlake Mobile". lspci tells me:
00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 12) (prog-if 00 [VGA controller])
	DeviceName:  Onboard IGD
	Subsystem: Wistron Corp. Medion Akoya E7214 Notebook PC [MD98410] [17c0:10d9]
	Flags: bus master, fast devsel, latency 0, IRQ 30
	Memory at fac00000 (64-bit, non-prefetchable) [size=4M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f080 [size=8]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915
	Kernel modules: i915

(it's a pretty old laptop)
Comment 5 Richard 2019-11-12 22:00:47 CET
I wouldn't expect to have a problem with Intel... It would probably be a good idea to ask on the mythtv mailing list if you're already on it, otherwise I can when I get a second.
Comment 6 Russell Odom 2019-11-12 22:24:52 CET
I'm not on the mailing list - I'd appreciate it if you could ask!
Comment 7 Richard 2019-11-14 17:29:42 CET
Got a response, basically, don't run Wayland for now:

https://code.mythtv.org/trac/ticket/13483

I'll leave this bug open but not really much I can do on this end.
Comment 8 Sérgio Basto 2019-11-21 02:10:30 CET
(In reply to Richard from comment #7)
> Got a response, basically, don't run Wayland for now:
> 
> https://code.mythtv.org/trac/ticket/13483
> 
> I'll leave this bug open but not really much I can do on this end.


and running QT_QPA_PLATFORM=xcb mythfrontend ? fix it for you ?
Comment 9 Russell Odom 2019-11-22 20:42:40 CET
Yes, that works (it also works under Xorg). Worth rolling out an updated mythfrontend with that in, until this is fixed properly upstream?
Comment 10 Richard 2019-11-22 20:49:43 CET
I've never had to package environment variables, would I use this method:

https://fedoraproject.org/wiki/Packaging:EnvironmentModules
Comment 11 Richard 2019-11-22 21:14:55 CET
Reading that link a few times I think if I add that to a module file it's going to force ALL qt applications to run under X11. I don't think there is a way to limit it to mythfrontend (or myth-setup).
Comment 12 Sérgio Basto 2019-11-23 00:52:00 CET
(In reply to Russell Odom from comment #9)
> Yes, that works (it also works under Xorg). Worth rolling out an updated
> mythfrontend with that in, until this is fixed properly upstream?

1 - VirtualBox 
https://bugzilla.rpmfusion.org/show_bug.cgi?id=5383 
filed a bug in fedora 
https://bugzilla.redhat.com/show_bug.cgi?id=1758724
The maintainer said that the reason for the crash is the hard coded
dependencies on X11 API, without forcing the Qt's backend to be the one
it depends on.

2 - smplayer   
https://bugzilla.rpmfusion.org/show_bug.cgi?id=5438

3 - Today mixxx commit 
https://pkgs.rpmfusion.org/cgit/free/mixxx.git/commit/?id=709069aaddacf11bf552ebdb364655eea166eddb
Use XCB instead of the default Qt Wayland platform adapter
https://bugs.launchpad.net/mixxx/+bug/1850729

4 - https://bugzilla.redhat.com/show_bug.cgi?id=1768244

and now 5 - mythtv , it is Qt_Wayland [1]  also remove qt-wayland fix the problem . But kde guy doesn't want assume the problem ... 


[1]
https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
Comment 13 leigh scott 2019-11-24 07:03:49 CET
(In reply to Sérgio Basto from comment #12)
> (In reply to Russell Odom from comment #9)
> > Yes, that works (it also works under Xorg). Worth rolling out an updated
> > mythfrontend with that in, until this is fixed properly upstream?
> 
> 1 - VirtualBox 
> https://bugzilla.rpmfusion.org/show_bug.cgi?id=5383 
> filed a bug in fedora 
> https://bugzilla.redhat.com/show_bug.cgi?id=1758724
> The maintainer said that the reason for the crash is the hard coded
> dependencies on X11 API, without forcing the Qt's backend to be the one
> it depends on.
> 
> 2 - smplayer   
> https://bugzilla.rpmfusion.org/show_bug.cgi?id=5438
> 
> 3 - Today mixxx commit 
> https://pkgs.rpmfusion.org/cgit/free/mixxx.git/commit/
> ?id=709069aaddacf11bf552ebdb364655eea166eddb
> Use XCB instead of the default Qt Wayland platform adapter
> https://bugs.launchpad.net/mixxx/+bug/1850729
> 
> 4 - https://bugzilla.redhat.com/show_bug.cgi?id=1768244
> 
> and now 5 - mythtv , it is Qt_Wayland [1]  also remove qt-wayland fix the
> problem . But kde guy doesn't want assume the problem ... 
> 
> 
> [1]
> https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome

I wouldn't bother adding any env hack just to accommodate broken qt5 wayland, IMO it's their job to fix.
Perhaps we could add something to the rpmfusion wiki recommending users to remove qt-wayland instead or adding an override to /etc/profile.d/ to make system wide.
Fixing each individual app isn't an acceptable option.
Comment 14 Richard 2019-12-26 14:12:42 CET
I just tried playing back on a fully updated f31 laptop running Wayland and I can not reproduce any crash.
Comment 15 Russell Odom 2019-12-29 17:28:37 CET
Likewise - I don't know what changed, but it's now working for me.