Bug 464734 - Regression in qt5-image-formats-plugins, QPixmap segfaults when loading TIFF files
Summary: Regression in qt5-image-formats-plugins, QPixmap segfaults when loading TIFF ...
Status: REOPENED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords: regression
: 464662 464709 464801 464978 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-01-24 11:46 UTC by Adrien Beau
Modified: 2023-02-02 21:40 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Minimal 5-lines script which reproduces the crash (144 bytes, text/x-python)
2023-01-24 11:46 UTC, Adrien Beau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Beau 2023-01-24 11:46:38 UTC
Created attachment 155556 [details]
Minimal 5-lines script which reproduces the crash

Upgrading libqt5widgets5:amd64 from
version 5.15.8+p22.04+tunstable+git20230113.0101-0 to
version 5.15.8+p22.04+tunstable+git20230119.0043-0
results in a regression in the QPixmap widget.

The QPixmap widget now segfaults when loading TIFF files.
It still works fine for other file types (JPEG, PNG, GIF, BMP).

STEPS TO REPRODUCE

The following minimal 5-lines Python script crashes with a TIFF
file argument (it needs Python3 and PyQt5 installed):

    import sys
    from PyQt5.QtGui import QPixmap
    from PyQt5.QtWidgets import QApplication
    app = QApplication(sys.argv)
    pixmap = QPixmap(sys.argv[1])

Example command-line:

$ python3 broken_qpixmap.py /usr/share/xml/docbook/stylesheet/docbook-xsl/images/tip.tif
Segmentation fault

The same script runs fine with an old Qt version.

A frequently used, more complete program using QPixmap was
working fine right before the upgrade, and now crashes.

SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 5.15.0-58-generic (64-bit)
Running on X11
Comment 1 Jonathan Riddell 2023-01-24 11:52:15 UTC
Thanks for your report.
The reported good build is here
https://build.neon.kde.org/job/jammy_unstable_qt_qtbase_bin_arm64/50/consoleFull

And bad is here
https://build.neon.kde.org/job/jammy_unstable_qt_qtbase_bin_amd64/51/consoleFull

The version of libtiff is the same for both.

No change in the packaging.

Nothing jumps out at me I'm afraid
Comment 2 Adrien Beau 2023-01-24 18:03:34 UTC
Investigating further, another library is a more likely suspect,
upgraded at the same time:

qt5-image-formats-plugins:amd64 was upgraded from
version 5.15.8+p22.04+tunstable+git20230110.1648-0 to
version 5.15.8+p22.04+tunstable+git20230119.0121-0

The previous good build was
https://build.neon.kde.org/view/3%20unstable%20%E2%98%A3%20git%20master/job/jammy_unstable_qt_qtimageformats/20/

The bad build is
https://build.neon.kde.org/view/3%20unstable%20%E2%98%A3%20git%20master/job/jammy_unstable_qt_qtimageformats/21/

I don't see obvious errors in the build outputs.

I see that different revisions of the kde/5.15 branch in the
https://invent.kde.org/qt/qt/qtimageformats repo were built.

Revision abe44c0f526e499668b1131c5990d9b571f99c46 is good.
Revision dbc9c396199ef78e820b40ddb8a4e76c0a86d48c is bad.

Looking at the 3 commits on that branch between the two
revisions, I see a suspicious commit:

    Implement support for file memory mapping for tiff reading 
    https://invent.kde.org/qt/qt/qtimageformats/-/commit/c5c49dd6249c5e12e6aed3e240f485fb3b56ad31

I understand this is a KDE-maintained branch, should I report
the issue somewhere else on this bugtracker, or add the
committer to the CC List of this bug?
Comment 3 Adrien Beau 2023-01-24 19:29:53 UTC
Reverting qt5-image-formats-plugins:amd64 to the previous
version makes TIFF loading work again.

I will try to update the bug title.
Comment 4 Nate Graham 2023-01-24 20:01:42 UTC
*** Bug 464709 has been marked as a duplicate of this bug. ***
Comment 5 Albert Astals Cid 2023-01-24 21:59:29 UTC
Update to a qtbase kde/5.15 >= a644d25e86ec9612a935b52219f32534f386ebcb
Comment 6 Nate Graham 2023-01-25 18:01:54 UTC
*** Bug 464801 has been marked as a duplicate of this bug. ***
Comment 7 Antonio Rojas 2023-01-28 09:59:08 UTC
*** Bug 464662 has been marked as a duplicate of this bug. ***
Comment 8 Antonio Rojas 2023-01-29 15:08:13 UTC
*** Bug 464978 has been marked as a duplicate of this bug. ***
Comment 9 Albert Astals Cid 2023-01-29 15:51:11 UTC
I'm going to reopen this because since the crashes in Neon keep coming it would seem they have not released and update package yet.
Comment 10 Oded Arbel 2023-01-29 16:10:24 UTC
(In reply to Albert Astals Cid from comment #9)
> I'm going to reopen this because since the crashes in Neon keep coming it
> would seem they have not released and update package yet.

The fix is available in Neon unstable and testing (I've verified that it indeed fixes my issue) and something called "release" (not sure what that is).

It isn't in the "user" repositories - where they still have the previous build, "5.15.8+p22.04+tunstable+git20230119.0043-0", though as that is also labeled with "unstable", and unlike other Neon packages - I can't find a "stable" CI build for qtbase - I'm assuming there's some kind of manual process of selecting Qt packages to be promoted to "user", though I can't find any documentation on how to escalate promoting of crash fixes to "user".
Comment 11 Nicolas Fella 2023-02-02 21:40:25 UTC
*** Bug 465191 has been marked as a duplicate of this bug. ***