FedoraQt / adwaita-qt

A style to bend Qt applications to look like they belong into GNOME Shell
Other
488 stars 48 forks source link

Commit db5c502d causes Wireshark to SEGFAULT #138

Closed guihkx closed 4 years ago

guihkx commented 4 years ago

Hello.

Wireshark started crashing for me a while ago, and since then I've been asking random people if they were experience that same crash, but none of them were. So, a few days ago I changed my Qt theme to kvantum (for reasons unrelated to this), and I had totally forgotten that Wireshark was crashing for me, so I opened it. And to my surprise, it wasn't crashing anymore.

However, I do remember that Wireshark used to work just fine with adwaita-qt, so I decided to run a git bisect to find out what's causing the crash.

bisect.log:

git bisect start
# good: [1d09ba4c764a62e4275ad0667ec3e61916fa9957] Do not crash when accessing icon from qquickcombobox
git bisect good 1d09ba4c764a62e4275ad0667ec3e61916fa9957
# bad: [e5dfd0be75b31dc3b823de0c4bd320b9a6995b89] Views: do not set color to views which don't use our palette
git bisect bad e5dfd0be75b31dc3b823de0c4bd320b9a6995b89
# good: [e671e8e88d90332d65e3f8396bb98393fc50bafe] Item views: don't use different text color for unfocused views This however seems to work only for QTreeView
git bisect good e671e8e88d90332d65e3f8396bb98393fc50bafe
# bad: [ebd3ff2f1a3259f18d691a360a411c266421f6e3] Implement standardPalette() as some apps may use it
git bisect bad ebd3ff2f1a3259f18d691a360a411c266421f6e3
# bad: [b905a5db48c0b4493dd4908eb1fd31c2b642b74c] QCheckBox: draw tick mark in the middle and disable animation on uncheck
git bisect bad b905a5db48c0b4493dd4908eb1fd31c2b642b74c
# bad: [db5c502dd5a5253a89e3e163101301d392bf6d93] Item views: don't use different text color for unfocused views (version 2) This however seems to work only for QTreeView
git bisect bad db5c502dd5a5253a89e3e163101301d392bf6d93
# first bad commit: [db5c502dd5a5253a89e3e163101301d392bf6d93] Item views: don't use different text color for unfocused views (version 2) This however seems to work only for QTreeView

Since I don't know how to actually fix it, I've simply removed this whole section, recompiled adwaita-qt, and now Wireshark doesn't crash anymore.

Here's some information about the software that I'm using:

OS: Arch Linux Qt: 5.14.2 Wireshark: 3.2.4 qgnomeplatform: 0.6.1

Hope that helps, Thanks.

guihkx commented 4 years ago

I've tried getting a trace with gdb, but I only had symbols for wireshark and qt5-base, so I'm not even sure if it has any use...

wireshark-gdb-trace.log

grulja commented 4 years ago

Can you try to build current master? Without removing that mentioned part? Because that one should be working in my opinion, I fixed it with https://github.com/FedoraQt/adwaita-qt/commit/804939babf8304794f583f8b9ca93c7f856d4248.

grulja commented 4 years ago

I can reproduce the crash when I revert https://github.com/FedoraQt/adwaita-qt/commit/804939babf8304794f583f8b9ca93c7f856d4248, but it seems to work if apply it again so I really believe your issue is fixed already in Adwaita-qt 1.1.3.

guihkx commented 4 years ago

I can reproduce the crash when I revert 804939b, but it seems to work if apply it again so I really believe your issue is fixed already in Adwaita-qt 1.1.3.

Hmm, that's odd. It still crashes for me in 804939b (1.1.3). However, if I build against master, it doesn't crash anymore, so that's nice.

But just to be sure I wasn't messing something up, I've tested it with these two AUR packages:

https://aur.archlinux.org/packages/adwaita-qt/ (1.1.3) https://aur.archlinux.org/packages/adwaita-qt-git/ (e5dfd0be)

And I can only experience the crash with the first package, so the actual fix seems to be in e5dfd0be, indeed.

grulja commented 4 years ago

You are right, it seems to work only with master. I will make another release so everyone makes the update.