Bug 408471 - DigiKam crashes after about 10 photos viewed, random images then fail to load
Summary: DigiKam crashes after about 10 photos viewed, random images then fail to load
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-Windows (show other bugs)
Version: 6.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-09 05:54 UTC by jasonlt84
Modified: 2019-06-18 18:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jasonlt84 2019-06-09 05:54:18 UTC
SUMMARY


STEPS TO REPRODUCE
1. Open DigiKam, review images, delete some images (around 10)
2. Random image on previewer fails to load image, sometimes next one works, then third one won't, sometimes one of the ones that didn't work will then load in the previewer. After a few image views, mouse indicates background operation, DigiKam stops responding and then crashes


OBSERVED RESULT
DigiKam crashes

EXPECTED RESULT
DigiKam operates as normal

SOFTWARE/OS VERSIONS
Windows: 10
 
ADDITIONAL INFORMATION
1. While DigiKam shows images as failed to load, I can view the image in another program
2. At one point some images, failed to load after being rotated, yet others showed the rotated image in the preview
3. Right-clicked on the folder with images and ensured that not hidden and not locked
4. Log line shows at one point - digikam.exe caused an Access Violation at location 058EC2B9 in module Qt5Gui.dll Reading from location 00000004.
5. Log line shows at a different error - digikam.exe caused an Access Violation at location 0FCB5266 in module libdigikamcore.dll Writing to location 0000182C. (this looks to be the most common location).
6. These problems didn't exist with v5.9 - I let the 6.1 installer automate the uninstall of 5.9 and install of 6.1. Same database and file folder as used by 5.9

No idea what those locations refer to ?

Thanks!
Comment 1 caulier.gilles 2019-06-09 06:04:10 UTC
What do you see as trace in debugview program from Microsoft when you run digiKam to reproduce the dysfunction ?

https://www.digikam.org/contribute/
Comment 2 jasonlt84 2019-06-16 01:41:14 UTC
Hi,

I'm not sure what you meant by trace but I grabbed a snapshot of lines that seemed relevant around the point in time that the program crashed.

[23480] C:\
[23480] BuildSupportList_On_Win8
[23480] Begin buildSupportList-- C:\\Temp\Win8_64\GeneStor.inf
[23480] Open inf fail (error code : 3)
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_094825.jpg"  : JPEG file identified
[23480] bOpenDevList==FALSE
[12156] digikam.general: Stacked View Mode :  1
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_094242.jpg"  : JPEG file identified
[12156] digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_095652.jpg"  : JPEG file identified
[12156] digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
[12156] digikam.dimg: Failed to allocate chunk of memory of size 12780288 std::bad_alloc
[12156] digikam.general: Stacked View Mode :  1
[12156] digikam.general: Stacked View Mode :  1
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_100122.jpg"  : JPEG file identified
[12156] digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
[12156] digikam.general: Using  8  CPU core to run threads
[12156] digikam.general: Action Thread run  1  new jobs
[12156] digikam.general: One job is done
[12156] digikam.general: Cancel Main Thread
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_100250.jpg"  : JPEG file identified
[12156] digikam.general: Stacked View Mode :  1
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_101150.jpg"  : JPEG file identified
[12156] digikam.general: Stacked View Mode :  1
[12156] digikam.dimg: "E:/LIBRARIES/IMAGES/My Photography/20171227_100135.jpg"  : JPEG file identified
[12156] digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
[12156] digikam.dimg: Failed to allocate chunk of memory of size 3195072 std::bad_alloc
[12156] MGWHELP: C:\Program Files (x86)\digiKam\libwinpthread-1.dll - no dwarf symbols
[12156] MGWHELP: C:\Program Files (x86)\digiKam\Qt5Core.dll - no dwarf symbols

I'm seeing some errors around failing to allocate chunk of memory, and no dwarf symbols. Not sure what that means, but I'm running 40% CPU, 56% memory after DigiKam shut down.

