Bug 283950 - devel/qt6-base: segfaults after update to 6.8.1
Summary: devel/qt6-base: segfaults after update to 6.8.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-09 08:23 UTC by Alexey Vyskubov
Modified: 2025-02-02 09:04 UTC (History)
5 users (show)

See Also:
jhale: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Vyskubov 2025-01-09 08:23:55 UTC
Hello,

I have noticed that after update to 6.8.1 there are no more icons in pcfmanfm-qt and lxqt-panel does not start (it all worked with Qt 6.7.3).

Running lxqt-panel under debugger I get a segfault and a long backtrace that starts with

#0  0x00007fffffffbbc0 in ??? ()
#1  0x00000008017280cd in QPixmap::setDevicePixelRatio(double) () at /usr/local/lib/qt6/libQt6Gui.so.6
#2  0x00000008016d913f in QIcon::pixmap(QSize const&, double, QIcon::Mode, QIcon::State) const () at /usr/local/lib/qt6/libQt6Gui.so.6

Am I right in assuming that qt6-base is to blame?
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2025-01-10 03:53:25 UTC
I just built all of lxqt and the panel runs fine and icons appear in pcmanfm-qt on 15-CURRENT amd64.

I'd suggest rebuilding the lxqt components against Qt 6.8.1 if you have not already done so.
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2025-01-10 04:18:41 UTC
(In reply to Alexey Vyskubov from comment #0)

Just try pkg install -x -f lxqt* pcmanfm-qt

I think it will fix your problem. Greetings
Comment 3 Alexey Vyskubov 2025-01-10 06:52:58 UTC
I tried rebuilding, but it did not help. I will try with pkg now.
Comment 4 Alexey Vyskubov 2025-01-10 09:07:53 UTC
I got the exactly same result after reinstalling the ready-make packages. Maybe I should mention that the computer is headless, and I am running LXQT over VNC or on a remote X server (the same result in both cases).
Comment 5 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2025-01-10 09:42:02 UTC
(In reply to Alexey Vyskubov from comment #4)

Could you try reinstall libfm-qt6? 

# pkg upgrade -f libfm-qt6

Also, I'm running a headless computer but I'm using xrdp instead of vnc. I had the same issue some days ago and I did a pkg upgrade -f for fix it. Maybe you could run it like extreme solution if the command above doesn't work for you.
Comment 6 Alexey Vyskubov 2025-01-10 10:52:18 UTC
reinstallation of libfm-qt6 did not help.

I cannot do the complete pkg upgrade, as it wants to reinstall a bunch of packages compiled with different from my computer options.
Comment 7 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2025-01-12 00:13:07 UTC
pkg upgrade -f libqt6xdg should be the solution to this bug. thanks.
Comment 8 Alexey Vyskubov 2025-01-12 13:51:10 UTC
Recompiling libqt6xdg helped with panel, but I still have no icons in pcmanfm-qt. Will try to recompile it against 6.8.1 as well.
Comment 9 Alexey Vyskubov 2025-01-12 13:53:55 UTC
Recompilation did not help. I also lost quite a lot of icons (but not all) in application menu on lxqt panel.
Comment 10 Alexey Vyskubov 2025-01-12 16:16:31 UTC
Your advice about libqt6xdg helped a lot, thanks! I have solved a rest of my problems by recompiling lxqt-qt6plugin as well. Do you think if it could be useful to have a package message mentioning that? Frankly speaking, I am not sure.
Comment 11 Kevin Reinholz 2025-01-12 17:22:48 UTC
Can confirm rebuilding and reinstalling devel/libqt6xdg and sysutils/lxqt-qt6plugin fixed these same issues for me as well.

My system info:

FreeBSD 14.2-STABLE amd64
Kernel Version 1402501, Userland Version 1402501
Revision n270051
synth-3.03
LLVM version 19.1.5

Shouldn't libqt6xdg and lxqt-qt6plugin receive a portrevision bump to force rebuilding against updated qt6-base? Synth happily reported these packages as "up to date" after rebuilding, so I had to force reinstallation with my updated packages using the pkg tools.
Comment 12 Jason E. Hale freebsd_committer freebsd_triage 2025-01-12 18:17:11 UTC
Looking at the code for libqtxdg, it unfortunately uses some private Qt headers, so will need a PORTREVISON bump with each Qt update. I’ll add that to my task list for next time. Normally, it should not be necessary to rebuild consumers after a Qt release, as ABI compatibility is maintained. Using the private API breaks this promise, however.
Comment 13 Alexey Vyskubov 2025-01-14 09:42:10 UTC
What about lxqt-qt6plugin? Recompiling libqtxdg was not enough for me.
Comment 14 Jason E. Hale freebsd_committer freebsd_triage 2025-01-14 15:00:49 UTC
(In reply to Alexey Vyskubov from comment #13)
Anything that links to libqt6xdg, including lxqt-qt6plugin, should get a bump too.
Comment 15 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2025-01-22 03:16:46 UTC
(In reply to Alexey Vyskubov from comment #13)

If you want fix this issue from pkg, you must run the following:

# pkg upgrade -x -f "lxqt*" libqt6xdg

I tested it and fixed the issue
Comment 16 commit-hook freebsd_committer freebsd_triage 2025-02-02 08:33:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=740d89cf91c1bd58fa7d9a826cdc1847fe667a99

commit 740d89cf91c1bd58fa7d9a826cdc1847fe667a99
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-02-02 07:50:09 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-02-02 08:32:19 +0000

    */*: Bump PORTREVISION for known Qt private API abusers

    Qt 6.8.2 edition.

    These ports directly use or link to a library that uses the Qt
    private API and must be rebuilt with every Qt update.

    Qt public API/ABI compatability is excellent, so most consumers don't
    need to necessarily be rebuilt between patch or even minor releases, but
    using the private API is highly discouraged since this is unstable even
    between patch releases and is really only meant for internal use.

    Adding devel/libqt6xdg and its consumers to the list this time around
    based on [1].

    PR:             283950 [1]

 archivers/lxqt-archiver/Makefile       | 1 +
 deskutils/lxqt-notificationd/Makefile  | 1 +
 devel/liblxqt/Makefile                 | 1 +
 devel/libqt6xdg/Makefile               | 1 +
 net-im/telegram-desktop/Makefile       | 2 +-
 security/lxqt-openssh-askpass/Makefile | 1 +
 security/lxqt-sudo/Makefile            | 1 +
 sysutils/lxqt-admin/Makefile           | 1 +
 sysutils/lxqt-config/Makefile          | 1 +
 sysutils/lxqt-policykit/Makefile       | 1 +
 sysutils/lxqt-powermanagement/Makefile | 1 +
 sysutils/lxqt-qt6plugin/Makefile       | 1 +
 x11-wm/lxqt-panel/Makefile             | 1 +
 x11-wm/lxqt-session/Makefile           | 1 +
 x11-wm/lxqt-wayland-session/Makefile   | 1 +
 x11/lxqt-about/Makefile                | 1 +
 x11/lxqt-globalkeys/Makefile           | 1 +
 x11/lxqt-runner/Makefile               | 1 +
 x11/screengrab/Makefile                | 1 +
 19 files changed, 19 insertions(+), 1 deletion(-)
Comment 17 commit-hook freebsd_committer freebsd_triage 2025-02-02 08:39:36 UTC
A commit in branch 2025Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=68611043c0a6cccee492e28f84e65ad76548238a

commit 68611043c0a6cccee492e28f84e65ad76548238a
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-02-02 07:50:09 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-02-02 08:39:14 +0000

    */*: Bump PORTREVISION for known Qt private API abusers

    Qt 6.8.2 edition.

    These ports directly use or link to a library that uses the Qt
    private API and must be rebuilt with every Qt update.

    Qt public API/ABI compatability is excellent, so most consumers don't
    need to necessarily be rebuilt between patch or even minor releases, but
    using the private API is highly discouraged since this is unstable even
    between patch releases and is really only meant for internal use.

    Adding devel/libqt6xdg and its consumers to the list this time around
    based on [1].

    PR:             283950 [1]
    (cherry picked from commit 740d89cf91c1bd58fa7d9a826cdc1847fe667a99)

 archivers/lxqt-archiver/Makefile       | 1 +
 deskutils/lxqt-notificationd/Makefile  | 1 +
 devel/liblxqt/Makefile                 | 1 +
 devel/libqt6xdg/Makefile               | 1 +
 net-im/telegram-desktop/Makefile       | 2 +-
 security/lxqt-openssh-askpass/Makefile | 1 +
 security/lxqt-sudo/Makefile            | 1 +
 sysutils/lxqt-admin/Makefile           | 1 +
 sysutils/lxqt-config/Makefile          | 1 +
 sysutils/lxqt-policykit/Makefile       | 1 +
 sysutils/lxqt-powermanagement/Makefile | 1 +
 sysutils/lxqt-qt6plugin/Makefile       | 1 +
 x11-wm/lxqt-panel/Makefile             | 1 +
 x11-wm/lxqt-session/Makefile           | 1 +
 x11-wm/lxqt-wayland-session/Makefile   | 1 +
 x11/lxqt-about/Makefile                | 1 +
 x11/lxqt-globalkeys/Makefile           | 1 +
 x11/lxqt-runner/Makefile               | 1 +
 x11/screengrab/Makefile                | 1 +
 19 files changed, 19 insertions(+), 1 deletion(-)
Comment 18 Jason E. Hale freebsd_committer freebsd_triage 2025-02-02 09:04:16 UTC
Closing this with the release of Qt 6.8.2. devel/libqt6xdg and its consumers have been added to my list of ports to bump after Qt6 releases, to put it mildly. Hopefully, it will stop abusing the Qt private API someday since this is slightly inconvenient for me, probably even more so for its users and just bad practice.