Summary: | Spectacle segmentation fault in libjasper after copying image to clipboard | ||
---|---|---|---|
Product: | [Applications] Spectacle | Reporter: | CUI Hao <cuihao.leo> |
Component: | General | Assignee: | Boudhayan Gupta <me> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | alex, bruno, gregory, kde, nate, yerrey |
Priority: | NOR | ||
Version: | 22.04.2 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://bugreports.qt.io/browse/QTBUG-104398 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
CUI Hao
2022-06-15 19:54:47 UTC
Are you using JP2 file format in Configure -> Save -> Filename? Looking into this I stumbled upon that JP2 doesn't seem to work at all when saving images producing only 333B empty file and are then prompted with the same deprecation warning you posted. (In reply to Yerrey Dev from comment #1) > Are you using JP2 file format in Configure -> Save -> Filename? > It's PNG. I never changed the setting. I also wonder about why JP2 format is used. But I couldn't find a clue in the code. I can confirm Gwenview and possibly other Qt programs crashes at the same place when copying image data. I reproduced the bug using this very simple Qt program: ``` int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; auto clipboard = QApplication::clipboard(); auto data = new QMimeData(); QPixmap pixmap(128, 128); pixmap.fill(); auto image = pixmap.toImage(); data->setImageData(image); clipboard->setMimeData(data); w.show(); return a.exec(); } ``` The error happens in QEventLoop. I don't know how to debug. I blindly searched `Jpeg2000JasperReader` references but found none in Qt5 code. Well, copying is now OK after I rebooted the system. Saving as jp2 file still triggers segfault. There was probably another bug in clipboard functions. But I think we can focus on the jp2 issue for now... So this is not a Spectacle-specific bug. It's a bug of Qt or Jasper. FYI, I submitted a bug report to Qt: https://bugreports.qt.io/browse/QTBUG-104398 Thank you very much! *** Bug 468989 has been marked as a duplicate of this bug. *** *** Bug 470217 has been marked as a duplicate of this bug. *** |