Bug 354956 - Invalid Filename causes Crash
Summary: Invalid Filename causes Crash
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: 4.7.2
Platform: Microsoft Windows All
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 15:35 UTC by reg-kdebugs
Modified: 2019-08-29 15:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1,5.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description reg-kdebugs 2015-11-06 15:35:52 UTC
Invalid filenames in the GnuCash import dialog cause a crash.

Reproducible: Always

Steps to Reproduce:
1. File/Import/Gnucash
2. Yes, save current file.
3. Open C:\thisfiledoesnotexist in the dialog
4. "... is not a valid file"
5. kmymoney vanishes completely after some seconds. At the first time, it also displayed "C++ runtime error" in the usual Windows "segfault" dialog style.

Actual Results:  
It crashes or vanishes.

Expected Results:  
kmymoney not crashing.
Comment 1 Ralf Habacker 2017-06-29 19:31:42 UTC
Git commit ef7b8658ce4a63f0fa0111bb62f8134e69255795 by Ralf Habacker.
Committed on 29/06/2017 at 19:31.
Pushed by habacker into branch '4.8'.

Fix 'Invalid Filename causes Crash'.

KMyMoneyApp::slotGncImport() does not check if the file
has been really loaded and emits 'fileLoaded' where
in real it has not been loaded. The crash looks to be
a result of this mismatch.
FIXED-IN:4.8.1

M  +6    -5    kmymoney/kmymoney.cpp

https://commits.kde.org/kmymoney/ef7b8658ce4a63f0fa0111bb62f8134e69255795