Bug 246066 - Infinite loop while displaying the 'Investment value graph'
Summary: Infinite loop while displaying the 'Investment value graph'
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 19:24 UTC by Cristian Oneț
Modified: 2010-07-29 13:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Anon file to reproduce the bug (98.56 KB, application/gzip)
2010-07-28 19:24 UTC, Cristian Oneț
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Oneț 2010-07-28 19:24:05 UTC
Created attachment 49598 [details]
Anon file to reproduce the bug

Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

Checkout the attached file. If you select the 'Investment value graph' (maybe an incorrect translation) 'Investiții/Graficul valorii de investiții' and configure it so that all data is displayed the application hangs in an infinite loop (CPU of a core at 100%).

Reproducible: Always
Comment 1 Alvaro Soliverez 2010-07-28 19:39:18 UTC
what are your price precision settings?
Comment 2 Cristian Oneț 2010-07-28 21:11:33 UTC
(In reply to comment #1)
> what are your price precision settings?

I've reproduced this with a price precision of 4 digits.
Comment 3 Alvaro Soliverez 2010-07-29 01:11:40 UTC
I've tried the file with the reports "Investment Price Graph" and "Investment Worth Graph", with price precision 9 and 4 digits. In all cases it worked fine. It does take a couple of seconds longer than other reports, but that's it.

It might be hitting some MyMoneyMoney overflow issue, so perhaps if you can debug and trace where it enters into a loop, we can add some decimal reduction there.
Comment 4 Cristian Oneț 2010-07-29 09:24:56 UTC
(In reply to comment #3)
> I've tried the file with the reports "Investment Price Graph" and "Investment
> Worth Graph", with price precision 9 and 4 digits. In all cases it worked fine.
> It does take a couple of seconds longer than other reports, but that's it.
> 
> It might be hitting some MyMoneyMoney overflow issue, so perhaps if you can
> debug and trace where it enters into a loop, we can add some decimal reduction
> there.

Just to rule out a misunderstanding here: Did you configure the report so that in the 'Date' filter you select 'All dates'?
Comment 5 Alvaro Soliverez 2010-07-29 12:03:27 UTC
Showing all dates took 5 minutes and 1GB to display the graph, but it did. :D

Now, perhaps we should agree on what "Show all dates" means, and add a constraint such as the first opening date among the selected account, or similar, but that's more a usability issue, and definitively not a crash.
Comment 6 Cristian Oneț 2010-07-29 12:10:57 UTC
(In reply to comment #5)
> Showing all dates took 5 minutes and 1GB to display the graph, but it did. :D
> 
> Now, perhaps we should agree on what "Show all dates" means, and add a
> constraint such as the first opening date among the selected account, or
> similar, but that's more a usability issue, and definitively not a crash.

OK then, I've set the bug category to 'crash' because I thought it's an infinite loop because I didn't wait for it to end (5 minutes is a lot).

I've guessed that 'All dates' means 'All dates on which data is available'. The account is opened for about 4 years so I didn't think it should require that much since a year works almost instantly.
Comment 7 Alvaro Soliverez 2010-07-29 12:50:01 UTC
It shows data ever since there is data for the file, which I think includes currencies.
Anyway, any change in there has to be left for after release unless it's critical.
Comment 8 Cristian Oneț 2010-07-29 13:05:57 UTC
(In reply to comment #7)
> It shows data ever since there is data for the file, which I think includes
> currencies.
> Anyway, any change in there has to be left for after release unless it's
> critical.

If it takes 5 minutes I wouldn't close this as working. This behavior can easily be seen as the application hanging.
Comment 9 Alvaro Soliverez 2010-07-29 13:17:24 UTC
It doesnt crash and it only happens when requesting all dates. I don't say I won't work on this, but certainly not now.
Any change to improve performance will likely cause problems. Also, reports will go through a revamp after release that will make any report moot.