Bug 485993

Summary: Online quotes editor crashes when running from craft shell
Product: [Frameworks and Libraries] libalkimia Reporter: Ralf Habacker <ralf.habacker>
Component: Online Quotes EditorAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 8.2

Description Ralf Habacker 2024-04-23 07:14:15 UTC
STEPS TO REPRODUCE
1. install craft on Linux https://community.kde.org/Craft
2. enter craft shell
3.  build alkimia with 'craft --target=master alkimia'
3. run 'craft --run onlinequoteseditor5'

OBSERVED RESULT
The application crashes 

EXPECTED RESULT
The application should not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
The application crashes at https://invent.kde.org/office/alkimia/-/blob/master/tools/onlinequoteseditor/main.cpp?ref_type=heads#L48 where it tries to access an action from the help menu

    helpMenu.action(KHelpMenu::menuReportBug)->setVisible(false);

In this case a null pointer is returned and leads to the crash.
Comment 1 Ralf Habacker 2024-04-23 07:16:49 UTC
Git commit 88494b3e63d4344e3dbd403a37b8f06b0cc6ec57 by Ralf Habacker.
Committed on 23/04/2024 at 07:16.
Pushed by habacker into branch 'master'.

Add workaround for online quote editor to prevent a possible crash

M  +9    -3    tools/onlinequoteseditor/main.cpp

https://invent.kde.org/office/alkimia/-/commit/88494b3e63d4344e3dbd403a37b8f06b0cc6ec57
Comment 2 Ralf Habacker 2024-04-24 06:03:04 UTC
(In reply to Ralf Habacker from comment #1)
> Git commit 88494b3e63d4344e3dbd403a37b8f06b0cc6ec57 by Ralf Habacker.
> Committed on 23/04/2024 at 07:16.
> Pushed by habacker into branch 'master'.
> 
> Add workaround for online quote editor to prevent a possible crash

An actual windows snapshot from master branch (kmymoney-master-3201-windows-cl-msvc2019-x86_64.7z from https://cdn.kde.org/ci-builds/office/kmymoney/master) is also affected by this issue.