Debugging segfault

Running latest Osiris 2.4.2 branch, and MiDE latest from osiris-port branch.

Some of this is excessively verbose

abloss@osiristest:~/debug$ valgrind /opt/kde1/bin/konsole
==60968== Memcheck, a memory error detector
==60968== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==60968== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==60968== Command: /opt/kde1/bin/konsole
==60968== 
==60968== Conditional jump or move depends on uninitialised value(s)
==60968==    at 0x484673D: strnlen (vg_replace_strmem.c:461)
==60968==    by 0x4ACBA67: QCString::length() const (qcstring.h:325)
==60968==    by 0x4ACF5D7: QCString::resize(unsigned int) (qcstring.cpp:570)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF7410: QString::local8Bit() const (qstring.cpp:9885)
==60968==    by 0x4ADA1DA: locale_encoder(QString const&) (qfile.cpp:470)
==60968==    by 0x4ADA208: QFile::encodeName(QString const&) (qfile.cpp:500)
==60968==    by 0x4ACAB46: QFile::open(int) (qfile_unix.cpp:215)
==60968==    by 0x4B1B22E: qt_init_internal(int*, char**, _XDisplay*) (qapplication_x11.cpp:1305)
==60968==    by 0x4B1BF03: qt_init(int*, char**, QApplication::Type) (qapplication_x11.cpp:1623)
==60968== 
==60968== Syscall param access(pathname) points to unaddressable byte(s)
==60968==    at 0x55CB307: access (access.c:27)
==60968==    by 0x50DA563: checkAccess(char const*, int) (kapp.cpp:1736)
==60968==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x4846739: strnlen (vg_replace_strmem.c:461)
==60968==    by 0x50DA5A9: checkAccess(char const*, int) (kapp.cpp:1747)
==60968==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x50DA5E0: checkAccess(char const*, int) (kapp.cpp:1759)
==60968==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d31 is 17 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x4846DE5: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==60968==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==60968==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Syscall param access(pathname) points to uninitialised byte(s)
==60968==    at 0x55CB307: access (access.c:27)
==60968==    by 0x50DA63C: checkAccess(char const*, int) (kapp.cpp:1779)
==60968==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x1ffeffe65d is on thread 1's stack
==60968==  in frame #1, created by checkAccess(char const*, int) (kapp.cpp:1735)
==60968== 
==60968== Syscall param mkdir(pathname) points to unaddressable byte(s)
==60968==    at 0x55CAE27: mkdir (syscall-template.S:120)
==60968==    by 0x50D0D9F: KApplication::init() (kapp.cpp:439)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Syscall param chown(path) points to unaddressable byte(s)
==60968==    at 0x55CC407: chown (syscall-template.S:120)
==60968==    by 0x50D0DCA: KApplication::init() (kapp.cpp:440)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Syscall param access(pathname) points to unaddressable byte(s)
==60968==    at 0x55CB307: access (access.c:27)
==60968==    by 0x50DA563: checkAccess(char const*, int) (kapp.cpp:1736)
==60968==    by 0x50D0E57: KApplication::init() (kapp.cpp:443)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad8df0 is 0 bytes inside a block of size 24 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0E46: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0E24: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x4846739: strnlen (vg_replace_strmem.c:461)
==60968==    by 0x50DA5A9: checkAccess(char const*, int) (kapp.cpp:1747)
==60968==    by 0x50D0E57: KApplication::init() (kapp.cpp:443)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad8df0 is 0 bytes inside a block of size 24 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0E46: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0E24: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x50DA5E0: checkAccess(char const*, int) (kapp.cpp:1759)
==60968==    by 0x50D0E57: KApplication::init() (kapp.cpp:443)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad8e07 is 23 bytes inside a block of size 24 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0E46: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0E24: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x4846DE5: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==60968==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==60968==    by 0x50D0E57: KApplication::init() (kapp.cpp:443)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6ad8df0 is 0 bytes inside a block of size 24 free'd
==60968==    at 0x484317B: free (vg_replace_malloc.c:872)
==60968==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==60968==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==60968==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==60968==    by 0x50D0E46: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Block was alloc'd at
==60968==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==60968==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==60968==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==60968==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==60968==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==60968==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50D0E24: KApplication::init() (kapp.cpp:442)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Syscall param access(pathname) points to uninitialised byte(s)
==60968==    at 0x55CB307: access (access.c:27)
==60968==    by 0x50DA63C: checkAccess(char const*, int) (kapp.cpp:1779)
==60968==    by 0x50D0E57: KApplication::init() (kapp.cpp:443)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x1ffeffe662 is on thread 1's stack
==60968==  in frame #1, created by checkAccess(char const*, int) (kapp.cpp:1735)
==60968== 
==60968== Syscall param access(pathname) points to uninitialised byte(s)
==60968==    at 0x55CB307: access (access.c:27)
==60968==    by 0x50DA63C: checkAccess(char const*, int) (kapp.cpp:1779)
==60968==    by 0x50D1112: KApplication::init() (kapp.cpp:477)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x1ffeffe66f is on thread 1's stack
==60968==  in frame #1, created by checkAccess(char const*, int) (kapp.cpp:1735)
==60968== 
==60968== Invalid read of size 1
==60968==    at 0x50DA5E0: checkAccess(char const*, int) (kapp.cpp:1759)
==60968==    by 0x50C4E59: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==60968==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968==  Address 0x6adae8f is 1 bytes before a block of size 1 alloc'd
==60968==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==60968==    by 0x4ADAEB4: QGArray::QGArray(int) (qgarray.cpp:125)
==60968==    by 0x4AD1B4D: QArray<char>::QArray(int) (qarray.h:62)
==60968==    by 0x4ACF411: QCString::QCString(int) (qcstring.cpp:429)
==60968==    by 0x4B03CCB: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:51)
==60968==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==60968==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==60968==    by 0x50C4E40: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==60968==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Conditional jump or move depends on uninitialised value(s)
==60968==    at 0x50DA5E5: checkAccess(char const*, int) (kapp.cpp:1759)
==60968==    by 0x50C4E59: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==60968==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==60968==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==60968==    by 0x121D8C: main (main.C:928)
==60968== 
==60968== Invalid write of size 1
==60968==    at 0x4846E94: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==60968==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==60968==  Address 0x1fff001000 is not stack'd, malloc'd or (recently) free'd
==60968== 
==60968== 
==60968== Process terminating with default action of signal 11 (SIGSEGV)
==60968==  Access not within mapped region at address 0x1FFF001000
==60968==    at 0x4846E94: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==60968==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==60968==  If you believe this happened as a result of a stack
==60968==  overflow in your program's main thread (unlikely but
==60968==  possible), you can try to increase the size of the
==60968==  main thread stack using the --main-stacksize= flag.
==60968==  The main thread stack size used in this run was 8388608.
==60968== 
==60968== HEAP SUMMARY:
==60968==     in use at exit: 811,618 bytes in 1,385 blocks
==60968==   total heap usage: 25,821 allocs, 24,436 frees, 5,117,977 bytes allocated
==60968== 
==60968== LEAK SUMMARY:
==60968==    definitely lost: 432 bytes in 13 blocks
==60968==    indirectly lost: 345 bytes in 8 blocks
==60968==      possibly lost: 160 bytes in 2 blocks
==60968==    still reachable: 810,681 bytes in 1,362 blocks
==60968==                       of which reachable via heuristic:
==60968==                         newarray           : 1,656 bytes in 14 blocks
==60968==         suppressed: 0 bytes in 0 blocks
==60968== Rerun with --leak-check=full to see details of leaked memory
==60968== 
==60968== Use --track-origins=yes to see where uninitialised values come from
==60968== For lists of detected and suppressed errors, rerun with: -s
==60968== ERROR SUMMARY: 1924 errors from 17 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

