Budget csv exports incorrect, so import crashes

Bug #704111 reported by Marcel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Medium
Maxime DOYEN

Bug Description

Hello,

I've tested this with the current (4.3) version of homebank compiled under ubuntu (10.04/64bit).

I tried to import a budget from a csv previously exported by homebank. This failed with:

(homebank:18204): GLib-CRITICAL **: g_ascii_strtod: assertion `nptr != NULL' failed
Segmentation fault

To reproduce:
-Create a budget for a subcategory, export to and import from csv.
-Create a monthly budget with values of 0.00 for some month, export to and import from csv.

Searching for the error, I think I found 2 bugs in the Export-to-CSV routines (def_budget.c):

(1) In function "defbudget_save_csv", line 409, the "*" for the budget type (fixed or different each month) does not get written for subcategories. This leads to "2; ;AllTheSame;10" instead of "2;*;AllTheSame;10" in the csv file.

(2) In function "defbudget_getcsvbudgetstr", line 131, the if-statement prevents a budget of 0.00 for a certain month to be added to the csv-string. This leads to "2; ;DifferentEachMonth;5;5;5" instead of "2; ;DifferentEachMonth;5;5;5;0;0;0;0;0;0;0;0;0" in the csv-file.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

There is also some missing \n
I am checking all of this.

Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Medium
milestone: none → 4.4
status: New → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Fixed for final v4.4 release

Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Triaged
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.