Bug 512507 - Open with menu throws an error
Summary: Open with menu throws an error
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-OpenWith (other bugs)
Version First Reported In: 8.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-23 13:01 UTC by Den
Modified: 2025-11-26 16:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.9.0
Sentry Crash Report:


Attachments
Screenshot of an error message (15.45 KB, image/png)
2025-11-23 13:01 UTC, Den
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Den 2025-11-23 13:01:53 UTC
Created attachment 187091 [details]
Screenshot of an error message

SUMMARY
"Open with..." menu throws an error sometimes when executed from Thumbnails view of a digikam main window.

STEPS TO REPRODUCE
1. Select thumbnails view
2. Right click any photo
3. Choose Open with -> Other...
4. An error appears (not always, but occasionally)

OBSERVED RESULT
An error message: 
In Russian "Не удается найти "2䶨Ь". Проверьте, правильно ли указано имя и повторите попытку."
In English it should be like "Cannot find "2䶨Ь". Check if the name is entered correctly and try again."

EXPECTED RESULT
A pop up window with a list of software to choose.

SOFTWARE/OS VERSIONS
digiKam: 8.8.0
KDE Frameworks: 6.17.0
Qt: Using 6.9.1 and built against 6.9.1
Windows 10 Version 22H2
Build ABI: x86_64-little_endian-llp64
Kernel: winnt 10.0.19045

ADDITIONAL INFORMATION
I have several image editors installed: Adobe Lightroom Classic 14, Nikon NX Studio 1.9.1, GIMP 3.0.6, RawTherapee 5.12 and others.
Comment 1 Maik Qualmann 2025-11-23 14:37:17 UTC

*** This bug has been marked as a duplicate of bug 487062 ***
Comment 2 Maik Qualmann 2025-11-23 14:50:51 UTC
Git commit ca68f06c3530850bda9107af918098dc9c331dd7 by Maik Qualmann.
Committed on 23/11/2025 at 14:49.
Pushed by mqualmann into branch 'master'.

use SHELLEXECUTEINFO(W)
Related: bug 487062

M  +6    -6    core/app/items/utils/contextmenuhelper_services.cpp

https://invent.kde.org/graphics/digikam/-/commit/ca68f06c3530850bda9107af918098dc9c331dd7
Comment 3 Maik Qualmann 2025-11-23 15:07:02 UTC
Git commit c8b3da6aadb50a1eb60980bfdcc12cdcb9706309 by Maik Qualmann.
Committed on 23/11/2025 at 15:05.
Pushed by mqualmann into branch 'master'.

use SHELLEXECUTEINFO(W) also for the import tool
Related: bug 487062

M  +6    -6    core/utilities/import/widgets/importcontextmenu.cpp

https://invent.kde.org/graphics/digikam/-/commit/c8b3da6aadb50a1eb60980bfdcc12cdcb9706309
Comment 4 Maik Qualmann 2025-11-23 19:29:18 UTC
A Windows version with the latest changes is available. Could you please test with the pre-release version of digiKam-8.9.0 to see if the problem is resolved?

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

Maik
Comment 5 Maik Qualmann 2025-11-24 09:18:36 UTC
The problem persists, but only on the first launch of an external app.
After that, it always works, as if something hadn't been initialized.

Maik
Comment 6 Maik Qualmann 2025-11-24 11:34:07 UTC
Git commit d872d9dd79694e6a0ef28083730d9949910962d1 by Maik Qualmann.
Committed on 24/11/2025 at 11:33.
Pushed by mqualmann into branch 'master'.

next try to fix SHELLEXECUTEINFO
Related: bug 487062

M  +6    -2    core/app/items/utils/contextmenuhelper_services.cpp

https://invent.kde.org/graphics/digikam/-/commit/d872d9dd79694e6a0ef28083730d9949910962d1
Comment 7 Den 2025-11-24 11:53:42 UTC
(In reply to Maik Qualmann from comment #4)
> A Windows version with the latest changes is available. Could you please
> test with the pre-release version of digiKam-8.9.0 to see if the problem is
> resolved?
> 
> https://files.kde.org/digikam/
> 
> Maik

Thanks Maik
I'll test the pre-release version as soon as possible.
Comment 8 caulier.gilles 2025-11-24 11:55:07 UTC
The pre-release is published each 2 hours between 6h00 to 21h00 Paris time.
Comment 9 Maik Qualmann 2025-11-24 19:48:03 UTC
Git commit d9226549bed48f08641a56df666b4a7eea28f755 by Maik Qualmann.
Committed on 24/11/2025 at 19:47.
Pushed by mqualmann into branch 'master'.

the char* array might be deleted too early
Related: bug 487062

M  +3    -0    core/app/items/utils/contextmenuhelper_p.h
M  +5    -2    core/app/items/utils/contextmenuhelper_services.cpp

https://invent.kde.org/graphics/digikam/-/commit/d9226549bed48f08641a56df666b4a7eea28f755
Comment 10 Maik Qualmann 2025-11-25 17:29:14 UTC
Git commit 2f216fe62f838d11f9be4b68901536cf78f4bec0 by Maik Qualmann.
Committed on 25/11/2025 at 17:27.
Pushed by mqualmann into branch 'master'.

fix "Open with" call on Windows API
String buffer was deleted too early.
Related: bug 487062
FIXED-IN: 8.9.0

M  +2    -2    NEWS
M  +5    -1    core/app/items/utils/contextmenuhelper_p.h
M  +1    -5    core/app/items/utils/contextmenuhelper_services.cpp
M  +13   -3    core/utilities/import/widgets/importcontextmenu.cpp

https://invent.kde.org/graphics/digikam/-/commit/2f216fe62f838d11f9be4b68901536cf78f4bec0
Comment 11 Den 2025-11-26 16:01:18 UTC
(In reply to Maik Qualmann from comment #4)
> A Windows version with the latest changes is available. Could you please
> test with the pre-release version of digiKam-8.9.0 to see if the problem is
> resolved?
> 
> https://files.kde.org/digikam/
> 
> Maik

I see that many commits have been made. Thank you very much!
I am currently using version digiKam-8.9.0-20251124T140157-Qt6-Win64 and have not observed the error reoccurring so far.