Bug 494211 - Crash when saving database
Summary: Crash when saving database
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.1.3
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-10-06 15:38 UTC by smjensen51
Modified: 2025-11-03 22:56 UTC (History)
1 user (show)

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


Attachments
New crash information added by DrKonqi (4.29 KB, text/plain)
2025-10-30 19:17 UTC, Joseph Hallstrom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smjensen51 2024-10-06 15:38:59 UTC
Application: kmymoney (5.1.3)

Qt Version: 5.15.13
Frameworks Version: 5.115.0
Operating System: Linux 6.8.0-45-generic x86_64
Windowing System: X11
Distribution: Ubuntu 24.04.1 LTS
DrKonqi: 5.27.11 [KCrashBackend]

-- Information about the crash:
Crashed when saving database after importing qif file - no problems before save. Crashed 3 times; 1) while working, 2) after reopening kMyMoney, 3) after system reeboot.

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Segmentation fault

[KCrash Handler]
#4  0x00007ca4321c589c in InstitutionsModel::slotObjectModified(eMyMoney::File::Object, QString const&) () at /usr/lib/x86_64-linux-gnu/libkmm_models.so.5
#5  0x00007ca42d512e16 in ??? () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ca42f32b687 in MyMoneyFile::objectModified(eMyMoney::File::Object, QString const&) () at /usr/lib/x86_64-linux-gnu/libkmm_mymoney.so.5
#7  0x00007ca42f334300 in MyMoneyFile::commitTransaction() () at /usr/lib/x86_64-linux-gnu/libkmm_mymoney.so.5
#8  0x00007ca42f35532d in MyMoneyFileTransaction::commit() () at /usr/lib/x86_64-linux-gnu/libkmm_mymoney.so.5
#9  0x000056e71ffc3c58 in ??? ()
#10 0x000056e71ffc865f in ??? ()
#11 0x00007ca42d512e16 in ??? () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ca42e164f94 in QAction::triggered(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ca42e167eab in QAction::activate(QAction::ActionEvent) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ca42e26967a in ??? () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ca42e2697b8 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ca42e36d446 in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ca42e1b0df8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ca42e16bd45 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ca42e1746b0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ca42d4d8118 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ca42e172874 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ca42e1caa39 in ??? () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ca42e1cdfbf in ??? () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ca42e16bd45 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ca42d4d8118 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ca42d945a3b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#27 0x00007ca42d917bfc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#28 0x00007ca426c10d06 in ??? () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#29 0x00007ca42b0665b5 in ??? () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ca42b0c5717 in ??? () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ca42b065a53 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ca42d535279 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007ca42d4d6a7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007ca42d4df3e8 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x000056e71ffad77a in ??? ()
#36 0x00007ca42ca2a1ca in __libc_start_call_main (main=main@entry=0x56e71ffab930, argc=argc@entry=2, argv=argv@entry=0x7ffd49f9ac28) at ../sysdeps/nptl/libc_start_call_main.h:58
#37 0x00007ca42ca2a28b in __libc_start_main_impl (main=0x56e71ffab930, argc=2, argv=0x7ffd49f9ac28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd49f9ac18) at ../csu/libc-start.c:360
#38 0x000056e71ffaedb5 in ??? ()
[Inferior 1 (process 2581) detached]

Reported using DrKonqi
Comment 1 Thomas Baumgart 2025-07-31 06:14:25 UTC
Does this still happen with 5.2?
Comment 2 Bug Janitor Service 2025-08-15 03:46:48 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2025-08-30 03:48:10 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 4 Joseph Hallstrom 2025-10-30 19:17:58 UTC
Created attachment 186345 [details]
New crash information added by DrKonqi

kmymoney (5.1.3) using Qt 5.15.13

KMyMoney crashed 3 times while saving the file. The save was initiaed immediately after importing a 37 line csv file. Two previous imports of smaller csv files worked fine.

-- Backtrace (Reduced):
#4  0x0000705d485cc89c in InstitutionsModel::slotObjectModified(eMyMoney::File::Object, QString const&) () at /lib/x86_64-linux-gnu/libkmm_models.so.5
#5  0x0000705d43912e16 in ??? () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x0000705d4572b687 in MyMoneyFile::objectModified(eMyMoney::File::Object, QString const&) () at /lib/x86_64-linux-gnu/libkmm_mymoney.so.5
#7  0x0000705d45734300 in MyMoneyFile::commitTransaction() () at /lib/x86_64-linux-gnu/libkmm_mymoney.so.5
#8  0x0000705d4575532d in MyMoneyFileTransaction::commit() () at /lib/x86_64-linux-gnu/libkmm_mymoney.so.5
Comment 5 Jack 2025-10-30 19:51:47 UTC
When you say it crashed 3 times, are these new crashes or the same ones originally reported?

As was asked in Comment #2, does this still happen with 5.2.1?  If this version is not available for your version of Kubuntu, you can test this with one of the standalone versions: Appimage, Flatpak, or Snap.  This is important, because even if we discover an actual bug in 5.1.3, that version is no longer supported, and any fix (if still needed in 5.2) would only appear in 5.1.3 (not yet scheduled.)

I'm also curious why the backtrace seems incomplete, but that may simply be due to Dr.  Konqui, and I'm not sure the few extra lines would help identify the cause.
Comment 6 Thomas Baumgart 2025-10-31 11:20:55 UTC
> and any fix (if still needed in 5.2) would only appear in 
> 5.1.3 (not yet scheduled.)

That should possibly read "... would only appear in 5.2.2 (not yet scheduled)"
Comment 7 Jack 2025-10-31 14:07:58 UTC
Oops....  Thanks for catching that.  Perhaps I needed more coffee.
Comment 8 Joseph Hallstrom 2025-11-03 18:48:33 UTC
Comment on attachment 186345 [details]
New crash information added by DrKonqi

I imported the csv file once, KMM crashed. I repeated the process twice more with identical results. Then I reduced the file from 31 lines of data to about 15 and imported the smaller file; it worked. Then I tried importing the remainder, and KMM crashed at the end of the import. The backtrace is from that failure.
Comment 9 Jack 2025-11-03 19:21:02 UTC
Have you been able to try this with 5.2.1?  If it is not available for your version of Kubuntu (it often isn't for LTS versions) you can try an Appimage, Flatpak, or Snap version.

One more thing to check, is after importing, explicitly run a consistency check, and let us know the results.
Comment 10 Joseph Hallstrom 2025-11-03 22:41:08 UTC
Comment on attachment 186345 [details]
New crash information added by DrKonqi

There was an inconsistency with a newly created Investment that didn't have an opening price set. I found a record in the csv that referenced this investment that had a date that was older than the create date for the specified investment. 

Correcting both issues resolved the problem.
Comment 11 Jack 2025-11-03 22:56:21 UTC
Thanks for checking that.  It's still not clear exactly why that caused a crash, but you're back in business, so I'm going to close this as WORKSFORME.
Not  having a price for a security on or before its opening date is certainly something flagged by the consistency check, but I don't see why it should cause any problems, other than perhaps missing values on reports that use the net worth of investments.  (I don't know exactly what happens, but I don't think it should cause a crash, especially on saving the file.)