Bug 483413 - Opening a folder to load a gpx file freezes Digikam if there is a .json file into this folder (any .json file)
Summary: Opening a folder to load a gpx file freezes Digikam if there is a .json file ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Geolocation-Correlator (show other bugs)
Version: 8.3.0
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-13 08:45 UTC by mahikeulbody
Modified: 2024-03-14 06:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.3.0
Sentry Crash Report:


Attachments
backtrace from digiKam-8.3.0-20240312T172522-x86-64-debug.appimage bundle (10.13 KB, text/plain)
2024-03-13 13:15 UTC, mahikeulbody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahikeulbody 2024-03-13 08:45:19 UTC
SUMMARY
Into Geolocation-Correlator, opening a folder in order to load a gpx file freezes Digikam if this folder contains a json file (any suffixed .json file, even empty).

STEPS TO REPRODUCE
1. Add a json file into a folder (any filename, any content)
2. Go to Geoloaction-Correlator
3. Load a GPX file
4. Open the folder containing the json file

OBSERVED RESULT
at step 4, Digikam freezes 

EXPECTED RESULT
List of the gpx files eventually present in the folder

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.7.7-1-MANJARO (64-bit)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Report made with digiKam-8.3.0-20240312T172522-x86-64.appimage (2024-03-12 17:39)
Comment 1 Maik Qualmann 2024-03-13 09:49:19 UTC
Why would a *.json file that doesn't load at all cause this? I can't reproduce it either. Please send me the GPX file with which the problem occurs.

Maik
Comment 2 Maik Qualmann 2024-03-13 09:52:08 UTC
I'm currently on Windows, do I understand correctly that when I open the file selector it freezes?

Maik
Comment 3 mahikeulbody 2024-03-13 10:09:09 UTC
It freezes when opening the file selector and navigate to a folder which contains a json file. The folder is displayed empty (even it contains gpx files) and Digikam freezes.
Comment 4 mahikeulbody 2024-03-13 10:11:27 UTC
(In reply to Maik Qualmann from comment #1)
> Why would a *.json file that doesn't load at all cause this? I can't
> reproduce it either. Please send me the GPX file with which the problem
> occurs.

Sorry for my bad description. Here, step 3 "Load a GPX file" means Click on the "Load a GPX file" button.
Comment 5 Maik Qualmann 2024-03-13 10:16:47 UTC
Hmm, I'll test it on Linux later. The AppImage uses the Qt file selector, not a native one from the system.

Maik
Comment 6 mahikeulbody 2024-03-13 11:42:14 UTC
Just to be sure I tested the same scenario with Digikam 8.2 ("normal" version, not appimage) : no problem.
Comment 7 mahikeulbody 2024-03-13 11:58:05 UTC
One more info : it is a loop (Digikam uses 100% cpu).
Comment 8 caulier.gilles 2024-03-13 12:12:59 UTC
No problem here with the current AppImage bundle. i get a json files sample from there :

https://microsoftedge.github.io/Demos/json-dummy-data/

.. and open the file dialog where the JSon file is stored. No dysfunction under Kubuntu 22.04 / 23.04 / 23.10

Gilles Caulier
Comment 9 mahikeulbody 2024-03-13 12:22:29 UTC
> No dysfunction under Kubuntu 22.04 / 23.04 / 23.10.

You had the same luck under Ubuntu with "the Freeze (loop ?) when right click on an image" bug.
Comment 10 mahikeulbody 2024-03-13 13:15:16 UTC
Created attachment 167098 [details]
backtrace from digiKam-8.3.0-20240312T172522-x86-64-debug.appimage bundle
Comment 11 Maik Qualmann 2024-03-13 17:26:47 UTC
I can't reproduce the problem here with the AppImage under openSUSE.
But I had already suspected that it was related to the QFileIconProvider, although a *.gpx filter is set, an icon is probably searched for all files in the directory.
As far as I know, the standard implementation only creates a generic icon based on the QMimeDatabase.

Gilles, have you reset the last changes to the Mimi Types files?

Maik
Comment 12 mahikeulbody 2024-03-13 17:36:39 UTC
I built a live USB from the last Manjaro ISO in order to test with a fresh and clean install : I cannot reproduce the problem.

So, I suspect there is may be something broken on my system, even if all but Digikam.appimage seems run without problem.

Maik, you told about QMimeDatabase ; is there something I can check on my system ? Or may be something to delete to force the OS to rebuild it ?
Comment 13 mahikeulbody 2024-03-13 17:57:13 UTC
I see that I have a folder into /home/michel/.local/share/icons which does not exist on the /home/user/.local/share related to my live usb. This folder contains others folders, all of them dozen of files such as appimagekit_0b91f7e6b589f1e5743d8c3bea4a4517_digikam. I suspect each time I have crashed digikam.appimage (for example to test "Freeze (loop ?) when right click on an image" problem), these files were not cleaned. Finally, is there a possibility that previous crashes have left things uncleaned that could be the cause of the present problem ?
Comment 14 caulier.gilles 2024-03-13 19:44:38 UTC
Maik,

No, The mime file database in the bundle is not yet reset to the previous version. 

Gilles
Comment 15 mahikeulbody 2024-03-13 20:14:37 UTC
Problem fixed doing : update-mime-database ~/.local/share/mime

I have no idea why. May be some "corruption" resulting of many killing digikam.appimage after a freeze/loop ?
Comment 16 caulier.gilles 2024-03-14 04:56:15 UTC
digiKam do not touch this file in your home directory.

Gilles Caulier
Comment 17 mahikeulbody 2024-03-14 06:02:04 UTC
To tell the truth, I have also deleted many files in .cache and digikam.appimage related icons (I know, always make only one change at a time to debug...) so I am not absolutely sure that is the update-mime-database ~/.local/share/mime which solve the problem.

And above all, remember that I tested the same scenario with Digikam 8.2 ("normal" version) AFTER I discovered the problem with the 8.3 appimage version : there was no problem.

But even if it remains a bit of a mystery to me, there's indeed nothing else to do but close this report.