Bug 374428

Summary: digiKam crashes when choosing several duplicate results
Product: [Applications] digikam Reporter: Barbara Scheffner <laurakittyinka>
Component: Searches-SimilarityAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, mario.frank
Priority: NOR    
Version: 5.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.4.0
Sentry Crash Report:
Attachments: gdb run on appImage, duplicate result multiselection

Description Barbara Scheffner 2017-01-01 17:33:53 UTC
This is a follow up to bug 366567. I'm using AppImageBundle under Kubuntu 16.04. If I select several duplicate results holding the shift key and selecting by mouse click digiKam closes immediately and without any comment. I can select several duplicate results holding the ctrl key and selecting by mouse click but as soon as I select one of the individual icons in the Image Area the same happens.

Reproducible: always.
Comment 1 caulier.gilles 2017-01-01 17:39:08 UTC
Do you use the mast version of AppImage bundle that i update day by day on GDrive repository. Here i cannot reproduce the problem.

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 2 Barbara Scheffner 2017-01-01 18:52:09 UTC
I just dowmloaded the latest version of the AppImage bundle and still have exactly the same problems.
Comment 3 Mario Frank 2017-01-01 22:46:37 UTC
(In reply to Wolfgang Scheffner from comment #2)
> I just dowmloaded the latest version of the AppImage bundle and still have
> exactly the same problems.

That's odd. I cannot reproduce it. Can you provide a log trace. Sudden closing usually indicates a segmentation fault. Normally, there should be log messages. Otherwise, can you run the AppImage under valgrind? Valgrind does give hints to the reasons of a segmentation faults in some cases.
Comment 4 caulier.gilles 2017-01-01 23:46:16 UTC
Mario,

The AppImage start a internal version in the bundle though a small bash script. Using GDB or valgrind as well will don't work.

Also, debug symbols are fully dropped from digiKam core, to optimize space. I will re-make the bundle in Release With Debug.

The bash script must be adapted to pass in debug mode. I will take a look tomorrow.

Gilles Caulier

Gilles
Comment 5 caulier.gilles 2017-01-02 11:55:52 UTC
I build quickly a 64 version of AppImage with internal bash script used to run digiKam. I add a new option "debug" which will run digiKam through GDB. In this case user must follow instructions given in this page to continue with debugger :

https://www.digikam.org/contrib


So typically, this give the following on my computer :

[gilles@localhost digikam5]$ pwd
/home/gilles/digikam5
[gilles@localhost digikam5]$ ls -al
total 1281936
drwxr-xr-x  2 gilles gilles      4096 Jan  2 12:30 ./
drwxr-xr-x 78 gilles gilles      4096 Jan  2 11:47 ../
-rw-r--r--  1 gilles gilles  31034368 Jan  2 12:30 digikam4.db
-rwxrw-r--  1 gilles gilles 367525888 Jan  2 12:29 digikam-5.4.0-01-x86-64.appimage*
-rw-r--r--  1 gilles gilles     10240 Jan  2 12:30 recognition.db
-rw-r--r--  1 gilles gilles 914107392 Jan  2 12:30 thumbnails-digikam.db
[gilles@localhost digikam5]$ ./digikam-5.4.0-01-x86-64.appimage debug
GNU gdb (GDB) 7.8.1-7.mga5 (Mageia release 5)
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from digikam...done.
(gdb) r
Starting program: /tmp/.mount_R4t2rs/usr/bin/digikam 
Missing separate debuginfos, use: debuginfo-install glibc-2.20-23.mga5.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/liblcms2.so.2
Try: urpmi  /usr/lib/debug/.build-id/ab/54400a4129c25f69840acbd87a7e6e853ad8d5.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libgomp.so.1
Try: urpmi  /usr/lib/debug/.build-id/a2/7b5f0e1a8e1bc0d98926e6e7336f0d0d17c2bf.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libXext.so.6
Try: urpmi  /usr/lib/debug/.build-id/e2/69a5a1c9f02085d7cd11f8ede0e87f4aa5f265.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libGLU.so.1
Try: urpmi  /usr/lib/debug/.build-id/85/68525eeaf35aeb364bc70d5cfcac12a9bc9199.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/liblzma.so.0
Try: urpmi  /usr/lib/debug/.build-id/2f/1f98636d83908f9157858bcc7b44a6a6784385.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libavcodec.so.56
Try: urpmi  /usr/lib/debug/.build-id/50/ae05c0ad74f47f96172fd04d1a8f120a2d8c13.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libavformat.so.56
Try: urpmi  /usr/lib/debug/.build-id/03/52346bfde4ff1eef7635bbbfd010e0afba766e.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libswscale.so.3
Try: urpmi  /usr/lib/debug/.build-id/43/cfa7e67922a11b496d969e4c201331bdd634fc.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libavutil.so.54
Try: urpmi  /usr/lib/debug/.build-id/c1/02cc8f73e83e693b6d489a3d4fbcadebfba0e7.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libxslt.so.1
Try: urpmi  /usr/lib/debug/.build-id/2c/2c33a9d51d2068ef6674489e7cffb61776ef17.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libxml2.so.2
Try: urpmi  /usr/lib/debug/.build-id/46/12da142a0ed2e070482534e6a5b086639b5a52.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libsqlite3.so.0
Try: urpmi  /usr/lib/debug/.build-id/0e/42624ae755ada258f06a9c5fe23480c7068ce1.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libXrender.so.1
Try: urpmi  /usr/lib/debug/.build-id/77/1256bb92a7dfe45aa4203e92c5fdcf9a8bf6e3.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libicui18n.so.42
Try: urpmi  /usr/lib/debug/.build-id/48/8accd4122387506f60edcbb166542e5ad442dc.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libicuuc.so.42
Try: urpmi  /usr/lib/debug/.build-id/b3/ce0ad8460678beeac2dc834d4bf8a224b0a2f6.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libicudata.so.42
Try: urpmi  /usr/lib/debug/.build-id/fd/2303d66a1e93a997838195547db939e6053d13.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libudev.so.0
Try: urpmi  /usr/lib/debug/.build-id/d7/c508e3688ae7936a0a5c9746f568cb5e7512c4.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libXfixes.so.3
Try: urpmi  /usr/lib/debug/.build-id/a2/8dc6d6874ca6d5b05749d201134a58bbe393f3.debug
Missing separate debuginfo for /tmp/.mount_R4t2rs/usr/lib/libxcb-keysyms.so.1
...
etc
...

Run the as before until it crash and use "bt" in GDB prompt to get the backtrace.

The AppImage 64 bits is larger than before now. It's not optimized as all full debug symbols are there. I just start a whole compilation to optimize debug symbols everywhere and decrease bundle size. This take age of course...

The file is available in GDrive repository as usual :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 6 Barbara Scheffner 2017-01-03 11:18:43 UTC
Created attachment 103164 [details]
gdb run on appImage, duplicate result multiselection
Comment 7 Barbara Scheffner 2017-01-03 11:19:57 UTC
bt command ended with "No stack." See console trace as attachment.
Comment 8 caulier.gilles 2017-01-03 11:29:35 UTC
Wolfgang,

As i explain in comment #4, you cannot run AppImage executable in GDB, because digiKam executable inside the bundle is wrapped by a bash script.

To wrap around use my last AppImage version posted in GDrive few days ago, and use the new debug option to pass to AppImage executable. This will run internal digiKam executable to GDB as well. I show a demo in comment #5

Typically, just run : "./digikam-5.4.0-01-x86-64.appimage debug"

This will open a GDB console. use "r" to run digiKam inside GDB. When it crash, use "bt" to get backtrace. Very simple.

Gilles
Comment 9 Barbara Scheffner 2017-01-04 00:19:07 UTC
Very simple, sure! For a silly user like me. Pfff ...
But now comes the interesting thing: I did it but that way digiKam didn't crash! I tried again the "normal" way but cannot reproduce the crash anymore. Everything works fine. Seems you fixed the bug by creating this new bundle.

Wolfgang
Comment 10 caulier.gilles 2017-01-04 08:14:39 UTC
Not sure if the bug is fixed.

The current AppImage have been increased of 150Mb, after to add to debug symbols. Debugs Symbols can introduce some time latency at run time which can mask race conditions.

I will rebuild the AppImage without debug symbols. You will test again. If crash do not appear, so yes, we can considerate that code can be fixed.

Gilles
Comment 11 caulier.gilles 2017-01-04 17:24:27 UTC
Wolfgang,

Another test for you is to use the current digiKam AppImage normaly without to pass "debug" argument.

The way to run digiKam is GDB slow down a little bit the runtime due to management debug symbols. I would to know if no race condition appear in this case.

Note: the AppImage without debug symbols will be available this evening.

Gilles
Comment 12 Barbara Scheffner 2017-01-04 18:19:12 UTC
I did that already (see comment 9) and I did it now another time: everything works fine.
Comment 13 caulier.gilles 2017-01-04 22:11:06 UTC
Wolfgang,

In GDrive repository, the AppImage 64 bits exists now with and without debug symbols. The file size is really different.

digikam-5.4.0-01-x86-64-debug.appimage => 398131200 bytes
digikam-5.4.0-01-x86-64.appimage       => 209846272 bytes

Please test with the non debug symbols version, just to be sure.

Gilles
Comment 14 Barbara Scheffner 2017-01-05 00:24:16 UTC
I tested with digikam-5.4.0-01-x86-64.appimage and everything works o.k.