Some additional information from Valgrind

abloss@osiristest:~/debug$ valgrind --track-origins=yes /opt/kde1/bin/konsole
==64576== Memcheck, a memory error detector
==64576== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==64576== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==64576== Command: /opt/kde1/bin/konsole
==64576== 
==64576== Conditional jump or move depends on uninitialised value(s)
==64576==    at 0x484673D: strnlen (vg_replace_strmem.c:461)
==64576==    by 0x4ACBA67: QCString::length() const (qcstring.h:325)
==64576==    by 0x4ACF5D7: QCString::resize(unsigned int) (qcstring.cpp:570)
==64576==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==64576==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF7410: QString::local8Bit() const (qstring.cpp:9885)
==64576==    by 0x4ADA1DA: locale_encoder(QString const&) (qfile.cpp:470)
==64576==    by 0x4ADA208: QFile::encodeName(QString const&) (qfile.cpp:500)
==64576==    by 0x4ACAB46: QFile::open(int) (qfile_unix.cpp:215)
==64576==    by 0x4B1B22E: qt_init_internal(int*, char**, _XDisplay*) (qapplication_x11.cpp:1305)
==64576==    by 0x4B1BF03: qt_init(int*, char**, QApplication::Type) (qapplication_x11.cpp:1623)
==64576==  Uninitialised value was created by a heap allocation
==64576==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==64576==    by 0x4ADAEB4: QGArray::QGArray(int) (qgarray.cpp:125)
==64576==    by 0x4AD1B4D: QArray<char>::QArray(int) (qarray.h:62)
==64576==    by 0x4ACF411: QCString::QCString(int) (qcstring.cpp:429)
==64576==    by 0x4B03CCB: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:51)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF7410: QString::local8Bit() const (qstring.cpp:9885)
==64576==    by 0x4ADA1DA: locale_encoder(QString const&) (qfile.cpp:470)
==64576==    by 0x4ADA208: QFile::encodeName(QString const&) (qfile.cpp:500)
==64576==    by 0x4ACAB46: QFile::open(int) (qfile_unix.cpp:215)
==64576==    by 0x4B1B22E: qt_init_internal(int*, char**, _XDisplay*) (qapplication_x11.cpp:1305)
==64576==    by 0x4B1BF03: qt_init(int*, char**, QApplication::Type) (qapplication_x11.cpp:1623)
==64576== 
==64576== Syscall param access(pathname) points to unaddressable byte(s)
==64576==    at 0x55CB307: access (access.c:27)
==64576==    by 0x50DA563: checkAccess(char const*, int) (kapp.cpp:1736)
==64576==    by 0x50D0D4C: KApplication::init() (kapp.cpp:438)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==64576==    at 0x484317B: free (vg_replace_malloc.c:872)
==64576==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==64576==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==64576==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==64576==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Block was alloc'd at
==64576==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==64576==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==64576==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==64576==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==64576==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==64576==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==64576==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576== 
==64576== Syscall param mkdir(pathname) points to unaddressable byte(s)
==64576==    at 0x55CAE27: mkdir (syscall-template.S:120)
==64576==    by 0x50D0D9F: KApplication::init() (kapp.cpp:439)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Address 0x6ad7d20 is 0 bytes inside a block of size 18 free'd
==64576==    at 0x484317B: free (vg_replace_malloc.c:872)
==64576==    by 0x4ADAFB5: QGArray::~QGArray() (qgarray.cpp:151)
==64576==    by 0x4AC9CC3: QArray<char>::~QArray() (qarray.h:70)
==64576==    by 0x4ACA527: QCString::~QCString() (qcstring.h:198)
==64576==    by 0x50D0CEA: KApplication::init() (kapp.cpp:437)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Block was alloc'd at
==64576==    at 0x484582F: realloc (vg_replace_malloc.c:1437)
==64576==    by 0x4ADB142: QGArray::resize(unsigned int) (qgarray.cpp:225)
==64576==    by 0x4ACE1F3: QArray<char>::resize(unsigned int) (qarray.h:101)
==64576==    by 0x4ACF5EB: QCString::resize(unsigned int) (qcstring.cpp:571)
==64576==    by 0x4ACBA90: QCString::truncate(unsigned int) (qcstring.h:333)
==64576==    by 0x4B03E5E: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==64576==    by 0x50D0CC8: KApplication::init() (kapp.cpp:437)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576== 
==64576== Syscall param access(pathname) points to uninitialised byte(s)
==64576==    at 0x55CB307: access (access.c:27)
==64576==    by 0x50DA63C: checkAccess(char const*, int) (kapp.cpp:1779)
==64576==    by 0x50D1112: KApplication::init() (kapp.cpp:477)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Address 0x1ffeffe66f is on thread 1's stack
==64576==  in frame #1, created by checkAccess(char const*, int) (kapp.cpp:1735)
==64576==  Uninitialised value was created by a stack allocation
==64576==    at 0x50DA539: checkAccess(char const*, int) (kapp.cpp:1735)
==64576== 
==64576== Invalid read of size 1
==64576==    at 0x50DA5E0: checkAccess(char const*, int) (kapp.cpp:1759)
==64576==    by 0x50C4E59: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==64576==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Address 0x6adac8f is 1 bytes before a block of size 1 alloc'd
==64576==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==64576==    by 0x4ADAEB4: QGArray::QGArray(int) (qgarray.cpp:125)
==64576==    by 0x4AD1B4D: QArray<char>::QArray(int) (qarray.h:62)
==64576==    by 0x4ACF411: QCString::QCString(int) (qcstring.cpp:429)
==64576==    by 0x4B03CCB: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:51)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==64576==    by 0x50C4E40: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==64576==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576== 
==64576== Conditional jump or move depends on uninitialised value(s)
==64576==    at 0x50DA5E5: checkAccess(char const*, int) (kapp.cpp:1759)
==64576==    by 0x50C4E59: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==64576==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576==  Uninitialised value was created by a heap allocation
==64576==    at 0x4840F2F: operator new(unsigned long) (vg_replace_malloc.c:422)
==64576==    by 0x4ADBF36: QGArray::newData() (qgarray.cpp:727)
==64576==    by 0x4ADAE6A: QGArray::QGArray(int) (qgarray.cpp:121)
==64576==    by 0x4AD1B4D: QArray<char>::QArray(int) (qarray.h:62)
==64576==    by 0x4ACF411: QCString::QCString(int) (qcstring.cpp:429)
==64576==    by 0x4B03CCB: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:51)
==64576==    by 0x4AFB2CE: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==64576==    by 0x4AF71FE: QString::utf8() const (qstring.cpp:9821)
==64576==    by 0x50C4E40: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==64576==    by 0x50D1205: KApplication::init() (kapp.cpp:494)
==64576==    by 0x50D0A89: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==64576==    by 0x121D8C: main (main.C:928)
==64576== 
==64576== Invalid write of size 1
==64576==    at 0x4846E94: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==64576==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==64576==  Address 0x1fff001000 is not stack'd, malloc'd or (recently) free'd
==64576== 
==64576== 
==64576== Process terminating with default action of signal 11 (SIGSEGV)
==64576==  Access not within mapped region at address 0x1FFF001000
==64576==    at 0x4846E94: __strncpy_sse2_unaligned (vg_replace_strmem.c:602)
==64576==    by 0x50DA627: checkAccess(char const*, int) (kapp.cpp:1777)
==64576==  If you believe this happened as a result of a stack
==64576==  overflow in your program's main thread (unlikely but
==64576==  possible), you can try to increase the size of the
==64576==  main thread stack using the --main-stacksize= flag.
==64576==  The main thread stack size used in this run was 8388608.
==64576== 
==64576== HEAP SUMMARY:
==64576==     in use at exit: 811,618 bytes in 1,385 blocks
==64576==   total heap usage: 25,816 allocs, 24,431 frees, 5,117,815 bytes allocated
==64576== 
==64576== LEAK SUMMARY:
==64576==    definitely lost: 432 bytes in 13 blocks
==64576==    indirectly lost: 345 bytes in 8 blocks
==64576==      possibly lost: 160 bytes in 2 blocks
==64576==    still reachable: 810,681 bytes in 1,362 blocks
==64576==                       of which reachable via heuristic:
==64576==                         newarray           : 1,656 bytes in 14 blocks
==64576==         suppressed: 0 bytes in 0 blocks
==64576== Rerun with --leak-check=full to see details of leaked memory
==64576== 
==64576== For lists of detected and suppressed errors, rerun with: -s
==64576== ERROR SUMMARY: 1833 errors from 7 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

