[grisbi-bugs] [Grisbi 0002076]: Segfault au démarrage

Grisbi Bug Tracker bugtracker at grisbi.org
Ven 11 Déc 18:11:44 CET 2020


The following issue has been RESOLVED. 
====================================================================== 
https://www.grisbi.org/bugsreports/view.php?id=2076 
====================================================================== 
Reported By:                casta
Assigned To:                pbiava
====================================================================== 
Project:                    Grisbi
Issue ID:                   2076
Category:                   Main
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     resolved
OS:                         Gentoo 
Unstable Impact:            Yes 
Version OS:                  
Version GTK:                3.24.24 
Resolution:                 fixed
Fixed in Version:           1.9.x
====================================================================== 
Date Submitted:             2020-12-07 09:18 CET
Last Modified:              2020-12-11 18:11 CET
====================================================================== 
Summary:                    Segfault au démarrage
Description: 
Thread 1 "grisbi" received signal SIGSEGV, Segmentation fault.
0x00007ffff6b1c767 in ?? () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff6b1c767 in ?? () from /lib64/libc.so.6
https://www.grisbi.org/bugsreports/view.php?id=1  0x00007ffff6bf3424 in g_strdup
() from /usr/lib64/libglib-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=2  0x000055555568a79e in
gsb_data_budget_get_name_list (set_debit=1, set_credit=1) at
gsb_data_budget.c:958
https://www.grisbi.org/bugsreports/view.php?id=3  0x00005555555c98da in
gsb_form_widget_create (element_number=9, account_number=6) at
gsb_form_widget.c:375
https://www.grisbi.org/bugsreports/view.php?id=4  0x00005555555bfef7 in
gsb_form_initialise_transaction_form () at gsb_form.c:422
https://www.grisbi.org/bugsreports/view.php?id=5  0x00005555555c18b0 in
gsb_form_create_widgets () at gsb_form.c:1207
https://www.grisbi.org/bugsreports/view.php?id=6  0x000055555557ced0 in
grisbi_win_form_new (win=0x5555558cffd0) at grisbi_win.c:433
https://www.grisbi.org/bugsreports/view.php?id=7  0x000055555557d540 in
grisbi_win_create_general_notebook (win=0x5555558cffd0) at grisbi_win.c:574
https://www.grisbi.org/bugsreports/view.php?id=8  0x000055555557d8ca in
grisbi_win_create_general_widgets (win=0x5555558cffd0) at grisbi_win.c:659
https://www.grisbi.org/bugsreports/view.php?id=9  0x000055555558040a in
grisbi_win_new_file_gui () at grisbi_win.c:1985
https://www.grisbi.org/bugsreports/view.php?id=10 0x00005555555aa3ea in
gsb_file_open_file (filename=0x555555938e00 "/home/casta/compta/compta.gsb") at
gsb_file.c:979
https://www.grisbi.org/bugsreports/view.php?id=11 0x000055555557b055 in
grisbi_app_load_file_if_necessary (app=0x55555580a140) at grisbi_app.c:1016
https://www.grisbi.org/bugsreports/view.php?id=12 0x000055555557b492 in
grisbi_app_activate (application=0x55555580a140) at grisbi_app.c:1184
https://www.grisbi.org/bugsreports/view.php?id=13 0x00007ffff6cc4206 in ?? ()
from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=14 0x00007ffff6cdc108 in
g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=15 0x00007ffff6cdc2f7 in
g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=16 0x000055555557ada2 in
grisbi_app_cmdline (application=0x55555580a140, cmdline=0x5555559fe3a0) at
grisbi_app.c:916
https://www.grisbi.org/bugsreports/view.php?id=17 0x00007ffff6d85486 in ?? ()
from /usr/lib64/libgio-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=18 0x00007ffff6cc4206 in ?? ()
from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=19 0x00007ffff6cdb45b in
g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=20 0x00007ffff6cdc2f7 in
g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=21 0x00007ffff6ddc473 in ?? ()
from /usr/lib64/libgio-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=22 0x00007ffff6dde6d9 in ?? ()
from /usr/lib64/libgio-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=23 0x00007ffff6dde85e in
g_application_run () from /usr/lib64/libgio-2.0.so.0
https://www.grisbi.org/bugsreports/view.php?id=24 0x00005555555796a2 in main
(argc=1, argv=0x7fffffffd608) at main.c:104
(gdb) up
https://www.grisbi.org/bugsreports/view.php?id=1  0x00007ffff6bf3424 in g_strdup
() from /usr/lib64/libglib-2.0.so.0
(gdb) up
https://www.grisbi.org/bugsreports/view.php?id=2  0x000055555568a79e in
gsb_data_budget_get_name_list (set_debit=1, set_credit=1) at
gsb_data_budget.c:958
958                                     credit_list = g_slist_append
(credit_list, g_strdup (budget->budget_name));
(gdb) p budget
$1 = (BudgetStruct *) 0x5555560d6a80
(gdb) p budget->budget_name
$2 = (gchar *) 0x7472 <error: Cannot access memory at address 0x7472>

