Bug 349938 - hang freeze during QIF import
Summary: hang freeze during QIF import
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: 4.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 375944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-05 20:44 UTC by Antoine T
Modified: 2018-03-28 08:00 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments
test file that makes crash (67 bytes, text/plain)
2015-07-05 20:47 UTC, Antoine T
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine T 2015-07-05 20:44:53 UTC
Hi,

I have Windows 8.1. I am using kmymoney for a few months and it was working great! I always import OFX file with success and did one with QIF in April. Now, when I try to import new or even a QIF that worked before, kmymoney freezes. I waited a few minutes but nothing happen. This is what I tried:
- uninstalling old 4.7.1 and installing 4.7.2.
- creating a new empty account and importing only one transaction in QIF (no accent, nothing particular, just one value and description, see attached test.qif)
- using in administrator mode
- trying to get log with https://techbase.kde.org/Projects/KMyMoney "Obtain a useful backtrace on Windows " but DrKonqi  does not launch itself and when I launch it, it says a lib is missing

The thing is, it has worked before and I have no idea why it does not work now. How to get more log?

Reproducible: Always

Steps to Reproduce:
1. Installing KMyMoney 4.7.2.
2. Creates an empty account.
3. Import a simple QIF

Actual Results:  
Freezes. Does not respond.

Expected Results:  
Import windows with success.
Comment 1 Antoine T 2015-07-05 20:47:49 UTC
Created attachment 93486 [details]
test file that makes crash
Comment 2 Antoine T 2015-07-05 21:19:51 UTC
I can add that each time I create a new Windows user, and launch kmymoney in administrator, I can import one QIF file (the test.qif attached). The second time, for the same file, it freezes.
Comment 3 allan 2015-07-05 21:27:43 UTC
On 05/07/15 21:44, Antoine T wrote:
> https://bugs.kde.org/show_bug.cgi?id=349938
>
>              Bug ID: 349938
>             Summary: hang freeze during QIF import
>             Product: kmymoney4
>             Version: 4.7.2
>            Platform: MS Windows
>                  OS: other
>              Status: UNCONFIRMED
>            Severity: major
>            Priority: NOR
>           Component: file
>            Assignee: kmymoney-devel@kde.org
>            Reporter: antoine.tran.31+kde@gmail.com
>
> Hi,
>
> I have Windows 8.1. I am using kmymoney for a few months and it was working
> great! I always import OFX file with success and did one with QIF in April.
> Now, when I try to import new or even a QIF that worked before, kmymoney
> freezes. I waited a few minutes but nothing happen. This is what I tried:
> - uninstalling old 4.7.1 and installing 4.7.2.
> - creating a new empty account and importing only one transaction in QIF (no
> accent, nothing particular, just one value and description, see attached
> test.qif)
> - using in administrator mode
> - trying to get log with https://techbase.kde.org/Projects/KMyMoney "Obtain a
> useful backtrace on Windows " but DrKonqi  does not launch itself and when I
> launch it, it says a lib is missing
>
> The thing is, it has worked before and I have no idea why it does not work now.
> How to get more log?
>
> Reproducible: Always
>
> Steps to Reproduce:
> 1. Installing KMyMoney 4.7.2.
> 2. Creates an empty account.
> 3. Import a simple QIF
>
> Actual Results:
> Freezes. Does not respond.
>
> Expected Results:
> Import windows with success.
>

Aree you able to run KMyMoney from the system console?   Just enter 
kmymoney.  The console log might give a clue.  During your attempted 
import, look at the status bar at the bottom.  It might indicate the 
progress, or lack of it.

Also, try creating a new kmymoney file in case yours has a corruption.

Of course, your file imports correctly here.

Allan
Comment 4 allan 2015-07-05 23:01:12 UTC
On 05/07/15 22:19, Antoine T wrote:
> https://bugs.kde.org/show_bug.cgi?id=349938
>
> --- Comment #2 from Antoine T <antoine.tran.31+kde@gmail.com> ---
> I can add that each time I create a new Windows user, and launch kmymoney in
> administrator, I can import one QIF file (the test.qif attached). The second
> time, for the same file, it freezes.
>

For the second attempt, did you restart KMM?  I'm not suggesting that 
you should, but am just trying to get a picture.