Hopefully you can assist, because it's not much use using a program that shuts down every 5 minutes or so.

Thanks!
Comment 3 Maik Qualmann 2019-06-16 06:26:04 UTC
> [12156] digikam.dimg: Failed to allocate chunk of memory of size 3195072
> std::bad_alloc

That is indeed the problem. And we have a user with similar problem with this Bug 405232. This is a simple C++ function to get memory from the system, that fails. Only the cause is unclear.

Maik
Comment 4 Maik Qualmann 2019-06-16 06:27:40 UTC
Can you install for testing the Win32 digiKam package, so the 32bit version?

Maik
Comment 5 Maik Qualmann 2019-06-16 08:11:46 UTC
It looks like Microsoft has a problem with "std::bad_alloc" according to its docs. However, exactly in the other direction, this exception is not triggered. Ok, we're testing for a NULL pointer on Windows for testing.

Maik
Comment 6 Maik Qualmann 2019-06-16 08:25:43 UTC
Git commit dac492a5b7423ffc91eaa7cade358bf9aa685a54 by Maik Qualmann.
Committed on 16/06/2019 at 08:24.
Pushed by mqualmann into branch 'master'.

check after allocating memory only for null pointer on Windows
Related: bug 405232

M  +10   -0    core/libs/dimg/loaders/dimgloader.h

https://invent.kde.org/kde/digikam/commit/dac492a5b7423ffc91eaa7cade358bf9aa685a54
Comment 7 Maik Qualmann 2019-06-16 13:35:57 UTC
Please test the latest GIT version of digiKam-6.2.0 from my Google Drive:

https://drive.google.com/open?id=1YESwYSxb47xERo8x11Syux1HBn-PPt0e

---------- Compute package checksums for digiKam 6.2.0-git

File       : digiKam-6.2.0-git-20190616T144603-Win64.exe
Size       : 171M
MD5 sum    : 13f8025302e7ba7887865a414fe9d170
SHA1 sum   : 4a0d1577b64e1130e002b158444b3f552f6226ea
SHA256 sum : cbd53a41a82dbe037ffb1745f53af673384e9b27a62ca04bc3c9a95cdde1e42a

Maik
Comment 8 jasonlt84 2019-06-17 12:08:08 UTC
Hi Maik,

Thanks very much! I've installed DigiKam-6.2.0 per the link, and have been using this version for at least 20-30 minutes without any issues, other than after about 10-15 minutes a few of the preview images took a bit longer to load, but that's no issue.

It didn't crash after doing the same actions I've done previously. I viewed images, deleted images, added some tags with no crashes experienced.

Let me know if you want me to perform any other tasks with this version.

Thanks! 

-----Original Message-----
From: Maik Qualmann <bugzilla_noreply@kde.org> 
Sent: Sunday, 16 June 2019 11:36 PM
To: jasonlt84@gmail.com
Subject: [digikam] [Bug 408471] DigiKam crashes after about 10 photos viewed, random images then fail to load

https://bugs.kde.org/show_bug.cgi?id=408471

--- Comment #7 from Maik Qualmann <metzpinguin@gmail.com> --- Please test the latest GIT version of digiKam-6.2.0 from my Google Drive:

https://drive.google.com/open?id=1YESwYSxb47xERo8x11Syux1HBn-PPt0e

---------- Compute package checksums for digiKam 6.2.0-git

File       : digiKam-6.2.0-git-20190616T144603-Win64.exe
Size       : 171M
MD5 sum    : 13f8025302e7ba7887865a414fe9d170
SHA1 sum   : 4a0d1577b64e1130e002b158444b3f552f6226ea
SHA256 sum : cbd53a41a82dbe037ffb1745f53af673384e9b27a62ca04bc3c9a95cdde1e42a

Maik

--
You are receiving this mail because:
You reported the bug.
Comment 9 Maik Qualmann 2019-06-18 18:59:04 UTC
Ok, thanks for the test. I close the bug now, if necessary open again.

Maik