For what it’s worth, newer GCC/glibc (Fedora 40) seem to get further running, but eventually ends up with a segmentation fault again:

==31621== Conditional jump or move depends on uninitialised value(s)
==31621==    at 0x484CE9D: strnlen (vg_replace_strmem.c:468)
==31621==    by 0x4AE3A41: QCString::length() const (qcstring.h:325)
==31621==    by 0x4AE75AD: QCString::resize(unsigned int) (qcstring.cpp:570)
==31621==    by 0x4AE3A6A: QCString::truncate(unsigned int) (qcstring.h:333)
==31621==    by 0x4B1BD97: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==31621==    by 0x4B131F2: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==31621==    by 0x4B0F35E: QString::local8Bit() const (qstring.cpp:9885)
==31621==    by 0x4AF2120: locale_encoder(QString const&) (qfile.cpp:470)
==31621==    by 0x4AF214E: QFile::encodeName(QString const&) (qfile.cpp:500)
==31621==    by 0x4AE2B20: QFile::open(int) (qfile_unix.cpp:215)
==31621==    by 0x4B330EE: qt_init_internal(int*, char**, _XDisplay*) (qapplication_x11.cpp:1305)
==31621==    by 0x4B33DC3: qt_init(int*, char**, QApplication::Type) (qapplication_x11.cpp:1623)
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== Syscall param access(pathname) points to unaddressable byte(s)
==31621==    at 0x58C5EAB: access (access.c:27)
==31621==    by 0x513362D: checkAccess(char const*, int) (kapp.cpp:1736)
==31621==    by 0x5129E16: KApplication::init() (kapp.cpp:438)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621==  Address 0x1459f920 is 0 bytes inside a block of size 18 free'd
==31621==    at 0x4846B83: free (vg_replace_malloc.c:989)
==31621==    by 0x4AF2EFB: QGArray::~QGArray() (qgarray.cpp:151)
==31621==    by 0x4AE1CF1: QArray<char>::~QArray() (qarray.h:70)
==31621==    by 0x4AE1951: QCString::~QCString() (qcstring.h:198)
==31621==    by 0x5129DB4: KApplication::init() (kapp.cpp:437)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621==  Block was alloc'd at
==31621==    at 0x484B347: realloc (vg_replace_malloc.c:1800)
==31621==    by 0x4AF3088: QGArray::resize(unsigned int) (qgarray.cpp:225)
==31621==    by 0x4AE621D: QArray<char>::resize(unsigned int) (qarray.h:101)
==31621==    by 0x4AE75C1: QCString::resize(unsigned int) (qcstring.cpp:571)
==31621==    by 0x4AE3A6A: QCString::truncate(unsigned int) (qcstring.h:333)
==31621==    by 0x4B1BD97: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==31621==    by 0x4B131F2: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==31621==    by 0x4B0F14C: QString::utf8() const (qstring.cpp:9821)
==31621==    by 0x5129D92: KApplication::init() (kapp.cpp:437)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== Syscall param mkdir(pathname) points to unaddressable byte(s)
==31621==    at 0x58CA3DB: mkdir (mkdir.c:28)
==31621==    by 0x5129E69: KApplication::init() (kapp.cpp:439)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621==  Address 0x1459f920 is 0 bytes inside a block of size 18 free'd
==31621==    at 0x4846B83: free (vg_replace_malloc.c:989)
==31621==    by 0x4AF2EFB: QGArray::~QGArray() (qgarray.cpp:151)
==31621==    by 0x4AE1CF1: QArray<char>::~QArray() (qarray.h:70)
==31621==    by 0x4AE1951: QCString::~QCString() (qcstring.h:198)
==31621==    by 0x5129DB4: KApplication::init() (kapp.cpp:437)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621==  Block was alloc'd at
==31621==    at 0x484B347: realloc (vg_replace_malloc.c:1800)
==31621==    by 0x4AF3088: QGArray::resize(unsigned int) (qgarray.cpp:225)
==31621==    by 0x4AE621D: QArray<char>::resize(unsigned int) (qarray.h:101)
==31621==    by 0x4AE75C1: QCString::resize(unsigned int) (qcstring.cpp:571)
==31621==    by 0x4AE3A6A: QCString::truncate(unsigned int) (qcstring.h:333)
==31621==    by 0x4B1BD97: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:69)
==31621==    by 0x4B131F2: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==31621==    by 0x4B0F14C: QString::utf8() const (qstring.cpp:9821)
==31621==    by 0x5129D92: KApplication::init() (kapp.cpp:437)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== Invalid read of size 1
==31621==    at 0x51336AA: checkAccess(char const*, int) (kapp.cpp:1759)
==31621==    by 0x511DF0F: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==31621==    by 0x512A36C: KApplication::init() (kapp.cpp:507)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621==  Address 0x145a29df is 1 bytes before a block of size 1 alloc'd
==31621==    at 0x4843866: malloc (vg_replace_malloc.c:446)
==31621==    by 0x4AF2DFA: QGArray::QGArray(int) (qgarray.cpp:125)
==31621==    by 0x4AE9AA9: QArray<char>::QArray(int) (qarray.h:62)
==31621==    by 0x4AE73E7: QCString::QCString(int) (qcstring.cpp:429)
==31621==    by 0x4B1BC05: QUtf8Codec::fromUnicode(QString const&, int&) const (qutfcodec.cpp:51)
==31621==    by 0x4B131F2: QTextCodec::fromUnicode(QString const&) const (qtextcodec.cpp:847)
==31621==    by 0x4B0F14C: QString::utf8() const (qstring.cpp:9821)
==31621==    by 0x511DEF6: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==31621==    by 0x512A36C: KApplication::init() (kapp.cpp:507)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== Conditional jump or move depends on uninitialised value(s)
==31621==    at 0x51336AF: checkAccess(char const*, int) (kapp.cpp:1759)
==31621==    by 0x511DF0F: KConfig::KConfig(QString const&, QString const&) (kconfig.cpp:163)
==31621==    by 0x512A36C: KApplication::init() (kapp.cpp:507)
==31621==    by 0x5129B53: KApplication::KApplication(int&, char**, QString const&) (kapp.cpp:398)
==31621==    by 0x43CAAF: MyApp::MyApp(int&, char**, QString const&) (main.C:534)
==31621==    by 0x446778: main (main.C:2104)
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== Invalid write of size 1
==31621==    at 0x484D327: strncpy (vg_replace_strmem.c:610)
==31621==    by 0x51336F1: checkAccess(char const*, int) (kapp.cpp:1777)
==31621==  Address 0x1fff001000 is not stack'd, malloc'd or (recently) free'd
==31621== 
==31621== (action on error) vgdb me ... 
==31621== Continuing ...
==31621== 
==31621== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==31621==  Access not within mapped region at address 0x1FFF001000
==31621==    at 0x484D327: strncpy (vg_replace_strmem.c:610)
==31621==    by 0x51336F1: checkAccess(char const*, int) (kapp.cpp:1777)
==31621==  If you believe this happened as a result of a stack
==31621==  overflow in your program's main thread (unlikely but
==31621==  possible), you can try to increase the size of the
==31621==  main thread stack using the --main-stacksize= flag.
==31621==  The main thread stack size used in this run was 8388608.
Segmentation fault (core dumped)

