Bug 354956

Summary: Invalid Filename causes Crash
Product: [Applications] kmymoney Reporter: reg-kdebugs
Component: fileAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: crash CC: ralf.habacker
Priority: NOR    
Version: 4.7.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: All   
Latest Commit: Version Fixed In: 4.8.1,5.0.0

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