When you upgrade/downgrade, do you always deinstall the old version? 
Otherwise,the libraries can get mixed up.

What was the missing library that prevented getting the backtrace?

Allan
Comment 5 Antoine T 2015-07-06 20:19:24 UTC
Hi Allan,
>Aree you able to run KMyMoney from the system console? 
Yes. There is no output, except a irrelevant line that says "Warning: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.". I believe this is just because it launches dbus-daemon after some sub-component of kmymoney starts.

>During your attempted import, look at the status bar at the bottom. It might indicate the progress, or lack of it.
The progress is at 0% when it freezes. No increase later.

>Also, try creating a new kmymoney file in case yours has a corruption.
Yes, I have tried that, as said before. I work in IT, I did some test work. Creating a new account with a basic QIF did not solve the issue.

>For the second attempt, did you restart KMM? I'm not suggesting that you should, but am just trying to get a picture.

>When you upgrade/downgrade, do you always deinstall the old version? 
It was the first time I upgraded. I uninstalled, deleted the old directory, than reinstall in the same location. I even tried to delete all related keys in the registry and .kde directory in %AppData%. This reseted my QIF import profile, but the issue stays.

>What was the missing library that prevented getting the backtrace?
kxmlrpcclient is missing. Haven't found it for Windows. Anyway to get it officially?

Each attempt, I terminate all kmymoney process (dbus, kde, etc.).

I was quite desperate so I did a lot of retest. But during my attempts, a very small number of them worked. Today, I could not reproduce the success I said (new Windows administrator user, new account, test.qif used).

