Bug 415489 - Win32 7.0.0 Beta 1 Crash On Opening Preview
Summary: Win32 7.0.0 Beta 1 Crash On Opening Preview
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Engine (show other bugs)
Version: 7.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-23 16:26 UTC by hardy.public
Modified: 2019-12-30 10:24 UTC (History)
3 users (show)

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


Attachments
Debug log (69.28 KB, text/plain)
2019-12-23 16:26 UTC, hardy.public
Details
Debug Log 2 (69.65 KB, text/plain)
2019-12-23 19:49 UTC, hardy.public
Details
AppCashView Screenshot (47.19 KB, image/png)
2019-12-24 10:24 UTC, hardy.public
Details
DebugView log for digiKam-6.4.0 crash on windows 10 on switching to preview mode (12.92 KB, text/plain)
2019-12-25 10:11 UTC, ajay1976
Details
gdb digiKam log for digiKam-6.4.0 crash on windows 10 on switching to preview mode (65.22 KB, text/plain)
2019-12-25 10:36 UTC, ajay1976
Details
DebugView log for digiKam-6.4.0 crash on windows 10 while in Preview mode after fix (108.38 KB, text/plain)
2019-12-29 13:33 UTC, ajay1976
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hardy.public 2019-12-23 16:26:35 UTC
Created attachment 124672 [details]
Debug log

SUMMARY
Opening the preview for an image works for a second or two then digiKam crashes everytime. 

STEPS TO REPRODUCE
1. Preview on thumbnail.
2. 
3. 

OBSERVED RESULT
Crash. Debug log shows at 16.60656548:
"Attempting to add QLayout "" to QWidget "", which already has a layout"

EXPECTED RESULT
Comment 1 caulier.gilles 2019-12-23 17:07:05 UTC
Can you share P:/Archive/Temp/DigiKam Test/IMG_19190901_820637.JPG and  P:/Archive/Temp/DigiKam Test/TheBroadways0010_1.JPG files that we can see in the debug log ?

Gilles Caulier
Comment 2 hardy.public 2019-12-23 19:49:15 UTC
Created attachment 124676 [details]
Debug Log 2

I can't share those images, sorry, I should have checked before posting.

I have an image which causes the same crash (IMG_20130825_170807.JPG) but it doesn't have the same debug log entry so there may be more than one problem.
Comment 3 hardy.public 2019-12-23 19:57:29 UTC
The problem image is DSC_0017_1.JPG which is too large to attach but is accessible here:
https://1drv.ms/u/s!AhmvR4JSJH8OkwwXmqk0n0yOBH7d?e=56RzXD
Comment 4 Maik Qualmann 2019-12-23 21:07:51 UTC
Can you choose something else in the sidebars for testing than the map. We may also have a crash in Marble.

This message is also strange, which does not occur under Linux:
QObject::connect: signal not found in Digikam::MaintenanceTool

Maik
Comment 5 Maik Qualmann 2019-12-23 21:26:53 UTC
This new type of signal/slot connection can probably not be processed by MinGW. It is not relevant for this crash, but maintenance tasks cannot currently be canceled in the Windows version.

connect(this, static_cast<void (ProgressItem::*)(const QString&)>
    (&ProgressItem::progressItemCanceled),
    this, &MaintenanceTool::slotCancel);

Maik
Comment 7 caulier.gilles 2019-12-23 21:41:27 UTC
MXE use G++ 5.5.0 and is compatible with C++11. We just need to force compiler to use C++11 in CMake at configuration stage.
Comment 8 Maik Qualmann 2019-12-23 21:56:35 UTC
Ok, if MinGW uses C++03 by default, then it is clear. I cannot reproduce the crash with the test image in a Windows 10 VM.

Maik
Comment 9 hardy.public 2019-12-24 10:10:39 UTC
I can't reliably reproduce this problem in different Windows sessions. Restarting the PC seems to resolve the issue sometimes.

However, when the problem was present the following observations are 100% repeatable on my PC at least.

- "Slideshow" and "Open with Default Application" do NOT result in the crash. 

