Bug 390658 - Crash > Tools > Currencies
Summary: Crash > Tools > Currencies
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-18 03:34 UTC by Michael Carpino
Modified: 2018-03-03 14:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.1


Attachments
attachment-17479-0.html (1.01 KB, text/html)
2018-02-18 15:07 UTC, Michael Carpino
Details
screen shot of where I click ok then crash (103.43 KB, image/png)
2018-02-19 20:19 UTC, Michael Carpino
Details
rerun gdb (6.84 KB, text/plain)
2018-02-19 20:36 UTC, Michael Carpino
Details
Screenshot_20180220_110640.png (1.07 MB, image/png)
2018-02-20 18:11 UTC, Michael Carpino
Details
attachment-25851-0.html (2.48 KB, text/html)
2018-02-20 19:10 UTC, Michael Carpino
Details
attachment-26507-0.html (3.20 KB, text/html)
2018-02-20 19:22 UTC, Michael Carpino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Carpino 2018-02-18 03:34:41 UTC
The app is crashing when I go to Tools > Currencies then I edit USD and change nothing then click "OK" the system crashes.
Comment 1 Thomas Baumgart 2018-02-18 14:30:09 UTC
It does not crash for me here. Can you provide a backtrace?
Comment 2 Michael Carpino 2018-02-18 15:07:48 UTC
Created attachment 110784 [details]
attachment-17479-0.html

I'd be happy to provide it.  I just need some instructions on how to do the
trace.

On Sun, Feb 18, 2018 at 7:30 AM, Thomas Baumgart <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=390658
>
> --- Comment #1 from Thomas Baumgart <tbaumgart@kde.org> ---
> It does not crash for me here. Can you provide a backtrace?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 NSLW 2018-02-19 19:02:20 UTC
I cannot reproduce your crash too.

Could you attach screenshots of currencies window and its edit window for USD?

If you experience crash, then drkonqi should fire up with backtrace or instruction how to get it. It should look like this
https://farm4.staticflickr.com/3557/3410899444_75970652eb.jpg
Comment 4 Michael Carpino 2018-02-19 20:19:53 UTC
Created attachment 110825 [details]
screen shot of where I click ok then crash
Comment 5 Michael Carpino 2018-02-19 20:36:05 UTC
Created attachment 110826 [details]
rerun gdb
Comment 6 Michael Carpino 2018-02-19 20:37:40 UTC
I reran gdb with added results. installed drkongi and Konqueror that created no results or execution.
Comment 7 Michael Carpino 2018-02-19 21:57:46 UTC
something is telling me this is maybe related to the price precision.  Previously in older versions there was a global setting where you could change this figure.  Mine was/is set to 4 and I can't change it.  Now that setting is gone and the smallest cash & money unit is 2 digits.  Anytime I save it I think it's conflicting and maybe be causing the crash.  Just a thought.
Comment 8 NSLW 2018-02-20 17:24:56 UTC
(In reply to Michael Carpino from comment #7)
> something is telling me this is maybe related to the price precision. 
> Previously in older versions there was a global setting where you could
> change this figure.  Mine was/is set to 4 and I can't change it.  Now that
> setting is gone and the smallest cash & money unit is 2 digits.  Anytime I
> save it I think it's conflicting and maybe be causing the crash.  Just a
> thought.

Price precision has been enhanced by per security/currency setting.
Do you mean that you can't change it from 4 to 2 now?

There are two things I would like you to do:

1) open your kmy file in e.g. kwrite and change

rounding-method="0"

to

rounding-method="7"

Make a backup before.
It's a wild guess, so it may bring you nothing.

2) check if you've got exact the same problem with fresh kmy file.
Comment 9 Michael Carpino 2018-02-20 18:11:52 UTC
Created attachment 110850 [details]
Screenshot_20180220_110640.png

Here's a screenshot of what I get when I open .kmy with kwrite.  That's
correct it can't be changed and crash is caused if I leave it the same or
try to change it and I press ok.

