Discussion:
[KPhotoAlbum] Crash on exit
Robert Krawitz
2015-02-18 20:52:07 UTC
Permalink
I've had a crash on exit for a while. I finally got around to
bisecting it, and it turns out to be when the map stuff was added:

e59af35875adc3e9081b471bd9f17c0fb9ddc30e is the first bad commit
commit e59af35875adc3e9081b471bd9f17c0fb9ddc30e
Author: Tobias Leupold <***@web.de>
Date: Wed Dec 17 15:37:55 2014 +0100

* Added a map view widget using libkgeomap to display one or more
image coordiantes.
* Added functions to read out the GPS information from an
image's EXIF headers.

This is the result of a longer development (with a lot of testing
back and forth).
Also developed by Johannes Zarl, see the annotation_map_2
branch.

:100644 100644 cf7faea97fb71ba8651d3ffce4371ad4c5341850
cd9ba702b9760606ba5fd39b5a2dc00f4004cf6e M CMakeLists.txt
:040000 040000 bda47f7f45e908a4af06f6b22cc56beaff9a4ffc
fe8bc2bb35dbe19d506d71e95e2ceb7ae6ea44a8 M DB
:000000 040000 0000000000000000000000000000000000000000
25cfc5108520382e0ba0e8e129b94442b88aecfc A Map
:000000 100644 0000000000000000000000000000000000000000
faf35ade1de994991fd72621ee81d604ce41e9f5 A
config-kpa-kgeomap.h.cmake

The crash message is:

Application: KPhotoAlbum (kphotoalbum), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5ebedb3880 (LWP 27190))]

Thread 6 (Thread 0x7f5ea4062700 (LWP 27191)):
#0 0x00007f5eba114e5d in recvmsg () at /lib64/libpthread.so.0
#1 0x00007f5ebee13fb9 in udev_monitor_receive_device () at /usr/lib64/libudev.so.1
#2 0x00007f5ea47202eb in () at /usr/lib64/libusb-1.0.so.0
#3 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f5eb96237fd in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f5e9cb21700 (LWP 27198)):
#0 0x00007f5eba11205f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1 0x00007f5eba3a4c86 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQtCore.so.4
#2 0x000000000050520a in ImageManager::AsyncLoader::next() (this=0x2862d00) at /home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143
#3 0x0000000000504970 in ImageManager::ImageLoaderThread::run() (this=0x12591cb0) at /home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56
#4 0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f5e97fff700 (LWP 27199)):
#0 0x00007f5eba11205f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1 0x00007f5eba3a4c86 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQtCore.so.4
#2 0x000000000050520a in ImageManager::AsyncLoader::next() (this=0x2862d00) at /home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143
#3 0x0000000000504970 in ImageManager::ImageLoaderThread::run() (this=0x2862f90) at /home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56
#4 0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f5e977fe700 (LWP 27200)):
#0 0x00007f5eba11205f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1 0x00007f5eba3a4c86 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQtCore.so.4
#2 0x000000000050520a in ImageManager::AsyncLoader::next() (this=0x2862d00) at /home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143
#3 0x0000000000504970 in ImageManager::ImageLoaderThread::run() (this=0x124fec50) at /home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56
#4 0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f5e95d56700 (LWP 27201)):
#0 0x00007f5eb961b3cd in poll () at /lib64/libc.so.6
#1 0x00007f5eb06e4be4 in () at /usr/lib64/libglib-2.0.so.0
#2 0x00007f5eb06e4cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3 0x00007f5eba4d30de in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#4 0x00007f5eba4a4e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba4a5165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#6 0x00007f5eba3a20bf in QThread::exec() () at /usr/lib64/libQtCore.so.4
#7 0x00007f5eba486783 in () at /usr/lib64/libQtCore.so.4
#8 0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#9 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#10 0x00007f5eb96237fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f5ebedb3880 (LWP 27190)):
[KCrash Handler]
#5 0x00007f5eb21911ea in Marble::GeoDataObject::~GeoDataObject() () at /usr/lib64/libmarblewidget.so.19
#6 0x00007f5eb9575f7f in __cxa_finalize () at /lib64/libc.so.6
#7 0x00007f5eb21739e3 in () at /usr/lib64/libmarblewidget.so.19
#8 0x00007fffb37fcf40 in ()
#9 0x00007f5ebec8ff3a in _dl_fini () at /lib64/ld-linux-x86-64.so.2

In case it matters, I get the following warning during link:

Linking CXX executable kphotoalbum
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: warning: libmarblewidget.so.19, needed by /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libkgeomap.so, may conflict with libmarblewidget.so.20

Also, none of my images are geotagged.
--
Robert Krawitz <***@alum.mit.edu>

*** MIT Engineers Football -- Historic 10-1 2014 NEFC Champions ***
MIT VI-3 1987 - Congrats MIT Engineers 6 straight men's hoops tourney
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Johannes Zarl
2015-02-22 13:48:15 UTC
Permalink
Hi,

I have to say that the linker warning sounds like the probable cause to me. Do
you know why there are two different versions of libmarblewidget installed? Is
it possible for you to remove one version, rebuild KPA, and try again?

Also, you could try commenting out the two delete statements in
Map::MapView::~MapView. Those look like they might be better done using
deleteLater(), but I don't want to blindly change things in the hope that it
might help.

Can you please report whether either of these things fixes the crash for you?