Steps to Reproduce: 
Juste démarer grisbi, crash au démarrage

Additional Information: 
On dirait un problème d’initialisation de la structure budget :

(gdb) p budget->budget_name
$2 = (gchar *) 0x7472 <error: Cannot access memory at address 0x7472>
====================================================================== 

---------------------------------------------------------------------- 
 (0005768) casta (reporter) - 2020-12-07 09:19
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5768 
---------------------------------------------------------------------- 
Bug nouveau sur la 1.9.97-1, il n’y avait pas ce problème sur la 1.9.97 

---------------------------------------------------------------------- 
 (0005771) pbiava (administrator) - 2020-12-07 16:53
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5771 
---------------------------------------------------------------------- 
C'est très gênant ça. chez moi j'ai fait des tests mais je n'ai pas ce crash.
J'utilise Ubuntu.

Je regarde ça de plus près. 

---------------------------------------------------------------------- 
 (0005772) guilc (reporter) - 2020-12-07 17:03
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5772 
---------------------------------------------------------------------- 
J’ai fait un bisect, c’est ce commit qui fait planter :
https://github.com/grisbi/grisbi/commit/97f50def7807d4a5db26d7573360fbd77c437ff0

Vu qu’il s’agit de surcharge de variable globales, ça ne pourrait pas avoir
un comportement différent en fonction des versions de GCC ? J’utilise
gcc-10.2. 

---------------------------------------------------------------------- 
 (0005773) guilc (reporter) - 2020-12-07 17:09
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5773 
---------------------------------------------------------------------- 
Et j’ai le même segfault en buildant grisbi avec clang-11 

---------------------------------------------------------------------- 
 (0005774) pbiava (administrator) - 2020-12-07 17:24
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5774 
---------------------------------------------------------------------- 
Tu utilises les données budgétaires ou pas ? 

---------------------------------------------------------------------- 
 (0005775) guilc (reporter) - 2020-12-07 17:34
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5775 
---------------------------------------------------------------------- 
les données budgétaires ?
Si ce sont les imputations budgétaires, oui.
Si c’est le module budgétaire pour les prévisions, non.

Bonne nouvelle, ça plante avec le fichier de compte obfusqué ! 

---------------------------------------------------------------------- 
 (0005776) pbiava (administrator) - 2020-12-07 17:57
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5776 
---------------------------------------------------------------------- 
Chez moi aussi. Je regarde ça. 

---------------------------------------------------------------------- 
 (0005777) pbiava (administrator) - 2020-12-07 18:13
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5777 
---------------------------------------------------------------------- 
J'ai trouvé. C'est une erreur de ma part lors d'une modification d'une
fonction. Comme je n'utilise pas les IB je n'en suis pas aperçu.

Essaie de recompiler avec ce nouveau fichier. 

---------------------------------------------------------------------- 
 (0005778) guilc (reporter) - 2020-12-07 19:11
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5778 
---------------------------------------------------------------------- 
Confirmé, ça marche.
Merci ! 

---------------------------------------------------------------------- 
 (0005779) Allet (reporter) - 2020-12-08 10:35
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5779 
---------------------------------------------------------------------- 
Sur Debian testing (Bullseye) la compilation avec le nouveau "gsb_data_budget.c
"  a réglé le problème.
Merci. 

---------------------------------------------------------------------- 
 (0005787) pbiava (administrator) - 2020-12-11 18:11
 https://www.grisbi.org/bugsreports/view.php?id=2076#c5787 
---------------------------------------------------------------------- 
fixed with grisbi-1.9.97-2 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2020-12-07 09:18 casta          New Issue                                    
2020-12-07 09:19 casta          Note Added: 0005768                          
2020-12-07 16:53 pbiava         Note Added: 0005771                          
2020-12-07 17:03 guilc          Note Added: 0005772                          
2020-12-07 17:09 guilc          Note Added: 0005773                          
2020-12-07 17:24 pbiava         Note Added: 0005774                          
2020-12-07 17:34 guilc          File Added: compta-obfuscated.gsb               
    
2020-12-07 17:34 guilc          Note Added: 0005775                          
2020-12-07 17:57 pbiava         Note Added: 0005776                          
2020-12-07 18:13 pbiava         File Added: gsb_data_budget.c                   

2020-12-07 18:13 pbiava         Note Added: 0005777                          
2020-12-07 19:11 guilc          Note Added: 0005778                          
2020-12-08 10:35 Allet          Note Added: 0005779                          
2020-12-11 18:11 pbiava         Assigned To               => pbiava          
2020-12-11 18:11 pbiava         Status                   new => resolved     
2020-12-11 18:11 pbiava         Resolution               open => fixed       
2020-12-11 18:11 pbiava         Fixed in Version          => 1.9.x           
2020-12-11 18:11 pbiava         Note Added: 0005787                          
======================================================================



Plus d'informations sur la liste de diffusion bugsreports