Bug 473419

Summary: Crash after exporting a kra to a png on OSX. Export works, but a segmentation fault occurs.
Product: [Applications] krita Reporter: Reto Spoerri <rspoerri>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: ghevan
Priority: NOR    
Version: 5.1.5   
Target Milestone: ---   
Platform: Homebrew (macOS)   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Reto Spoerri 2023-08-15 14:00:11 UTC
SUMMARY
Crash after exporting a kra to a png on OSX. Export works, but a segmentation fault occurs.

STEPS TO REPRODUCE
1. /Applications/krita.app/Contents/MacOS/krita out.png --export --export-filename in.kra

OBSERVED RESULT
File is exported, after that krita segfaults.

EXPECTED RESULT
File is exported, krita exits cleanly.

SOFTWARE/OS VERSIONS
macOS: macOS 13.4.1 (22F770820d) on Apple Silicon (M2)
Comment 1 vanyossi 2023-08-15 20:39:00 UTC
The bug is present in 5.1.5 but not in 5.2-beta or master, the crash happened in Qt's code apparently

thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x60000304087008)
  * frame #0: 0x00000001039abf00 QtCore`AppleUnifiedLogger::cachedLog(QString const&, QString const&) + 608
    frame #1: 0x00000001039ab99c QtCore`AppleUnifiedLogger::messageHandler(QtMsgType, QMessageLogContext const&, QString const&, QString const&) + 228
    frame #2: 0x00000001037b1c2c QtCore`___lldb_unnamed_symbol6585 + 56
    frame #3: 0x00000001037b1918 QtCore`___lldb_unnamed_symbol6583 + 240
    frame #4: 0x00000001037b180c QtCore`qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) + 20
    frame #5: 0x0000000103899ed4 QtCore`QDebug::~QDebug() + 124
    frame #6: 0x00000001021e1224 libkritaimage.18.dylib`KisTileDataStore::~KisTileDataStore() + 156
    frame #7: 0x00000001021e2594 libkritaimage.18.dylib`___lldb_unnamed_symbol7255 + 32
    frame #8: 0x00000001beab3dd0 libsystem_c.dylib`__cxa_finalize_ranges + 464
    frame #9: 0x00000001beab3b74 libsystem_c.dylib`exit + 44
    frame #10: 0x00000001bebd4ec4 libdyld.dylib`dyld4::LibSystemHelpers::exit(int) const + 20
    frame #11: 0x00000001006a10d8 dyld`start + 596

marking as fixed