El Sunday 28 February 2016, a les 16:56:35, Alexander Semke va escriure: > > I reproduced the code from [1] to learn how to create KF5 applications. > > The > > application runs fine but if I first open some file and then quit through > > the quit action i get a segmentation fault. > > > > I ran the application in GDB and created this backtrace: > > > #0 0x00007ffff4335b44 in () at /usr/lib64/libQt5Core.so.5 > > > #1 0x00007ffff43136d9 in QHashData::free_helper(void > > > (*)(QHashData::Node*)) () at /usr/lib64/libQt5Core.so.5 #2 > > > 0x00007ffff432db24 in () at > > > /usr/lib64/libQt5Core.so.5 > > > #3 0x00007ffff35fab19 in __run_exit_handlers () at /lib64/libc.so.6 > > > #4 0x00007ffff35fab65 in () at /lib64/libc.so.6 > > > #5 0x00007ffff35e4b0c in __libc_start_main () at /lib64/libc.so.6 > > > #6 0x0000000000407509 in _start () at ../sysdeps/x86_64/start.S:122 > > > > Now I wonder if the example contains a bug I cannot spot or if my > > environment is somehow broken. Its OpenSuSE Leap with OBS KDE repositories > > (Plasma is very stable indeed, so i can't imagine it's the environment). > > I can reproduce this bug on openSUSE Leap. > > valgrind's output: > > ==28585== Invalid read of size 4 > ==28585== at 0x8436B44: ??? (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x84146D8: QHashData::free_helper(void > (*)(QHashData::Node*)) (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x842EB23: ??? (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x92B3B18: __run_exit_handlers (in /lib64/libc-2.19.so) > ==28585== by 0x92B3B64: exit (in /lib64/libc-2.19.so) > ==28585== by 0x929DB0B: (below main) (in /lib64/libc-2.19.so) > ==28585== Address 0x170a34a0 is not stack'd, malloc'd or (recently) free'd > ==28585== > ==28585== > ==28585== Process terminating with default action of signal 11 (SIGSEGV) > ==28585== Access not within mapped region at address 0x170A34A0 > ==28585== at 0x8436B44: ??? (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x84146D8: QHashData::free_helper(void > (*)(QHashData::Node*)) (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x842EB23: ??? (in /usr/lib64/libQt5Core.so.5.5.1) > ==28585== by 0x92B3B18: __run_exit_handlers (in /lib64/libc-2.19.so) > ==28585== by 0x92B3B64: exit (in /lib64/libc-2.19.so) > ==28585== by 0x929DB0B: (below main) (in /lib64/libc-2.19.so) > > Looks like a bug in QHashData::free_helper()...
Works fine here. I have relatively "old" KF5 versions, may be related to the "QString -> QStringLiteral conversions might make applications crash on exit" email of frameworks, i.e. bug https://bugs.kde.org/show_bug.cgi?id=359758 Someone with new KF5 code needs to fix it. Cheers, Albert