[grisbi-bugs] Segfault au démarrage

François Poulain fpoulain at metrodore.fr
Mar 12 Fév 11:15:37 CET 2019


Bonjour,

J'ai un ami qui utilise grisbi sous Debian Stable et qui m'a soumis un
problème intéressant.

Mon interprétation : il a du faire un import de la banque qui a fait
qu'il s'est mélangé les pinceaux entre les notes et les catégories. Ça
a mis pas mal de bordel dans les catégories, et ça a engendré des
enregistrement de type :

<Category Nb="36" Na="CB MACHIN" Kd="1" />         
<Sub_category Nbc="36" Nb="1" Na="(null)" />                            
<Sub_category Nbc="36" Nb="2" Na="(null)" />                            
<Sub_category Nbc="36" Nb="3" Na="(null)" />  

Grisbi plantait au démarrage. C'est le sens de ce rapport de bug. :)

Voici la stacktrace qui m'a aidé à comprendre, le problème se situant manifestement à la ligne
      if ( buffer_new_div_sous_div->name )                                        
          g_free ( buffer_new_div_sous_div->name );                               
à la fin de la fonction gsb_file_load_sub_category

Longue vie et prospérité. :)

François

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) bt full
#0  0x00007ffff42b6fff in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
        set = 
            {__val = {0, 8444003148692987936, 8660248813382890099, 7596496373740942904, 3419760881481315694, 8101253777184680300, 8030813573811368815, 3966035396788105518, 3847871991162234470, 7378697426660503600, 3472328322906796134, 3472310978869031456, 3467824696600375344, 3472901073083054648, 2314885530819702837, 2314885530818453536}}
        pid = <optimized out>
        tid = <optimized out>
#1  0x00007ffff42b842a in __GI_abort () at abort.c:89
        save_stage = 2
        act = 
          {__sigaction_handler = {sa_handler = 0x696c2f756e672d78, sa_sigaction = 0x696c2f756e672d78}, sa_mask = {__val = {3346019690390575202, 7365366917637549622, 3472613297376093798, 7378697628691542064, 2319406791637807153, 3544385822619675949, 4048771456345071923, 3474581233939329082, 2314885530818459699, 2314885530818453536, 3395749441387372576, 3414407380873671541, 7794943938178463864, 8461814194867891817, 3328495855281466415, 140737488344800}}, sa_flags = 140, sa_restorer = 0x7fffffffd6e0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff42f4c00 in __libc_message (do_abort=do_abort at entry=2, fmt=fmt at entry=0x7ffff43e9d98 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
        ap = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fffffffd6f0, reg_save_area = 0x7fffffffd680}}
        fd = 7
        on_2 = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
        written = <optimized out>
#3  0x00007ffff42fafc6 in malloc_printerr (action=3, str=0x7ffff43e9ef0 "double free or corruption (fasttop)", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5049
        buf = "0000555555a4a040"
        cp = <optimized out>
        ar_ptr = <optimized out>
        ptr = <optimized out>
        str = 0x7ffff43e9ef0 "double free or corruption (fasttop)"
        action = 3
#4  0x00007ffff42fb80e in _int_free (av=0x7ffff461db00 <main_arena>, p=0x555555a4a030, have_lock=0) at malloc.c:3905
        size = <optimized out>
        fb = <optimized out>
        nextchunk = <optimized out>
        nextsize = <optimized out>
        nextinuse = <optimized out>
        prevsize = <optimized out>
        bck = <optimized out>
        fwd = <optimized out>
        errstr = <optimized out>
        locked = <optimized out>
        __func__ = "_int_free"
#5  0x000055555559ff03 in gsb_file_load_sub_category (attribute_names=0x7fffffffd870, attribute_values=0x7fffffffd840) at gsb_file_load.c:2819
        i = 3
        div_number = 43
        __PRETTY_FUNCTION__ = "gsb_file_load_sub_category"
#6  0x000055555559964d in gsb_file_load_start_element (context=0x555555b59340, element_name=0x555555b56fc0 "Sub_category", attribute_names=0x7fffffffd870, attribute_values=0x7fffffffd840, user_data=0x0, error=0x7fffffffd8d0) at gsb_file_load.c:633
        unknown = 0
        __PRETTY_FUNCTION__ = "gsb_file_load_start_element"
#7  0x00007ffff4bdac73 in emit_start_element (context=context at entry=0x555555b59340, error=error at entry=0x0) at ././glib/gmarkup.c:1042
---Type <return> to continue, or q <return> to quit---
        i = <optimized out>
        j = <optimized out>
        attr_names = 0x7fffffffd870
        attr_values = 0x7fffffffd840
        tmp_error = 0x0
#8  0x00007ffff4bdbd5b in g_markup_parse_context_parse (context=0x555555b59340, text=<optimized out>, text_len=<optimized out>, error=0x0) at ././glib/gmarkup.c:1389
        __func__ = "g_markup_parse_context_parse"
#9  0x0000555555598f97 in gsb_file_load_open_file (filename=0x555555a2f210 "/tmp/Mes comptes-2019.gsb") at gsb_file_load.c:393
        markup_parser = 0x555555b56f10
        context = 0x555555b59340
        buffer_stat = 
            {st_dev = 2049, st_ino = 1046726, st_nlink = 1, st_mode = 33188, st_uid = 1000, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 56441, st_blksize = 4096, st_blocks = 112, st_atim = {tv_sec = 1549964218, tv_nsec = 529430488}, st_mtim = {tv_sec = 1549964200, tv_nsec = 453317591}, st_ctim = {tv_sec = 1549964200, tv_nsec = 461317642}, __glibc_reserved = {0, 0, 0}}
        return_value = 0
        file_content = 0x555555b62220 "<?xml version=\"1.0\"?>\n<Grisbi>\n\t<General\n\t\tFile_version=\"0.6.0\"\n\t\tGrisbi_version=\"1.0.1\"\n\t\tCrypt_file=\"0\"\n\t\tArchive_file=\"0\"\n\t\tFile_title=\"Mes comptes\"\n\t\tGeneral_address=\"(null)\"\n\t\tSecond_general_addr"...
        length = 56441
        __PRETTY_FUNCTION__ = "gsb_file_load_open_file"
#10 0x0000555555594dbf in gsb_file_open_file (filename=0x555555a2f210 "/tmp/Mes comptes-2019.gsb") at gsb_file.c:386
        list_tmp = 0x555555a34080
        __PRETTY_FUNCTION__ = "gsb_file_open_file"
#11 0x00005555555771a6 in gsb_grisbi_load_file_if_necessary (opt=0x7fffffffdb90) at main.c:696
        tmp_str = 0x555555a2f210 "/tmp/Mes comptes-2019.gsb"
#12 0x0000555555576b19 in main_linux (argc=2, argv=0x7fffffffdcc8) at main.c:211
        vbox = 0x555555a05870 [GtkVBox]
        first_use = 0
        opt = {demande_page = 0, page_w = 32767, report_no = -1, customization_tab_no = -1, subcustom_tab_no = -1, fichier = 0x555555a2f210 "/tmp/Mes comptes-2019.gsb"}
        status = 0
#13 0x00005555555769f0 in main (argc=2, argv=0x7fffffffdcc8) at main.c:145


-- 
François Poulain <fpoulain at metrodore.fr>



Plus d'informations sur la liste de diffusion bugsreports