Bug 484454 - KMyMoney from master branch crashes on second and further start
Summary: KMyMoney from master branch crashes on second and further start
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 14:36 UTC by Ralf Habacker
Modified: 2024-03-27 17:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2


Attachments
Screenshot with backtrace (142.41 KB, image/png)
2024-03-25 14:36 UTC, Ralf Habacker
Details
Screenshot with backtrace (27.73 KB, image/png)
2024-03-25 14:42 UTC, Ralf Habacker
Details
More detailed stacktrace generated on Linux (170.88 KB, image/png)
2024-03-25 14:46 UTC, Ralf Habacker
Details
Disassembly of LedgerView::slotSettingsChanged (45.76 KB, image/png)
2024-03-25 14:55 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-03-25 14:36:44 UTC
Created attachment 167739 [details]
Screenshot with backtrace

STEPS TO REPRODUCTION
1. download from
https://cdn.kde.org/ci-builds/office/kmymoney/master/windows/kmymoney-master-3149-windows-cl-msvc2019-x86_64.7z
2. unpack the archive
3. enter the unzipped directory and start bin/kmymoney

OBSERVED RESULT
From second and further start  kmymoney crashes. For a backtrace see the appended screenshot.

EXPECTED RESULT
kmymoney should not crash

SOFTWARE/OS VERSIONS
Windows: 10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Comment 1 Ralf Habacker 2024-03-25 14:42:43 UTC
Created attachment 167741 [details]
Screenshot with backtrace
Comment 2 Ralf Habacker 2024-03-25 14:46:24 UTC
Created attachment 167742 [details]
More detailed stacktrace generated on Linux

As the debug symbols for the windows builds are not source indexed (Windbg reported this), a more detailed back trace has been generated on Linux.
Comment 3 Ralf Habacker 2024-03-25 14:55:26 UTC
Created attachment 167743 [details]
Disassembly of LedgerView::slotSettingsChanged

void LedgerView::slotSettingsChanged()
{
# crash
    updateGeometries();
    Q_EMIT settingsChanged();

    d->setFonts();
    d->resetMaxLineCache();
...

The crash happens before calling updateGeometries()  on accessing the virtual table of class LedgerView, which is a virtual method, which means that the this pointer is corrupted or invalid at this time.
Comment 4 Thomas Baumgart 2024-03-27 17:36:24 UTC
Git commit a9f68ecf29e046bd24066bc8b2c13a80085fbe75 by Thomas Baumgart.
Committed on 27/03/2024 at 17:36.
Pushed by tbaumgart into branch 'master'.

Prevent using uninitialized ui widgets
FIXED-IN: 5.2

M  +4    -1    kmymoney/views/ktagsview.cpp

https://invent.kde.org/office/kmymoney/-/commit/a9f68ecf29e046bd24066bc8b2c13a80085fbe75