Cheers,
Johannes
Post by Robert Krawitz
I've had a crash on exit for a while. I finally got around to
e59af35875adc3e9081b471bd9f17c0fb9ddc30e is the first bad commit
commit e59af35875adc3e9081b471bd9f17c0fb9ddc30e
Date: Wed Dec 17 15:37:55 2014 +0100
* Added a map view widget using libkgeomap to display one or more
image coordiantes.
* Added functions to read out the GPS information from an
image's EXIF headers.
This is the result of a longer development (with a lot of testing
back and forth).
Also developed by Johannes Zarl, see the annotation_map_2
branch.
:100644 100644 cf7faea97fb71ba8651d3ffce4371ad4c5341850
cd9ba702b9760606ba5fd39b5a2dc00f4004cf6e M CMakeLists.txt
:040000 040000 bda47f7f45e908a4af06f6b22cc56beaff9a4ffc
fe8bc2bb35dbe19d506d71e95e2ceb7ae6ea44a8 M DB
:000000 040000 0000000000000000000000000000000000000000
25cfc5108520382e0ba0e8e129b94442b88aecfc A Map
:000000 100644 0000000000000000000000000000000000000000
faf35ade1de994991fd72621ee81d604ce41e9f5 A
config-kpa-kgeomap.h.cmake
Application: KPhotoAlbum (kphotoalbum), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5ebedb3880 (LWP 27190))]
#0 0x00007f5eba114e5d in recvmsg () at /lib64/libpthread.so.0
#1 0x00007f5ebee13fb9 in udev_monitor_receive_device () at
/usr/lib64/libudev.so.1 #2 0x00007f5ea47202eb in () at
/usr/lib64/libusb-1.0.so.0
#3 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f5eb96237fd in clone () at /lib64/libc.so.6
/lib64/libpthread.so.0 #1 0x00007f5eba3a4c86 in
QWaitCondition::wait(QMutex*, unsigned long) () at
/usr/lib64/libQtCore.so.4 #2 0x000000000050520a in
ImageManager::AsyncLoader::next() (this=0x2862d00) at
/home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143 #3
0x0000000000504970 in ImageManager::ImageLoaderThread::run()
(this=0x12591cb0) at
/home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56 #4
0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6
/lib64/libpthread.so.0 #1 0x00007f5eba3a4c86 in
QWaitCondition::wait(QMutex*, unsigned long) () at
/usr/lib64/libQtCore.so.4 #2 0x000000000050520a in
ImageManager::AsyncLoader::next() (this=0x2862d00) at
/home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143 #3
0x0000000000504970 in ImageManager::ImageLoaderThread::run()
(this=0x2862f90) at
/home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56 #4
0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6
/lib64/libpthread.so.0 #1 0x00007f5eba3a4c86 in
QWaitCondition::wait(QMutex*, unsigned long) () at
/usr/lib64/libQtCore.so.4 #2 0x000000000050520a in
ImageManager::AsyncLoader::next() (this=0x2862d00) at
/home/rlk/sandbox/kphotoalbum/ImageManager/AsyncLoader.cpp:143 #3
0x0000000000504970 in ImageManager::ImageLoaderThread::run()
(this=0x124fec50) at
/home/rlk/sandbox/kphotoalbum/ImageManager/ImageLoaderThread.cpp:56 #4
0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#5 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f5eb96237fd in clone () at /lib64/libc.so.6
#0 0x00007f5eb961b3cd in poll () at /lib64/libc.so.6
#1 0x00007f5eb06e4be4 in () at /usr/lib64/libglib-2.0.so.0
#2 0x00007f5eb06e4cec in g_main_context_iteration () at
/usr/lib64/libglib-2.0.so.0 #3 0x00007f5eba4d30de in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /usr/lib64/libQtCore.so.4 #4 0x00007f5eba4a4e6f in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib64/libQtCore.so.4 #5 0x00007f5eba4a5165 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib64/libQtCore.so.4 #6 0x00007f5eba3a20bf in QThread::exec() () at
/usr/lib64/libQtCore.so.4 #7 0x00007f5eba486783 in () at
/usr/lib64/libQtCore.so.4
#8 0x00007f5eba3a479f in () at /usr/lib64/libQtCore.so.4
#9 0x00007f5eba10e0a4 in start_thread () at /lib64/libpthread.so.0
#10 0x00007f5eb96237fd in clone () at /lib64/libc.so.6
[KCrash Handler]
#5 0x00007f5eb21911ea in Marble::GeoDataObject::~GeoDataObject() () at
/usr/lib64/libmarblewidget.so.19 #6 0x00007f5eb9575f7f in __cxa_finalize
() at /lib64/libc.so.6
#7 0x00007f5eb21739e3 in () at /usr/lib64/libmarblewidget.so.19
#8 0x00007fffb37fcf40 in ()
#9 0x00007f5ebec8ff3a in _dl_fini () at /lib64/ld-linux-x86-64.so.2
Linking CXX executable kphotoalbum
warning: libmarblewidget.so.19, needed by
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libkgeomap.so, may
conflict with libmarblewidget.so.20
Also, none of my images are geotagged.
Robert Krawitz
2015-02-22 16:22:17 UTC
Permalink
Hi,
I have to say that the linker warning sounds like the probable cause to me. Do you know why there are two different versions of libmarblewidget installed? Is it possible for you to remove one version, rebuild KPA, and try again?
Also, you could try commenting out the two delete statements in Map::MapView::~MapView. Those look like they might be better done using deleteLater(), but I don't want to blindly change things in the hope that it might help.
Can you please report whether either of these things fixes the crash for you?
Not too surprisingly, the dual version was the problem. I had had
various dependencies that made it impossible to remove one, but now
I'm able to remove libmarblewidget19 and the problem went away.
--
Robert Krawitz <***@alum.mit.edu>

*** MIT Engineers Football -- Historic 10-1 2014 NEFC Champions ***
MIT VI-3 1987 - Congrats MIT Engineers 6 straight men's hoops tourney
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
Loading...