Bug 437658

Summary: crash on windows without OpenGL
Product: [Applications] digikam Reporter: herb <herb.k>
Component: Plugin-Generic-GLViewerAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.3.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.2.0
Sentry Crash Report:

Description herb 2021-05-25 12:48:12 UTC
SUMMARY
digiKam 7.3.0 snapshot 24.5.2021 crashes on a Windows 7 system that has no support for OpenGL.
I open View --> Presentation and inside next dialog I press Start.

A popup window is shown: No support for OpenGL  -  which is correct.

One second later
- GUI has gone without any further message or 
- another popup is display: digiKam does not work properly anymore.
  Here only OK can be pressed. 

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2021-05-25 13:30:01 UTC
I know the problem under Windows. We have to see if there is another way to safely recognize OpenGL beforehand. The creation of a Qt-OpenGL widget and query whether OpenGL is available leads to a crash when exiting, no OpenGL functions were executed.

Maik
Comment 2 caulier.gilles 2021-12-13 22:15:45 UTC
Herb,

digiKam 7.4.0 release is published. Can you check if problem still reproducible ?

Thanks in advance

Gilles Caulier
Comment 3 caulier.gilles 2023-05-06 08:52:56 UTC
@herb,

digiKam 8.0.0 is out. Problem still reproducible with this release ?

Gilles Caulier
Comment 4 caulier.gilles 2023-10-15 10:14:39 UTC
@herb,


This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

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

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 5 caulier.gilles 2023-11-19 11:13:53 UTC
Hi Maik,

With the native VCPKG build + Qt6, is the OpenGL problem remain ? Note that Angle API is used as native by Qt6 :

https://chromium.googlesource.com/angle/angle/+/main/README.md

This want certainly means that DirectX dll needs to be present on the Windows system to works properly. I think with a basic Windows 10, DirectX runtime is not present. If necessary, and if a redistributable version exists, DirectX dlls can be included in the bundle.

Gilles
Comment 6 caulier.gilles 2023-11-19 11:16:24 UTC
As this one :

https://www.microsoft.com/en-us/download/details.aspx?id=35

This is the DirectX 2022 runtime. As annoted in this page :

"Microsoft DirectX® is already included in Windows XP Service Pack 2, Windows Server 2003 Service Pack 1, Windows Vista, Windows 7, Windows 8.0, Windows 8.1, Windows 10, and Windows Server equivalents. This DirectX End-User Runtime does not change the version of DirectX, but does install a number of optional side-by-side technologies from the legacy DirectX SDK that are used by some older games."

I don't know really if this runtime is necessary on client computer.

Gilles
Comment 7 caulier.gilles 2023-11-19 17:06:18 UTC

*** This bug has been marked as a duplicate of bug 458143 ***
Comment 8 caulier.gilles 2023-11-19 22:40:26 UTC
Git commit aaf8a75f033e6841d125574716f1ed55136a79e0 by Gilles Caulier.
Committed on 19/11/2023 at 23:39.
Pushed by cgilles into branch 'master'.

add guards if texture is numm to prevent crash
Related: bug 458143

M  +1    -1    core/dplugins/generic/view/glviewer/CMakeLists.txt
M  +1    -1    core/dplugins/generic/view/glviewer/glviewerglobal.h
M  +2    -2    core/dplugins/generic/view/glviewer/glviewerplugin.cpp
M  +1    -1    core/dplugins/generic/view/glviewer/glviewerplugin.h
M  +1    -1    core/dplugins/generic/view/glviewer/glviewertexture.cpp
M  +1    -1    core/dplugins/generic/view/glviewer/glviewertexture.h
M  +1    -1    core/dplugins/generic/view/glviewer/glviewertimer.cpp
M  +1    -1    core/dplugins/generic/view/glviewer/glviewertimer.h
M  +16   -12   core/dplugins/generic/view/glviewer/glviewerwidget.cpp
M  +1    -1    core/dplugins/generic/view/glviewer/glviewerwidget.h

https://invent.kde.org/graphics/digikam/-/commit/aaf8a75f033e6841d125574716f1ed55136a79e0
Comment 9 caulier.gilles 2023-11-20 08:01:43 UTC
Git commit c74ba8faed0ba1d7b2ebe6fdbbc25071356af7a1 by Gilles Caulier.
Committed on 20/11/2023 at 09:00.
Pushed by cgilles into branch 'master'.

Check if files are selected before to create GL widget instance
Close GL widget if an OpenGL error occurs at init.
Related: bug 458143

M  +31   -5    core/dplugins/generic/view/glviewer/glviewerplugin.cpp
M  +9    -39   core/dplugins/generic/view/glviewer/glviewerwidget.cpp
M  +4    -2    core/dplugins/generic/view/glviewer/glviewerwidget.h

https://invent.kde.org/graphics/digikam/-/commit/c74ba8faed0ba1d7b2ebe6fdbbc25071356af7a1
Comment 10 caulier.gilles 2023-11-20 09:23:18 UTC
Git commit 48f529839a3a02f9fbf5306358be90fcbf1517ff by Gilles Caulier.
Committed on 20/11/2023 at 10:22.
Pushed by cgilles into branch 'master'.

These 2 files are now fixed
Related: bug 458143
FIXED-IN: 8.2.0

M  +7    -2    NEWS

https://invent.kde.org/graphics/digikam/-/commit/48f529839a3a02f9fbf5306358be90fcbf1517ff