On Tue, Feb 20, 2018 at 10:24 AM, NSLW <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=390658
>
> --- Comment #8 from NSLW <lukasz.wojnilowicz@gmail.com> ---
> (In reply to Michael Carpino from comment #7)
> > something is telling me this is maybe related to the price precision.
> > Previously in older versions there was a global setting where you could
> > change this figure.  Mine was/is set to 4 and I can't change it.  Now
> that
> > setting is gone and the smallest cash & money unit is 2 digits.  Anytime
> I
> > save it I think it's conflicting and maybe be causing the crash.  Just a
> > thought.
>
> Price precision has been enhanced by per security/currency setting.
> Do you mean that you can't change it from 4 to 2 now?
>
> There are two things I would like you to do:
>
> 1) open your kmy file in e.g. kwrite and change
>
> rounding-method="0"
>
> to
>
> rounding-method="7"
>
> Make a backup before.
> It's a wild guess, so it may bring you nothing.
>
> 2) check if you've got exact the same problem with fresh kmy file.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 10 Thomas Baumgart 2018-02-20 18:55:59 UTC
This is a compressed file. Using it as is with any editor does not make sense. Please take a look at https://docs.kde.org/stable4/en/extragear-office/kmymoney/details.formats.html to determine how to make this readable (it's an XML file).

I doubt that rounding has anything todo with your crash.
Comment 11 Michael Carpino 2018-02-20 19:10:47 UTC
Created attachment 110856 [details]
attachment-25851-0.html

Thanks Thomas!


I changed the file to xml and then did some looking around.  What are your
thoughts on changing in this section below the pp="4" to a 2?

 </SECURITIES>
 <CURRENCIES count="1">
  <CURRENCY scf="100" symbol="$" pp="4" type="3" rounding-method="0"
name="US Dollar" id="USD" saf="100"/>
 </CURRENCIES>
 <PRICES count="63">

On Tue, Feb 20, 2018 at 11:55 AM, Thomas Baumgart <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=390658
>
> --- Comment #10 from Thomas Baumgart <tbaumgart@kde.org> ---
> This is a compressed file. Using it as is with any editor does not make
> sense.
> Please take a look at
> https://docs.kde.org/stable4/en/extragear-office/kmymoney/
> details.formats.html
> to determine how to make this readable (it's an XML file).
>
> I doubt that rounding has anything todo with your crash.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 12 Michael Carpino 2018-02-20 19:22:02 UTC
Created attachment 110858 [details]
attachment-26507-0.html

I did change it as I made a backup file.  Opened KMM and saw that it was
changed when I viewed the edit of USD and was set to a 2.  Clicked ok and
crash.

On Tue, Feb 20, 2018 at 12:10 PM, Michael Carpino <mfcarpino@gmail.com>
wrote:

> Thanks Thomas!
>
>
> I changed the file to xml and then did some looking around.  What are your
> thoughts on changing in this section below the pp="4" to a 2?
>
>  </SECURITIES>
>  <CURRENCIES count="1">
>   <CURRENCY scf="100" symbol="$" pp="4" type="3" rounding-method="0"
> name="US Dollar" id="USD" saf="100"/>
>  </CURRENCIES>
>  <PRICES count="63">
>
> On Tue, Feb 20, 2018 at 11:55 AM, Thomas Baumgart <
> bugzilla_noreply@kde.org> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=390658
>>
>> --- Comment #10 from Thomas Baumgart <tbaumgart@kde.org> ---
>> This is a compressed file. Using it as is with any editor does not make
>> sense.
>> Please take a look at
>> https://docs.kde.org/stable4/en/extragear-office/kmymoney/de
>> tails.formats.html
>> to determine how to make this readable (it's an XML file).
>>
>> I doubt that rounding has anything todo with your crash.
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>>
>
>
Comment 13 Thomas Baumgart 2018-03-03 13:57:49 UTC
Problem only shows if you edit the base currency. Fix is underway.
Comment 14 Thomas Baumgart 2018-03-03 14:01:56 UTC
Git commit 20e629fc6bbaa5aa0f0ac43144fb1e25b66dff68 by Thomas Baumgart.
Committed on 03/03/2018 at 14:01.
Pushed by tbaumgart into branch '5.0'.

Don't crash when editing the base currency

Using Tools/Currencies on the selected base currency and hitting Enter
caused a crash. This patch avoids the crash.
FIXED-IN: 5.0.1

M  +10   -2    kmymoney/models/equitiesmodel.cpp

https://commits.kde.org/kmymoney/20e629fc6bbaa5aa0f0ac43144fb1e25b66dff68