KVIrc icon indicating copy to clipboard operation
KVIrc copied to clipboard

kvirc crashes at startup under Fedora 32 wayland

Open sclintow opened this issue 4 years ago • 4 comments

kvirc crashes every time at startup under Fedora 32 when running under wayland gnome. kvirc works fine when running under X11 gnome.

Fedora bug 1780477:
https://bugzilla.redhat.com/show_bug.cgi?id=1780477

I compiled a debug version of kvirc-trunk to grab a back trace.
https://github.com/kvirc/KVIrc/wiki/Grabbing-a-useful-backtrace

(gdb) bt full #0 0x00007ffff7bb1342 in _XInternAtom () at /lib64/libX11.so.6 #1 0x00007ffff7bb16af in XInternAtom () at /lib64/libX11.so.6 #2 0x00000000006afa54 in kvi_ipcLoadAtoms() () at /local/clinton/src/kvirc-trunk/src/kvirc/kernel/KviIpcSentinel.cpp:67 #3 0x00000000006afd2a in kvi_sendIpcMessage(char const*) (message=0x8dd358 "") at /local/clinton/src/kvirc-trunk/src/kvirc/kernel/KviIpcSentinel.cpp:175 sentinel = 140737488343928 #4 0x00000000006df55a in main(int, char**) (argc=1, argv=0x7fffffffd4f8) at /local/clinton/src/kvirc-trunk/src/kvirc/kernel/KviMain.cpp:456 a = {argc = 1, argv = 0x7fffffffd4f8, configFile = 0x0, createFile = false, bForceNewSession = false, bShowPopup = false, bExecuteCommandAndClose = false, szExecCommand = {static null = {<No data fields>}, d = 0x7ffff30b7180 QArrayData::shared_null}, szExecRemoteCommand = {static null = {<No data fields>}, d = 0x7ffff30b7180 QArrayData::shared_null}} iRetCode = 0 pAboutData = 0x8bdc50 pTheApp = 0x8dd600 szRemoteCommand = {static null = {<No data fields>}, d = 0x7ffff30b7180 QArrayData::shared_null} PRETTY_FUNCTION = "int main(int, char**)" iRetVal = 32767

kvirc package version installed.

user ~]$ rpm -qi kvirc Name : kvirc Version : 5.0.0 Release : 8.fc32 Architecture: x86_64 Install Date: Sat 23 May 2020 01:38:17 PM MDT Group : Unspecified Size : 37133381 License : GPLv2+ with exceptions Signature : RSA/SHA256, Wed 29 Jan 2020 05:50:13 PM MST, Key ID 6c13026d12c944d0 Source RPM : kvirc-5.0.0-8.fc32.src.rpm Build Date : Wed 29 Jan 2020 01:12:55 AM MST Build Host : buildvm-03.phx2.fedoraproject.org Packager : Fedora Project Vendor : Fedora Project URL : http://kvirc.net/ Bug URL : https://bugz.fedoraproject.org/kvirc Summary : Free portable IRC client

sclintow avatar Jul 18 '20 21:07 sclintow

KVIrc is using some X11-specific code to handle IPC (inter process communication); this is mainly used to avoid multiple instances of the same application and being able to control it from the commandline. The crash is due to the call of X11 libraries methods when not running on a X11 session. A first step could be adding some "guards" like QX11Info::isPlatformX11() to avoid the X11-specific calls. A proper IPC implementation when running on Wayland is needed.

ctrlaltca avatar Jul 20 '20 06:07 ctrlaltca

D-Bus is a common way to do IPC, and there is a support in Qt for it

DarthGandalf avatar Jul 20 '20 08:07 DarthGandalf

KVIrc is using some X11-specific code to handle IPC (inter process communication); this is mainly used to avoid multiple instances of the same application and being able to control it from the commandline.

If that's the only purpose of this code, can something like SingleApplication be a solution? It even works on wayland (mostly, as wayland QPA does not support requestActivate).

alebastr avatar Oct 29 '20 08:10 alebastr

If that's the only purpose of this code, can something like SingleApplication be a solution? It even works on wayland (mostly, as wayland QPA does not support requestActivate).

That's a possibility. But I don't see how that library can be installed, so that we can find it in CMakeLists.txt to be able to use it.

DarthGandalf avatar Oct 29 '20 09:10 DarthGandalf