[grisbi-bugs] [Grisbi-old 0000032]: Crashen when opening file

bugtracker at grisbi.org bugtracker at grisbi.org
Sat Jun 13 21:59:58 CEST 2009


The following issue has been CLOSED 
====================================================================== 
http://grisbi.tuxfamily.org/mantis/view.php?id=32 
====================================================================== 
Reported By:                vkursancew
Assigned To:                benj
====================================================================== 
Project:                    Grisbi-old
Issue ID:                   32
Category:                   Main
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Resolution:                 fixed
Fixed in Version:           CVS (développement)
====================================================================== 
Date Submitted:             06-15-2005 04:22 UTC
Last Modified:              06-13-2009 19:59 UTC
====================================================================== 
Summary:                    Crashen when opening file
Description: 
The program crashes when i try to open a specific file.
====================================================================== 

---------------------------------------------------------------------- 
 vkursancew - 06-15-05 21:34  
---------------------------------------------------------------------- 
I have fixed the issue, the problem is that if the ISO code is empty the
function gchar * devise_name ( ... ) on file src/devises.c returns NULL
instead of an empty string. The patch is listed below and attached to the
issue, it also ads Brazilian Real to the currencies. The patch may be
applied with patch devises.c < devises.c.patch. Thanks for you great
software.

--- devises.c	2005-06-15 16:33:27.000000000 -0300
+++ devises-mine.c	2005-06-15 16:36:20.000000000 -0300
@@ -194,10 +194,11 @@
     { N_("Pacific Ocean"), N_("Solomon Islands Dollar"), N_("Solomon
Islands"), "SBD", NULL, TRUE },
     { N_("Pacific Ocean"), N_("Timor Escudo"), N_("Timor"), "TPE", NULL,
TRUE },
     { N_("Pacific Ocean"), N_("Tongan Pa'anga"), N_("Tonga"), "TOP",
NULL, TRUE },
     { N_("Pacific Ocean"), N_("United States Dollar"), N_("Panama"),
"USD", "$", TRUE },
     { N_("Pacific Ocean"), N_("Vanuatu Vatu"), N_("Vanuatu"), "VUV",
NULL, TRUE },
+    { N_("Southern America"), N_("Brazilian Real"), N_("Brazil"), "BRL",
"R$", TRUE },
     { N_("Southern America"), N_("Chilean Peso"), N_("Chile"), "CLP",
NULL, TRUE },
     { N_("Southern America"), N_("Colombian Peso"), N_("Colombia"),
"COP", NULL, TRUE },
     { N_("Southern America"), N_("Ecuador Sucre"), N_("Ecuador"), "ECS",
NULL, FALSE },
     { N_("Southern America"), N_("Guyana Dollar"), N_("Guyana"), "GYD",
NULL, TRUE },
     { N_("Southern America"), N_("Paraguay Guarani"), N_("Paraguay"),
"PYG", NULL, TRUE },
@@ -443,13 +444,13 @@
 	devise = liste_tmp -> data;
 
 	if ( devise_cachee != devise -> no_devise )
 	{
 	    if ( devise_cachee == -1 )
-		menu_item = gtk_menu_item_new_with_label ( devise_name ( devise ) );
+		menu_item = gtk_menu_item_new_with_label (devise_name ( devise ) );
 	    else
-		menu_item = gtk_menu_item_new_with_label ( g_strconcat ( devise ->
nom_devise,
+		menu_item = gtk_menu_item_new_with_label (g_strconcat ( devise ->
nom_devise,
 									 " ( ",
 									 devise_name ( devise ),
 									 " )",
 									 NULL ));
 
@@ -2243,12 +2244,13 @@
  */
 gchar * devise_name ( struct struct_devise * devise )
 {
     if (devise -> code_devise && (strlen(devise -> code_devise) > 0))
 	return devise -> code_devise;
-
-    return devise -> code_iso4217_devise;
+    if(devise -> code_iso4217_devise)
+	return devise -> code_iso4217_devise;
+    return "";
 }
 
 
 /* renvoie le nom de la devise correspondante au no */
 /* ou null si pas trouvée */

 

---------------------------------------------------------------------- 
 benj - 06-21-05 11:03  
---------------------------------------------------------------------- 
Many thanks for your bug report and patch.  First, sorry for not having
included the Brazilian Real, this is a mistake that is now fixed in CVS.

Regarding the bug you mentioned, I've commited your patch with a minor
change, it will be fixed in next version.

Thank you for your contribution !
Benjamin 

---------------------------------------------------------------------- 
 benj - 06-21-05 11:33  
---------------------------------------------------------------------- 
Another thing : I noticed that in your Grisbi account file, there are some
problems with categories as subcategories are separated from their parent
categories with a semicolon.  It is because Brazilian translation has
changed the Grisbi internal separator to the semicolon.  This is fixed in
CVS, but I would advise you that you edit your Grisbi file with a text
editor and change all occurences of " ; " to " : " in categories names.  So
they will be displayed as a tree as intented.

Cheers,
Benjamin 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-15-05 04:22  vkursancew     New Issue                                    
06-15-05 04:22  vkursancew     File Added: cap.torre.606.gsb                    
06-15-05 04:22  vkursancew     OS                        => Debian          
06-15-05 04:22  vkursancew     Version OS                => Sarge           
06-15-05 04:22  vkursancew     Version GTK               => 2.8             
06-15-05 21:33  vkursancew     Note Added: 0000063                          
06-15-05 21:33  vkursancew     File Added: devises.c.patch                    
06-15-05 21:34  vkursancew     Note Edited: 0000063                         
06-21-05 11:03  benj           Note Added: 0000064                          
06-21-05 11:03  benj           Assigned To               => benj            
06-21-05 11:03  benj           Status                   new => resolved     
06-21-05 11:03  benj           Resolution               open => fixed       
06-21-05 11:03  benj           Fixed in Version          => CVS (développement)
06-21-05 11:33  benj           Note Added: 0000065                          
06-09-09 20:19  MyKeul         Project                  Grisbi => Grisbi-old
06-13-09 19:59  MyKeul         Status                   resolved => closed  
======================================================================



More information about the bugsreports mailing list