- "Open...", "Preview", "Scan For Faces", "OpenGL Image Viewer" and "Presentation..." all result in a crash.


Here's a list of actions I've tried to fix the issue when present:
"Refresh"
"Reread Metadata From File"
"Write Metadata to File"
"Rename"
"Assign Labels" -> "Rating"
"Rotate right"
Adjusting creation date.
Deleting the database in Windows and adding a new collection.
Comment 10 hardy.public 2019-12-24 10:24:06 UTC
Created attachment 124685 [details]
AppCashView Screenshot

I looked at the Report.wer files in C:\ProgramData\Microsoft\Windows\WER\ReportArchive with AppCrashView.

Not sure if it's any use to you.
Comment 11 Maik Qualmann 2019-12-24 11:42:13 UTC
If the file exists, it would be of interest:

C:\Users\%USERNAME%\AppData\Local\digikam_crash.log

Maik
Comment 12 Maik Qualmann 2019-12-24 11:42:45 UTC
*** Bug 415521 has been marked as a duplicate of this bug. ***
Comment 13 hardy.public 2019-12-24 12:02:46 UTC
(In reply to Maik Qualmann from comment #11)
> If the file exists, it would be of interest:
> 
> C:\Users\%USERNAME%\AppData\Local\digikam_crash.log
> 
> Maik

No such file unfortunately. Let me know how I can generate it and I will try.
Comment 14 Maik Qualmann 2019-12-24 12:53:56 UTC
The log should have been created automatically. There is another option with the debugger, but it is a little more difficult, let's see if you can do it.

Start the CMD.exe and execute the following commands:

cd "C:\Program Files\digiKam"
gdb digikam

(gdb) r    <=== type "r" + enter for run digikam

.... output from digikam...crash...

(gdb) bt   <=== type "bt" + enter for the backtrace

.... post this messages

(gdb) q    <=== type "q" + enter for quit

Maik
Comment 15 ajay1976 2019-12-25 10:11:20 UTC
Created attachment 124700 [details]
DebugView log for digiKam-6.4.0 crash on windows 10 on switching to preview mode

I started DebugView and switched from Thumbnails to Preview mode a few times to produce this file.
Comment 16 ajay1976 2019-12-25 10:36:53 UTC
Created attachment 124701 [details]
gdb digiKam log for digiKam-6.4.0 crash on windows 10 on switching to preview mode

This log was extracted using below steps:
cd "C:\Program Files\digiKam"
gdb digikam

(gdb) r    <=== type "r" + enter for run digikam

.... output from digikam...crash...

(gdb) bt   <=== type "bt" + enter for the backtrace

.... post this messages

(gdb) q    <=== type "q" + enter for quit
Comment 17 Maik Qualmann 2019-12-25 11:58:10 UTC
We have this error message:
--------
Qt Concurrent has caught an exception thrown from a worker thread.	
This is not supported, exceptions thrown in worker threads must be	
caught before control returns to Qt Concurrent.
--------

I checked where it is created in Qt. We should probably compile Qt with QT_NO_EXCEPTIONS, which is probably the standard. But we may have an exception that we no longer catch. This exception only occurs on some Windows installations. I will test a workaround for Windows here.

Maik
Comment 18 Maik Qualmann 2019-12-25 12:12:05 UTC
Git commit 7fffd49c5fc9080e96af2f0bf9ce642c6c5e349a by Maik Qualmann.
Committed on 25/12/2019 at 12:11.
Pushed by mqualmann into branch 'master'.

try to fix crash on preview image

M  +14   -6    core/libs/dimg/loaders/dimgloader.h

https://invent.kde.org/kde/digikam/commit/7fffd49c5fc9080e96af2f0bf9ce642c6c5e349a
Comment 19 Maik Qualmann 2019-12-27 12:06:27 UTC
A new test version of digiKam-7.0.0-Beta1 is available. Can the crash still be reproduced?

https://files.kde.org/digikam/

Maik
Comment 20 hardy.public 2019-12-27 16:27:17 UTC
(In reply to Maik Qualmann from comment #14)
> The log should have been created automatically. There is another option with
> the debugger, but it is a little more difficult, let's see if you can do it.
> 
> Start the CMD.exe and execute the following commands:
> 
> cd "C:\Program Files\digiKam"
> gdb digikam
> 
> (gdb) r    <=== type "r" + enter for run digikam
> 
> .... output from digikam...crash...
> 
> (gdb) bt   <=== type "bt" + enter for the backtrace
> 
> .... post this messages
> 
> (gdb) q    <=== type "q" + enter for quit
> 
> Maik

Same output as ajay1976:

#0  0x66cd8dd0 in Z11qt_assert_xPKcS0_S0_i () from C:\Program Files (x86)\digiKam\Qt5Core.dll
#1  0x00000000 in ?? ()
Comment 21 Maik Qualmann 2019-12-27 16:30:40 UTC
Can you please deactivate color management in digiKam Setup and test again?

Maik
Comment 22 hardy.public 2019-12-27 17:11:38 UTC
(In reply to Maik Qualmann from comment #21)
> Can you please deactivate color management in digiKam Setup and test again?
> 
> Maik

With "Enable Colour Management" set to off, it makes no difference.
Comment 23 hardy.public 2019-12-27 17:12:07 UTC
Also, I disabled all plugins and this makes no difference either.
Comment 24 hardy.public 2019-12-27 17:16:24 UTC
Just one side observation. The following line insists that digikam_crash.log is output:
 
"warning: digikam.general: DrMinGw crash-file will be located at:  "C:\\Users\\USERNAME\\AppData\\Local\\digikam_crash.log""

This file is never made on my system, or if it is created, it must get deleted again soon after.
Comment 25 hardy.public 2019-12-27 17:24:57 UTC
(In reply to Maik Qualmann from comment #19)
> A new test version of digiKam-7.0.0-Beta1 is available. Can the crash still
> be reproduced?
> 
> https://files.kde.org/digikam/
> 
> Maik

The version digiKam-7.0.0-beta1-20191227T084042-Win64 does not crash as far as I tested it.
Comment 26 caulier.gilles 2019-12-27 17:29:02 UTC
The car ash log must be present. I already experienced some conflicts with anti-virus stuff. Are you a virus guard enabled and n your system ?

Another Q: did you use the 32 bits or the 64 bits version on est our system ? If your windows is 64 bits, use DK 64 bits too.
Comment 27 hardy.public 2019-12-27 18:12:53 UTC
I have Win 10 64 bit.

When the invitation went out to test 7.0.0 Beta 1, I looked at the list of packages and saw only 32 bit:

    digiKam-7.0.0-beta1-Win32.exe

But now I look harder and I see the 64 bit version:

    digiKam-7.0.0-beta1-20191221T072646-Win64.exe

I think it I missed it because these versions are not next to each other in the list due to differing filename convention. At the time I assumed you hadn't got around to the 64 bit version and figured it wouldn't matter anyway but I guess not! So that's why I installed 32 bit DK on my 64 bit Win 10.

It looks like it is the trigger for this problem because I installed digiKam-7.0.0-beta1-20191221T072646-Win64.exe (i.e. before QT_NO_EXCEPTIONS) and the problem is gone. My apologies for wasting your time.
Comment 28 ajay1976 2019-12-29 13:32:27 UTC
I tested digiKam-7.0.0-Beta1 32-bit on Windows 10. It still crashed after some time. I could capture DebugView log. But while trying to capture digikam debug log my digikam hanged and I had to kill it. I have attached DebugView log.
Comment 29 ajay1976 2019-12-29 13:33:58 UTC
Created attachment 124771 [details]
DebugView log for digiKam-6.4.0 crash on windows 10 while in Preview mode after fix
Comment 30 caulier.gilles 2019-12-29 13:43:23 UTC
You tested a digiKam 32 on a Windows 10 32 bits or 64 bits ?
Comment 31 ajay1976 2019-12-30 10:24:08 UTC
(In reply to caulier.gilles from comment #30)
> You tested a digiKam 32 on a Windows 10 32 bits or 64 bits ?

I tested on Windows 10 32 bit.