You are not logged in.
Hello all,
Recently I started to experience some crashes in various KDE applications, which were pointing towards Calligra segfault'ing when invoked to process RTF files (e.g. to generate previews).
I found a bug filed upstream a few months ago (Dec '25) (https://bugs.kde.org/show_bug.cgi?id=512888), but after fiddling around a bit I tried just rebuilding the package and the issue seems to have disappeared.
As the package has been already rebuild a few times since the original bug report I'd guess the issue may lie with the particular settings and environment used to actually build it.
For reference, I'm building using {march,mtune}=native, and running
gcc --{march,mtune}=native -Q --help-targetreturns:
The following options are target specific:
-m128bit-long-double [enabled]
-m16 [disabled]
-m32 [disabled]
-m3dnow [disabled]
-m3dnowa [disabled]
-m64 [enabled]
-m80387 [enabled]
-m8bit-idiv [disabled]
-m96bit-long-double [disabled]
-mabi= sysv
-mabm [enabled]
-maccumulate-outgoing-args [disabled]
-maddress-mode= long
-madx [enabled]
-maes [enabled]
-malign-data= compat
-malign-double [disabled]
-malign-functions= 0
-malign-jumps= 0
-malign-loops= 0
-malign-stringops [enabled]
-mamx-avx512 [disabled]
-mamx-bf16 [disabled]
-mamx-complex [disabled]
-mamx-fp16 [disabled]
-mamx-fp8 [disabled]
-mamx-int8 [disabled]
-mamx-movrs [disabled]
-mamx-tf32 [disabled]
-mamx-tile [disabled]
-mamx-transpose [disabled]
-mandroid [disabled]
-mapx-features= none
-mapx-inline-asm-use-gpr32 [disabled]
-mapxf [disabled]
-march= rocketlake
-masm= att
-mavx [enabled]
-mavx10.1 [disabled]
-mavx10.1-256 [disabled]
-mavx10.1-512 -mavx10.1
-mavx10.2 [disabled]
-mavx2 [enabled]
-mavx256-split-unaligned-load [disabled]
-mavx256-split-unaligned-store [disabled]
-mavx512bf16 [disabled]
-mavx512bitalg [enabled]
-mavx512bw [enabled]
-mavx512cd [enabled]
-mavx512dq [enabled]
-mavx512f [enabled]
-mavx512fp16 [disabled]
-mavx512ifma [enabled]
-mavx512vbmi [enabled]
-mavx512vbmi2 [enabled]
-mavx512vl [enabled]
-mavx512vnni [enabled]
-mavx512vp2intersect [disabled]
-mavx512vpopcntdq [enabled]
-mavxifma [disabled]
-mavxneconvert [disabled]
-mavxvnni [disabled]
-mavxvnniint16 [disabled]
-mavxvnniint8 [disabled]
-mbionic [disabled]
-mbmi [enabled]
-mbmi2 [enabled]
-mbranch-cost=<0,5> 3
-mcall-ms2sysv-xlogues [disabled]
-mcet-switch [disabled]
-mcld [disabled]
-mcldemote [disabled]
-mclflushopt [enabled]
-mclwb [disabled]
-mclzero [disabled]
-mcmodel= [default]
-mcmpccxadd [disabled]
-mcpu=
-mcrc32 [enabled]
-mcx16 [enabled]
-mdaz-ftz [disabled]
-mdirect-extern-access [enabled]
-mdispatch-scheduler [disabled]
-mdump-tune-features [disabled]
-menqcmd [disabled]
-mevex512 [enabled]
-mf16c [enabled]
-mfancy-math-387 [enabled]
-mfentry [disabled]
-mfentry-name=
-mfentry-section=
-mfma [enabled]
-mfma4 [disabled]
-mforce-drap [disabled]
-mforce-indirect-call [disabled]
-mfp-ret-in-387 [enabled]
-mfpmath= sse
-mfsgsbase [enabled]
-mfunction-return= keep
-mfused-madd -ffp-contract=fast
-mfxsr [enabled]
-mgather -mtune-ctrl=use_gather
-mgeneral-regs-only [disabled]
-mgfni [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mharden-sls= none
-mhle [enabled]
-mhreset [disabled]
-miamcu [disabled]
-mieee-fp [enabled]
-mincoming-stack-boundary= 0
-mindirect-branch-cs-prefix [disabled]
-mindirect-branch-register [disabled]
-mindirect-branch= keep
-minline-all-stringops [disabled]
-minline-stringops-dynamically [disabled]
-minstrument-return= none
-mintel-syntax -masm=intel
-mkl [disabled]
-mlam= none
-mlarge-data-threshold=<number> 65536
-mlong-double-128 [disabled]
-mlong-double-64 [disabled]
-mlong-double-80 [enabled]
-mlwp [disabled]
-mlzcnt [enabled]
-mmanual-endbr [disabled]
-mmemcpy-strategy=
-mmemset-strategy=
-mmitigate-rop [disabled]
-mmmx [enabled]
-mmovbe [enabled]
-mmovdir64b [disabled]
-mmovdiri [disabled]
-mmove-max= 256
-mmovrs [disabled]
-mmpx [disabled]
-mms-bitfields [disabled]
-mmusl [disabled]
-mmwait [enabled]
-mmwaitx [disabled]
-mneeded [disabled]
-mno-align-stringops [disabled]
-mno-default [disabled]
-mno-fancy-math-387 [disabled]
-mno-push-args [disabled]
-mno-red-zone [disabled]
-mno-sse4 [disabled]
-mnop-mcount [disabled]
-mnoreturn-no-callee-saved-registers [disabled]
-momit-leaf-frame-pointer [disabled]
-mpartial-vector-fp-math [enabled]
-mpc32 [disabled]
-mpc64 [disabled]
-mpc80 [disabled]
-mpclmul [enabled]
-mpcommit [disabled]
-mpconfig [disabled]
-mpku [enabled]
-mpopcnt [enabled]
-mprefer-avx128 -mprefer-vector-width=128
-mprefer-vector-width= 256
-mpreferred-stack-boundary= 0
-mprefetchi [disabled]
-mprfchw [enabled]
-mptwrite [disabled]
-mpush-args [enabled]
-mraoint [disabled]
-mrdpid [enabled]
-mrdrnd [enabled]
-mrdseed [enabled]
-mrecip [disabled]
-mrecip=
-mrecord-mcount [disabled]
-mrecord-return [disabled]
-mred-zone [enabled]
-mregparm= 6
-mrelax-cmpxchg-loop [disabled]
-mrtd [disabled]
-mrtm [disabled]
-msahf [enabled]
-mscatter -mtune-ctrl=use_scatter
-mserialize [disabled]
-msgx [disabled]
-msha [enabled]
-msha512 [disabled]
-mshstk [disabled]
-mskip-rax-setup [disabled]
-msm3 [disabled]
-msm4 [disabled]
-msoft-float [disabled]
-msse [enabled]
-msse2 [enabled]
-msse2avx [disabled]
-msse3 [enabled]
-msse4 [enabled]
-msse4.1 [enabled]
-msse4.2 [enabled]
-msse4a [disabled]
-msse5 -mavx
-msseregparm [disabled]
-mssse3 [enabled]
-mstack-arg-probe [disabled]
-mstack-protector-guard-offset=
-mstack-protector-guard-reg=
-mstack-protector-guard-symbol=
-mstack-protector-guard= tls
-mstackrealign [disabled]
-mstore-max= 256
-mstringop-strategy= [default]
-mstv [enabled]
-mtbm [disabled]
-mtls-dialect= gnu
-mtls-direct-seg-refs [enabled]
-mtsxldtrk [disabled]
-mtune-ctrl=
-mtune= rocketlake
-muclibc [disabled]
-muintr [disabled]
-munroll-only-small-loops [disabled]
-musermsr [disabled]
-mvaes [enabled]
-mveclibabi= [default]
-mvect8-ret-in-mem [disabled]
-mvpclmulqdq [enabled]
-mvzeroupper [disabled]
-mwaitpkg [disabled]
-mwbnoinvd [disabled]
-mwidekl [disabled]
-mx32 [disabled]
-mxop [disabled]
-mxsave [enabled]
-mxsavec [enabled]
-mxsaveopt [enabled]
-mxsaves [enabled]
Known assembler dialects (for use with the -masm= option):
att intel
Known ABIs (for use with the -mabi= option):
ms sysv
Known code models (for use with the -mcmodel= option):
32 kernel large medium small
Valid arguments to -mfpmath=:
387 387+sse 387,sse both sse sse+387 sse,387
Known choices for mitigation against straight line speculation with -mharden-sls=:
all indirect-jmp none return
Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
keep thunk thunk-extern thunk-inline
Known choices for return instrumentation with -minstrument-return=:
call none nop5
Known data alignment choices (for use with the -malign-data= option):
abi cacheline compat
Known vectorization library ABIs (for use with the -mveclibabi= option):
acml aocl svml
Known address mode (for use with the -maddress-mode= option):
long short
Known preferred register vector length (to use with the -mprefer-vector-width= option):
128 256 512 none
Known stack protector guard (for use with the -mstack-protector-guard= option):
global tls
Valid arguments to -mstringop-strategy=:
byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop
Known TLS dialects (for use with the -mtls-dialect= option):
gnu gnu2
Known valid arguments for -march= option:
i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids emeraldrapids alderlake raptorlake meteorlake graniterapids graniterapids-d arrowlake arrowlake-s lunarlake pantherlake diamondrapids bonnell atom silvermont slm goldmont goldmont-plus tremont gracemont sierraforest grandridge clearwaterforest intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 lujiazui yongfeng shijidadao k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 znver4 znver5 btver1 btver2 generic native
Known valid arguments for -mtune= option:
generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont sierraforest grandridge clearwaterforest skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake graniterapids graniterapids-d arrowlake arrowlake-s pantherlake diamondrapids intel lujiazui yongfeng shijidadao geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3 znver4 znver5EDIT: Rebuilding Calligra fixes the application crashing itself when opening RTF files, while kio_worker still crashes trying to generate the previews - seemingly following the same code paths in the backtrace as before. Hmm.
Last edited by juma93 (2026-02-10 23:12:53)
Offline
I tried to inspect some more, to understand whether that's an upstream or downstream bug, but as I'm not that familiar with C++ I hit a dead end.
The backtraces for Calligra (rebuilt, does not crash), and KIOWorker (rebuild, still segfaults) look basically the same, i.e.,
KIOWorker (crash dump):
Thread 1 (Thread 0x7f7aa4216a00 (LWP 42139)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007f7aa8ea79d3 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:89
#2 0x00007f7aa8e4d3a0 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3 0x00007f7aa9f1ee57 in KCrash::defaultCrashHandler(int) () at /usr/lib/libKF6Crash.so.6
#4 0x00007f7aa8e4d4d0 in <signal handler called> () at /usr/lib/libc.so.6
#5 QStringDecoder::decodeAsString (this=0x7ffd79653c40, in=...) at /usr/include/qt6/QtCore/qstringconverter.h:141
#6 0x00007f7a68ddab16 in QStringDecoder::EncodedData<QByteArray const&>::operator QString (this=0x7ffd79653c00) at /usr/include/qt6/QtCore/qstringconverter.h:105
#7 0x00007f7a68dd85ff in RtfReader::TextDocumentRtfOutput::appendText (this=0x7ffd79653fa0, text=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/TextDocumentRtfOutput.cpp:52
#8 0x00007f7a68dd120a in RtfReader::DocumentDestination::handlePlainText (this=0x56460d48bbd0, plainText=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/DocumentDestination.cpp:142
#9 0x00007f7a68dc4d3c in RtfReader::Reader::parseDocument (this=0x7ffd79653f30) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:307
#10 0x00007f7a68dc287e in RtfReader::Reader::parseFile (this=0x7ffd79653f30) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:96
#11 0x00007f7a68dc2807 in RtfReader::Reader::parseTo (this=0x7ffd79653f30, output=0x7ffd79653fa0) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:86
#12 0x00007f7a6b272a0f in RTFImport::convert (this=0x56460d48db30, from=..., to=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/rtfimport.cpp:63
#13 0x00007f7a9cd098b8 in CalligraFilter::ChainLink::invokeFilter (this=0x56460d48e370, parentChainLink=0x0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterChainLink.cpp:75
#14 0x00007f7a9ccfc9e4 in KoFilterChain::invokeChain (this=0x56460d479ee0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterChain.cpp:89
#15 0x00007f7a9ccf2905 in KoFilterManager::importDocument (this=0x56460d2ef030, url=..., documentMimeType=..., status=@0x7ffd79654460: 133169152) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterManager.cpp:159
#16 0x00007f7a9cca63e0 in KoDocument::openFile (this=0x56460d307ac0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:1439
#17 0x00007f7a9cc9ce41 in KoDocument::Private::openFile (this=0x56460d313550) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:272
#18 0x00007f7a9cc9cfc5 in KoDocument::Private::openLocalFile (this=0x56460d313550) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:294
#19 0x00007f7a9ccaf256 in KoDocument::openUrlInternal (this=0x56460d307ac0, url=...) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:2651
#20 0x00007f7a9cca5083 in KoDocument::openUrl (this=0x56460d307ac0, _url=...) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:1252
#21 0x00007f7a9e2b2657 in CalligraCreator::create (this=0x56460d1fe2a0, request=...) at /usr/src/debug/calligra/calligra-25.12.2/extras/thumbnail/calligracreator.cpp:93
#22 0x00007f7aa9f656d0 in ThumbnailProtocol::createThumbnail (this=0x7ffd79654df0, thumbCreator=0x56460d2d93f0, filePath=..., width=128, height=128, thumbnail=...) at /usr/src/debug/kio-extras/kio-extras-25.12.2/thumbnail/thumbnail.cpp:882
#23 0x00007f7aa9f616df in ThumbnailProtocol::get (this=0x7ffd79654df0, url=...) at /usr/src/debug/kio-extras/kio-extras-25.12.2/thumbnail/thumbnail.cpp:340
#24 0x00007f7aa9ce4ec0 in KIO::WorkerSlaveBaseBridge::get (this=0x56460d1cd550, url=...) at /usr/src/debug/kio/kio-6.22.1/src/core/workerbase_p.h:71
#25 0x00007f7aa9cdf50d in KIO::SlaveBase::dispatch (this=0x56460d1cd550, command=67, data=...) at /usr/src/debug/kio/kio-6.22.1/src/core/slavebase.cpp:1121
#26 0x00007f7aa9cda144 in KIO::SlaveBase::dispatchLoop (this=0x56460d1cd550) at /usr/src/debug/kio/kio-6.22.1/src/core/slavebase.cpp:330
#27 0x00007f7aa9ce5c78 in KIO::WorkerBase::dispatchLoop (this=0x7ffd79654df0) at /usr/src/debug/kio/kio-6.22.1/src/core/workerbase.cpp:27
#28 0x00007f7aa9f6055c in kdemain (argc=4, argv=0x7ffd79655978) at /usr/src/debug/kio-extras/kio-extras-25.12.2/thumbnail/thumbnail.cpp:208
#29 0x00005645f7f25e32 in main (argc=5, argv=0x7ffd79655ae8) at /usr/src/debug/kio/kio-6.22.1/src/kioworker/kioworker.cpp:144Calligra (gdb stack on opening the same file):
#0 QByteArrayView::QByteArrayView<QByteArray, true> (this=0x7fffffffb9c0, ba=..., this=<optimized out>, ba=<optimized out>) at /usr/include/qt6/QtCore/qbytearrayview.h:170
#1 0x00007fffbc2e5afc in QStringDecoder::EncodedData<QByteArray const&>::operator QString (this=0x7fffffffba20) at /usr/include/qt6/QtCore/qstringconverter.h:105
#2 0x00007fffbc2e35ff in RtfReader::TextDocumentRtfOutput::appendText (this=0x7fffffffbdc0, text=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/TextDocumentRtfOutput.cpp:52
#3 0x00007fffbc2dc20a in RtfReader::DocumentDestination::handlePlainText (this=0x555555f4f920, plainText=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/DocumentDestination.cpp:142
#4 0x00007fffbc2cfd3c in RtfReader::Reader::parseDocument (this=0x7fffffffbd50) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:307
#5 0x00007fffbc2cd87e in RtfReader::Reader::parseFile (this=0x7fffffffbd50) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:96
#6 0x00007fffbc2cd807 in RtfReader::Reader::parseTo (this=0x7fffffffbd50, output=0x7fffffffbdc0) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/rtfreader.cpp:86
#7 0x00007fffc0a30a0f in RTFImport::convert (this=0x555555f47660, from=..., to=...) at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/rtfimport.cpp:63
#8 0x00007ffff7e728b8 in CalligraFilter::ChainLink::invokeFilter (this=0x555555f454d0, parentChainLink=0x0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterChainLink.cpp:75
#9 0x00007ffff7e659e4 in KoFilterChain::invokeChain (this=0x555555effaa0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterChain.cpp:89
#10 0x00007ffff7e5b905 in KoFilterManager::importDocument (this=0x5555556f1cb0, url=..., documentMimeType=..., status=@0x7fffffffc280: 133169152) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoFilterManager.cpp:159
#11 0x00007ffff7e0f3e0 in KoDocument::openFile (this=0x55555570d190) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:1439
#12 0x00007ffff7e05e41 in KoDocument::Private::openFile (this=0x55555575eba0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:272
#13 0x00007ffff7e05fc5 in KoDocument::Private::openLocalFile (this=0x55555575eba0) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:294
#14 0x00007ffff7e18256 in KoDocument::openUrlInternal (this=0x55555570d190, url=...) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:2651
#15 0x00007ffff7e0e083 in KoDocument::openUrl (this=0x55555570d190, _url=...) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoDocument.cpp:1252
#16 0x00007ffff7ed1cee in KoPart::openExistingFile (this=0x55555573b840, url=...) at /usr/src/debug/calligra/calligra-25.12.2/libs/main/KoPart.cpp:230
...The main difference seems to be at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/TextDocumentRtfOutput.cpp:52:
Calligra (rebuilt, not crashing):
Thread 1 "calligrawords" hit Breakpoint 1, RtfReader::TextDocumentRtfOutput::appendText (this=0x7fffffffbdc0, text=...)
at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/TextDocumentRtfOutput.cpp:52
52 (m_encoding != QStringConverter::Utf8 ? QStringDecoder(m_encoding).decode(text) : QString::fromLatin1(text)).remove(controlCharacters));
(gdb) p m_encoding
$11 = QStringConverter::Utf8(KIOWorker, crash dump)
(gdb) f 7
#7 0x00007f7a68dd85ff in RtfReader::TextDocumentRtfOutput::appendText (this=0x7ffd79653fa0, text=...)
at /usr/src/debug/calligra/calligra-25.12.2/filters/words/rtf/import/3rdparty/rtf-qt/src/TextDocumentRtfOutput.cpp:52
52 (m_encoding != QStringConverter::Utf8 ? QStringDecoder(m_encoding).decode(text) : QString::fromLatin1(text)).remove(controlCharacters));
(gdb) p m_encoding
$3 = 3801198
(gdb) ptype m_encoding
type = enum QStringConverter::Encoding : unsigned int {QStringConverter::Utf8, QStringConverter::Utf16,
QStringConverter::Utf16LE, QStringConverter::Utf16BE, QStringConverter::Utf32, QStringConverter::Utf32LE,
QStringConverter::Utf32BE, QStringConverter::Latin1, QStringConverter::System,
QStringConverter::LastEncoding = 8}I.e., it seems to me that the codepath KIOWorker follows causes it to pull in all the possible encodings instead of just one (Calligra, after being rebuilt reaches the same point with just m_encoding=QStringConverter::Utf8, with the same file). This in turn causes it to try to load a non-existing decoder, which leads to an out-of-bounds access:
(KIOWorker, crash dump)
(gdb) f 5
#5 QStringDecoder::decodeAsString (this=0x7ffd79653c40, in=...) at /usr/include/qt6/QtCore/qstringconverter.h:141
141 QString result(iface->toUtf16Len(in.size()), Qt::Uninitialized);
(gdb) p *iface
❌ Cannot access memory at address 0x7f7ab2b21f10Indeed, the address 0x7f7ab2b21f10 seems to be out of bounds:
(gdb) info proc mappings
Mapped address spaces:
Start Addr End Addr Size Offset File
0x00005645f7f24000 0x00005645f7f25000 0x1000 0x0 /usr/lib/kf6/kioworker
0x00005645f7f25000 0x00005645f7f27000 0x2000 0x1000 /usr/lib/kf6/kioworker
0x00005645f7f27000 0x00005645f7f28000 0x1000 0x3000 /usr/lib/kf6/kioworker
0x00005645f7f28000 0x00005645f7f29000 0x1000 0x3000 /usr/lib/kf6/kioworker
0x00005645f7f29000 0x00005645f7f2a000 0x1000 0x4000 /usr/lib/kf6/kioworker
0x00007f7a68db1000 0x00007f7a68dc1000 0x10000 0x0 /usr/lib/libRtfReader.so.25.12.2
...
0x00007f7aa9f7d000 0x00007f7aa9f7e000 0x1000 0x28000 /usr/lib/qt6/plugins/kf6/kio/thumbnail.so
0x00007f7aa9f86000 0x00007f7aa9f87000 0x1000 0x0 /usr/lib/ld-linux-x86-64.so.2
0x00007f7aa9f87000 0x00007f7aa9fb1000 0x2a000 0x1000 /usr/lib/ld-linux-x86-64.so.2
0x00007f7aa9fb1000 0x00007f7aa9fbc000 0xb000 0x2b000 /usr/lib/ld-linux-x86-64.so.2
0x00007f7aa9fbc000 0x00007f7aa9fbe000 0x2000 0x36000 /usr/lib/ld-linux-x86-64.so.2
0x00007f7aa9fbe000 0x00007f7aa9fbf000 0x1000 0x38000 /usr/lib/ld-linux-x86-64.so.2 And this is where I'm stuck, as in my limited understanding of C++ I don't get why the two programs should follow different code paths as the underlying library and code should be the same, as it should be all contained in the Calligra libraries which I rebuilt - yet the two processes seem to follow different logics with different results, one of which tries to load a non-existing location and segfaults, as Calligra did before I rebuilt it.
Last edited by juma93 (Yesterday 13:07:55)
Offline
#4 0x00007f7aa8e4d4d0 in <signal handler called> () at /usr/lib/libc.so.6
#5 QStringDecoder::decodeAsString (this=0x7ffd79653c40, in=...) at /usr/include/qt6/QtCore/qstringconverter.h:141
#6 0x00007f7a68ddab16 in QStringDecoder::EncodedData<QByteArray const&>::operator QString (this=0x7ffd79653c00) at /usr/include/qt6/QtCore/qstringconverter.h:105is an inline function, if there's any ABI incompatibility *everything* invoking that has to be recompiled.
Just to be sure: the crash is generic and doesn't hinge on a single bogus RTF document (triggering a bug that might have been simply fixed in newer Qt headers)?
Offline
Just to be sure: the crash is generic and doesn't hinge on a single bogus RTF document (triggering a bug that might have been simply fixed in newer Qt headers)?
I was able to trigger it by just creating a document using LibreOffice only containing a simple string (e.g. "foo"), so I'd say it's generic.
By the way, the bug report has been picked up upstream and a PR has been opened (https://invent.kde.org/office/calligra/ … uests/171/).
If that would solve the issue I'm still left wondering why the two programs end up on different code paths using ostensibly the same libraries, but that would be a mere curiosity at that point.
(And yes, I also rebuild kio and kio-extras but that did not change anything. I guess I should've rebuilt also the Qt libraries themselves, but that would have been a bit too much
)
Last edited by juma93 (Yesterday 18:16:43)
Offline
You're NOT using a library at this point.
The difference is
#0 QByteArrayView::QByteArrayView<QByteArray, true> (this=0x7fffffffb9c0, ba=..., this=<optimized out>, ba=<optimized out>) at /usr/include/qt6/QtCore/qbytearrayview.h:170
#1 0x00007fffbc2e5afc in QStringDecoder::EncodedData<QByteArray const&>::operator QString (this=0x7fffffffba20) at /usr/include/qt6/QtCore/qstringconverter.h:105and
#5 QStringDecoder::decodeAsString (this=0x7ffd79653c40, in=...) at /usr/include/qt6/QtCore/qstringconverter.h:141
#6 0x00007f7a68ddab16 in QStringDecoder::EncodedData<QByteArray const&>::operator QString (this=0x7ffd79653c00) at /usr/include/qt6/QtCore/qstringconverter.h:105https://github.com/qt/qtbase/blob/v6.10 … ter.h#L105
Are you currently using Qt6 6.11 from kde-unstable?
https://github.com/qt/qtbase/blob/05176 … ter.h#L105
Otherwise any involved binary might have been compiled against that but is running against/linked in with Qt 6.10
Offline