https://bugs.kde.org/show_bug.cgi?id=527498
Bug ID: 527498
Summary: [macOS] crash on startup with Filesystem Browser
plugin - bundled Qt 6.11.1 has QTBUG-147602, fixed in
6.11.2
Classification: Applications
Product: kate
Version First 26.08.2
Reported In:
Platform: macOS (DMG)
OS: macOS
Status: REPORTED
Severity: crash
Priority: NOR
Component: application
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Kate 26.08.2 (official macOS DMG
kate-release_26.08-12761-macos-clang-arm64.dmg)
crashes before showing a window on macOS 27.2 (26B118), Apple Silicon (M1),
whenever the Filesystem Browser plugin is enabled.
CAUSE
This is not a Kate bug. The bundled Qt 6.11.1 contains QTBUG-147602:
qt_mac_cgImageFormatForImage() returned a struct holding a raw
CGColorSpaceRef that had already been released, so a dangling pointer
reached CGImageCreate. Fixed upstream in Qt 6.11.2 by commit
08e464f8559 ("Fix regression in QImage::toCGImage() with custom color
space"); `git tag --contains 08e464f8559` returns v6.11.2.
Kate reaches it at startup: KateMainWindow construction -> Filesystem
Browser plugin -> KDirOperator::setViewMode() -> setOverrideCursor().
macOS has no stock NSCursor for Qt::WaitCursor, so the Cocoa plugin
builds one from a pixmap and converts it via QImage::toCGImage().
Crashing frames (identical in 26.08.1 and 26.08.2):
0 CoreFoundation __CF_IS_OBJC + 52
1 CoreFoundation CFGetTypeID + 180
2 CoreGraphics CGColorSpaceGetType + 28
3 CoreGraphics valid_image_colorspace + 32
4 CoreGraphics verify_image_parameters + 520
5 CoreGraphics CGImageCreate + 136
6 QtGui QImage::toCGImage() const + 264
8 libqcocoa.dylib (3 frames)
11 QtGui QGuiApplication::setOverrideCursor(QCursor const&) + 228
13 libKF6KIOFileWidgets KDirOperator::setViewMode(KFile::FileView) + 344
14 katefilebrowserplugin.so
19 libkateprivate KateMainWindow::KateMainWindow(...) + 796
EXC_BREAKPOINT (SIGTRAP), esr 0xf200c472 (pointer authentication trap DA).
VERIFICATION
Twenty-line Qt program calling setOverrideCursor(QCursor(Qt::WaitCursor)),
same machine, same OS, same source file:
Qt 6.11.1 (official binary, aqtinstall) -> crashes
Qt 6.11.1 (Kate's bundled build) -> crashes
Qt 6.11.2 (official binary, aqtinstall) -> survives
Qt 6.12.0 (Homebrew) -> survives
#include <QApplication>
#include <QWidget>
#include <QTimer>
#include <QCursor>
int main(int argc, char **argv) {
QApplication app(argc, argv);
QWidget w; w.resize(200, 100); w.show();
QTimer::singleShot(300, [] {
QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
});
return app.exec();
}
Kate 26.08.1 (KF 6.30) and 26.08.2 (KF 6.31) both ship Qt 6.11.1 and
crash at byte-identical offsets, so the 26.08.2 update did not help.
REQUEST
Bump the Qt bundled in the macOS DMG to >= 6.11.2.
USER WORKAROUND
Add to ~/Library/Preferences/katerc:
[Plugins]
katefilebrowserplugin=false
This only protects startup. Any other wait cursor or drag image in a
Qt 6.11.1 app can hit the same trap — see digiKam bugs 524393 and
525294, same root cause via QDrag::exec.
--
You are receiving this mail because:
You are watching all bug changes.