I think we need more logs to go further. Thanks.
Comment 6 Antoine T 2015-07-06 20:20:18 UTC
>For the second attempt, did you restart KMM? I'm not suggesting that you should, but am just trying to get a picture.
Could not reproduce first attempt success today (same freeze).
Comment 7 allan 2015-07-06 21:17:40 UTC
(In reply to Antoine T from comment #5)
> Hi Allan,
> >Aree you able to run KMyMoney from the system console? 
> Yes. There is no output, except a irrelevant line that says "Warning:
Hmph...
> QDBusConnection: session D-Bus connection created before QCoreApplication.
> Application may misbehave.". I believe this is just because it launches
> dbus-daemon after some sub-component of kmymoney starts.
> 
> >During your attempted import, look at the status bar at the bottom. It might indicate the progress, or lack of it.
> The progress is at 0% when it freezes. No increase later.
> 
> >Also, try creating a new kmymoney file in case yours has a corruption.
> Yes, I have tried that, as said before. I work in IT, I did some test work.
> Creating a new account with a basic QIF did not solve the issue.

Sorry, Antoine, but you said "> - creating a new empty account " I read that as
verbatim, and not as creating a new "KMY file", which is what I was suggesting, in case the
file was corrupt.

> >For the second attempt, did you restart KMM? I'm not suggesting that you should, but am just trying to get a picture.
> 
> >When you upgrade/downgrade, do you always deinstall the old version? 
> It was the first time I upgraded. I uninstalled, deleted the old directory,
> than reinstall in the same location. I even tried to delete all related keys
> in the registry and .kde directory in %AppData%. This reseted my QIF import
> profile, but the issue stays.
> 
> >What was the missing library that prevented getting the backtrace?
> kxmlrpcclient is missing. Haven't found it for Windows. Anyway to get it
> officially?

Well, that sounds like a KDE problem, rather that a KMyMoney issue.
It seems to be part of libkdepimlibs4.  It might be worthwhile going back to your 
KMyMoney installation and looking for it.  You might need to uninstall then reinstall
it.
Comment 8 Antoine T 2015-07-07 06:20:30 UTC
>Sorry, Antoine, but you said "> - creating a new empty account " I read that as verbatim
You're right, sorry :)

>Well, that sounds like a KDE problem, rather that a KMyMoney issue. It seems to be part of libkdepimlibs4. It might be worthwhile going back to your KMyMoney installation and looking for it. You might need to uninstall then reinstall it.
Here is my process:
1) uninstalled KMyMoney.
2) deleted application dir, .kde dir in home user dir, all related keys in registry
3) installed KMyMoney 4.7.2 in same location in admin mode with kmymoney-x86-setup-4.7.2.exe, successfully
4) search for kxml* in app dir, lib not found
5) launches drkonqi.exe in normal and admin mode, same error.
Is kmymoney-x86-setup-4.7.2.exe supposed to package kxmlrpcclient ? I will unarchive it and search there later.
Comment 9 Cristian Oneț 2015-07-10 12:32:19 UTC
This sound like a duplicate of BUG 290483, do you have 'cat.exe' in the KMyMoney installation folder?
Comment 10 Cristian Oneț 2015-07-10 12:35:13 UTC
Nevermind looking for cat.exe, it seems that the fix of BUG 290483 does not work on WIndows 8.
Comment 11 Antoine T 2015-07-26 16:19:55 UTC
(In reply to Cristian Oneț from comment #10)
> Nevermind looking for cat.exe, it seems that the fix of BUG 290483 does not
> work on WIndows 8.

Hi Cristian, I looked at my KmyMoney dir and found the cat. It worked as a cat.exe should work. I have not understood what you said. Do you mean I cannot get anymore log because of this issue ?
Comment 12 flywire 2015-11-01 12:06:48 UTC
I had a modal problem with QIF import (on Win7-32). A warning message popped up but it was behind the window processing the transactions and I could not get the focus to the warning message message to clear it so I had to shut the session down. Same thing happened with a few files so I repositioned each window as I went through the process so they did not occupy the center of the screen.
Comment 13 t_com 2016-01-01 22:04:34 UTC
FYI: I also have this problem with some .qif files, but not others.  KMyMoney 4.7.2 (and earlier) on Windows 8.1 locks upon importing.

Locks up after the "QIF Import" dialogue, but before the Account Selection dialogue.

The QIF file is very short, contains no sensitive financials, and is inlined below:
------------------
!Type:Bank
D12/31/2015
C*
PCredit Dividend
M
T0.37
^
D12/30/2015
C*
PMYCOMPANY  - EDIPAYMENT
MACH Deposit
T369.00
^

------------------
Comment 14 allan 2016-01-03 00:33:11 UTC
I am able to import your file without any hang.  This is on Linux HEAD.

However, I'll need to look more closely, as the values import 
incorrectly.  369.00 becomes 36900.00 and 0.37 becomes 0.00.

Allan


On 01/01/16 22:04, via KDE Bugzilla wrote:
> !Type:Bank
> D12/31/2015
> C*
> PCredit Dividend
> M
> T0.37
> ^
> D12/30/2015
> C*
> PMYCOMPANY  - EDIPAYMENT
> MACH Deposit
> T369.00
> ^
Comment 15 allan 2016-01-03 11:38:45 UTC
(In reply to allan from comment #14)
> I am able to import your file without any hang.  This is on Linux HEAD.
> 
> However, I'll need to look more closely, as the values import 
> incorrectly.  369.00 becomes 36900.00 and 0.37 becomes 0.00.
> 
> Allan
> 
> 
> On 01/01/16 22:04, via KDE Bugzilla wrote:
> > !Type:Bank
> > D12/31/2015
> > C*
> > PCredit Dividend
> > M
> > T0.37
> > ^
> > D12/30/2015
> > C*
> > PMYCOMPANY  - EDIPAYMENT
> > MACH Deposit
> > T369.00
> > ^

Please ignore my second paragraph.  After some sleep, I realised that I had omitted the first character (the "!") when copy/pasting into a file for testing.

So, we're back at square 1.  Your file loads here, but not on Windows 4.7.2.  Are you able to try 4.7.1?  I think you indicated it may have the same problem, but, I'd like to confirm.

Are you able to provide a file that works, and another that doesn't work for you?

Otherwise, I'm afraid we're waiting for the next stable release.  This may not be too long, I hope.

Allan
Comment 16 Antoine T 2016-12-08 22:15:31 UTC
Hi, any news on this? I can confirm this bug is still here in a completely fresh install Windows 10 and fresh Kmymoney 4.8.0. This bug is random, sometime I can have a windows asking me the date format, sometime it freezes, sometime it works. I use this app each month, and this month particularly, it never works, strange...
Comment 17 Antoine T 2016-12-08 22:45:22 UTC
I know why this does not work! This time, I put my QIF file in a directory, with a "," inside. I will not use this character anymore in filename, including spaces, but KMyMoney should not freeze because of this.
Comment 18 Jack 2016-12-08 22:54:55 UTC
Unfortunately, I suspect this is not really a KMyMoney issue, but an issue with one of the underlying KDE libraries that KMM calls to open the file.  However, now that we know there is an issue with odd characters in filenames, it seems more possible that someone could track it down.  Thanks for the extra information.  (Unfortunately, I don't think there is any more work on KDE4 on Windows - all efforts are going towards the Frameworks versions.  However, at some point, we will be able to test this in that environment.
Comment 19 allan 2016-12-09 00:03:37 UTC
The small test file still imports without problem here.

In comment #12, there is mention of a problem with an error message window being overlaid with other windows.  Can you try that, moving superimposed windows out of the way or closing them?

I can't think of any way to fix a problem that I can't reproduce, sadly.

Allan
Comment 20 allan 2016-12-09 00:07:08 UTC
Just saw your commment about the ',', and I have tried that, both in a file name and in a directory, again without problem, I'm afraid.

Allan
Comment 21 Antoine T 2016-12-10 14:05:27 UTC
(In reply to allan from comment #20)
> Just saw your commment about the ',', and I have tried that, both in a file
> name and in a directory, again without problem, I'm afraid.
> 
> Allan

Have you tried in Windows or Linux?
Comment 22 allan 2016-12-10 14:11:48 UTC
(In reply to Antoine T from comment #21)
> (In reply to allan from comment #20)
> > Just saw your commment about the ',', and I have tried that, both in a file
> > name and in a directory, again without problem, I'm afraid.
> > 
> > Allan
> 
> Have you tried in Windows or Linux?

Sorry, but I'm Linux only.  Perhaps a Windows user could do this small test.

How confident are you that the ',' issue resolves your problem?
Comment 23 Antoine T 2016-12-10 14:25:15 UTC
I am quite confident because:
* it has always worked since month except this month
* the only noticeable changement is that I have put the QIF in one level down with a "," inside, instead of parent
* I tried multiple times with and without ",", with small and long filename, and this is the conclusion.
* the issue is very reproductible, but with 2 kind of symptoms. In my usual (3year-old) account file, it either freezes or shows a window to choose which date format I want to use (although it already is set in QIF profile). For the latter, the app shows that it has imported successfully no element. As if it can see nothing inside the file. I have tried today to create a new account, and it never freezes, but always ask me the date format, and import nothing. When removing the ",", it works.
Comment 24 allan 2016-12-10 15:46:57 UTC
OK, that's good to know.  At the moment, I'm suspecting that this is an issue with how Windows handles these file name characters.  It may be possible, given developer time availability, that a work around could be provided.  The timescale, however, is not short, as developer time is in short supply, and the big priority at the moment is the port of KMyMoney to Frameworks5.

So far as the date format is concerned, KMM attempts to derive the format from the actual data.  However, because of the ambiguity of day and month values, it is not always possible to determine this absolutely so that is when the query occurs, which only the user can do.  I'm not sure, though, however, whether in such cases, the stored date format could be used, or even whether it is used.
Comment 25 NSLW 2017-07-02 09:22:30 UTC
*** Bug 375944 has been marked as a duplicate of this bug. ***
Comment 26 NSLW 2017-07-06 16:26:44 UTC
Git commit e88b2b3343d8e6a23f6b60d3f3da66e3a97beb01 by Łukasz Wojniłowicz.
Committed on 06/07/2017 at 16:17.
Pushed by wojnilowicz into branch 'master'.

Set parent for QDialog in statement reader

Basing on comment #13, This should fix the bug.
FIXED-IN:5.0

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

M  +2    -4    kmymoney/converter/mymoneystatementreader.cpp
M  +3    -0    kmymoney/dialogs/kaccountselectdlgdecl.ui
M  +0    -1    kmymoney/dialogs/kimportdlg.cpp
M  +3    -0    kmymoney/dialogs/kimportdlgdecl.ui
M  +2    -2    kmymoney/kmymoney.cpp

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