I wasn’t able to reproduce this, but based on the stack trace I’ve gone ahead and made a potential fix, which I’ve push here: Commits · startup_segfault_fix · Libranext Computer Systems / Osiris · GitLab

I think what’s happening is that we’re passing a QCString to QFile (qapplication_x11.cpp 1302), which doesn’t have a constructor for QCStrings. Instead it has one for const QString& which would be implicitly getting invoked because it can find a conversion path.

Furthermore, the QString(const QString&) constructor doesn’t actually do a deep copy, but adds a reference.

So I believe what might be happening, is that we’re implicitly converting a QCString to a QString, taking a reference to that QString (Which will be used as the argument to the QFile constructor), and then trying to use it later on when we try to open the file in read mode.

Seeing as the QString was only a temporary used for the sake of being able to call the QFile constructor, we can’t just make a reference to it’s data.

The fix was to add another constructor for QCString and make sure we invoke a QString constructor that will actually deep copy.

I made a debug build and found the actual segfault that was happening in GDB. Fix here: Commits · konsole_segfault_fix · Libranext Computer Systems / mide · GitLab

I tested on the VM and it seems to fix that particular issue.

As for the above, it turns out that solution isn’t as easy as I thought. Adding and making use of additional constructors seems to break UIC header generation. I couldn’t figure out what the issue was given a brief investigation. Regardless, it wasn’t causing the segfault.