segmentation fault if you entered a category ending with :

Bug #1772281 reported by tordik
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Medium
Maxime DOYEN

Bug Description

Hi,

I have currently an "Segmentation fault (core dumped)" when I open some lines previously categorized, and the application stops (crash).
Actually it seems to be linked to events with a specific account and category ("vacances"), but difficult to be completely sure.

I get the issue either using reports, display details, open some a line from the specific category (that I know to cause the trouble).
I get the same result, going trough the details of the account, and open line previously managed.

I have the issue with Homebank 5.1.8 on GTK+ 3.22.30 (fedora)
I tested on my other computer Homebank 5.1.8 on GTK+ 3.22.26 (CENTOS): same result.
I don't have the issue on Windows (freshly downloaded) - at least on the line I tested and that I knew it crash on my linux systems.

Can you help to analyse the cause ?

Thank you
Antoine

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

from a terminal
gdb homebank
then go until it crash
then type 'bt'
post result here

Revision history for this message
tordik (toine-p) wrote :

Hi!

(gdb) run
Starting program: /usr/bin/homebank
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-8.fc28.x86_64
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
[New Thread 0x7fffde8c3700 (LWP 9357)]
[New Thread 0x7fffde0c2700 (LWP 9358)]
[New Thread 0x7fffd7fff700 (LWP 9359)]

Thread 1 "homebank" received signal SIGSEGV, Segmentation fault.
0x00007ffff4fb66b5 in __strcasecmp_l_avx () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install at-spi2-atk-2.26.2-1.fc28.x86_64 at-spi2-core-2.28.0-1.fc28.x86_64 atk-2.28.1-1.fc28.x86_64 bzip2-libs-1.0.6-26.fc28.x86_64 cairo-1.15.12-2.fc28.x86_64 cairo-gobject-1.15.12-2.fc28.x86_64 dbus-libs-1.12.8-1.fc28.x86_64 expat-2.2.5-3.fc28.x86_64 fontconfig-2.13.0-4.fc28.x86_64 freetype-2.8-10.fc28.x86_64 fribidi-1.0.2-1.fc28.x86_64 gdk-pixbuf2-2.36.12-1.fc28.x86_64 glib2-2.56.1-1.fc28.x86_64 graphite2-1.3.10-5.fc28.x86_64 gtk3-3.22.30-1.fc28.x86_64 gvfs-client-1.36.2-1.fc28.x86_64 harfbuzz-1.7.5-3.fc28.x86_64 keyutils-libs-1.5.10-6.fc28.x86_64 krb5-libs-1.16.1-2.fc28.x86_64 libX11-1.6.5-7.fc28.x86_64 libXau-1.0.8-11.fc28.x86_64 libXcomposite-0.4.4-12.fc28.x86_64 libXcursor-1.1.15-1.fc28.x86_64 libXdamage-1.1.4-12.fc28.x86_64 libXext-1.3.3-8.fc28.x86_64 libXfixes-5.0.3-5.fc28.x86_64 libXi-1.7.9-6.fc28.x86_64 libXinerama-1.1.3-10.fc28.x86_64 libXrandr-1.5.1-5.fc28.x86_64 libXrender-0.9.10-5.fc28.x86_64 libblkid-2.32-2.fc28.x86_64 libcap-2.25-9.fc28.x86_64 libcom_err-1.43.8-2.fc28.x86_64 libcroco-0.6.12-4.fc28.x86_64 libdatrie-0.2.9-7.fc28.x86_64 libepoxy-1.5.1-1.fc28.x86_64 libffi-3.1-16.fc28.x86_64 libgcc-8.1.1-1.fc28.x86_64 libgcrypt-1.8.2-2.fc28.x86_64 libgpg-error-1.29-1.fc28.x86_64 libmount-2.32-2.fc28.x86_64 libofx-0.9.10-6.fc28.x86_64 libpng-1.6.34-3.fc28.x86_64 librsvg2-2.42.3-1.fc28.x86_64 libselinux-2.7-13.fc28.x86_64 libsoup-2.62.2-1.fc28.x86_64 libstdc++-8.1.1-1.fc28.x86_64 libthai-0.1.27-2.fc28.x86_64 libuuid-2.32-2.fc28.x86_64 libwayland-client-1.15.0-1.fc28.x86_64 libwayland-cursor-1.15.0-1.fc28.x86_64 libwayland-egl-1.15.0-1.fc28.x86_64 libxcb-1.13-1.fc28.x86_64 libxkbcommon-0.8.0-2.fc28.x86_64 libxml2-2.9.7-4.fc28.x86_64 lz4-libs-1.8.1.2-4.fc28.x86_64 opensp-1.5.2-28.fc28.x86_64 openssl-libs-1.1.0h-3.fc28.x86_64 pango-1.42.1-2.fc28.x86_64 pcre-8.42-1.fc28.x86_64 pcre2-10.31-4.fc28.x86_64 pixman-0.34.0-8.fc28.x86_64 sqlite-libs-3.22.0-4.fc28.x86_64 systemd-libs-238-8.git0e0aa59.fc28.x86_64 xz-libs-5.2.4-2.fc28.x86_64 zlib-1.2.11-8.fc28.x86_64
(gdb) bt
#0 0x00007ffff4fb66b5 in __strcasecmp_l_avx () at /lib64/libc.so.6
(gdb)

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

it seems in the same area than 1771326, I am very interesting in finding this out, hope you can help.

2 solution here:
a) can you compile from source and going into a further debugging, following my last message into 1771326 ?

b) provide you file anonymized (or not) to homebank email address at the bottom of this page:
http://homebank.free.fr/en/support.php

let me know if you need help

Revision history for this message
tordik (toine-p) wrote :
Download full text (5.0 KiB)

Hi,
I compile the homebank with instruction in case 1771326 (and remove in parrallel homebank provided by fedora). I suffer then a lot of icons / menus missing in homebank (maybe some customizations / parameters of GTK stuff by Fedora )

Anyway, I finally arrived to reports with details, and reproduced the exact same issue:
Output:

(gdb) bt
#0 0x00007ffff4d9a6b5 in __strcasecmp_l_avx () at /lib64/libc.so.6
#1 0x000000000042bb33 in da_cat_fullname_grfunc (key=0xbf9580, item=0xbf94e0, ctx=0x7fffffffb9f0) at hb-category.c:349
#2 0x00007ffff56c8613 in g_hash_table_find () at /lib64/libglib-2.0.so.0
#3 0x000000000042bbf3 in da_cat_get_by_fullname (fullname=0x18ecea0 "Vacances:(null)") at hb-category.c:379
#4 0x0000000000470e68 in ui_cat_comboboxentry_get (entry_box=0xab7d50)
    at ui-category.c:150
#5 0x000000000048f047 in deftransaction_update_warnsign (widget=0xab7d50, user_data=0x0) at ui-transaction.c:103
#6 0x00007ffff59b3add in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#7 0x00007ffff59c6eb3 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#8 0x00007ffff59cffda in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#9 0x00007ffff59d0ab4 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
#10 0x00007ffff59b3add in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#11 0x00007ffff59c6eb3 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#12 0x00007ffff59cffda in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#13 0x00007ffff59d0ab4 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
#14 0x00007ffff7423d29 in end_change () at /lib64/libgtk-3.so.0
#15 0x00007ffff742ed6f in gtk_entry_set_text () at /lib64/libgtk-3.so.0
#16 0x0000000000470f57 in ui_cat_comboboxentry_set_active (entry_box=0xab7d50, key=179) at ui-category.c:175
#17 0x000000000048fa68 in deftransaction_set (widget=0x167d700, user_data=0x0)
    at ui-transaction.c:347
#18 0x00000000004909ff in deftransaction_set_transaction (widget=0x167d700, ope=0xf4a9f0) at ui-transaction.c:782
#19 0x00000000004907b9 in deftransaction_external_edit (parent=0xabad00, old_txn=0xde65e0, new_txn=0xf4a9f0) at ui-transaction.c:671
#20 0x000000000045688e in ui_reptime_detail_onRowActivated (treeview=0x13a93b0, path=0x11d0ab0, col=0x14b42a0, userdata=0x0) at rep_time.c:1177
#21 0x00007ffff59b3add in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#22 0x00007ffff59c6eb3 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#23 0x00007ffff59cffda in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#24 0x00007ffff59d05d3 in g_signal_emit () at /lib64/libgobject-2.0.so.0
#25 0x00007ffff75ee5b6 in gtk_tree_view_multipress_gesture_pressed ()
    at /lib64/libgtk-3.so.0
#26 0x00007ffff012603e in ffi_call_unix64 () at /lib64/libffi.so.6
---Type <return> to continue, or q <return> to quit---
#27 0x00007ffff01259ff in ffi_call () at /lib64/libffi.so.6
#28 0x00007ffff59b4aa6 in g_cclosure_marshal_generic_va () at /lib64/libgobject-2.0.so.0
#29 0x00007ffff59b3d36 in _g_closure_invoke_va () at /lib64/libgobject-2.0.so.0
#30 0x00007ffff59d0031 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#31 0x00007ffff59d05d3 in g_signal_emit () at /lib64...

Read more...

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

yes thanks.
what surprise me (and explain the crash) is that you have a category 'Vacances:(null)'
which should not happen (you normally can input : into the category)

can you open your xhb file file a text editor and have a look for any others like this,
just search for : , normally you don't have

Do you remember how you input that category ?

Revision history for this message
tordik (toine-p) wrote :

Hi,
Correct, and I don't know why it is NULL. However, all category "vacances" are crashing Homebank (from what I remember), I will reconfirm.

Also, but I tried a preliminary test erasing the last 6 month of history in the xhb file (and then erasing this "NULL" category), but the result was the same. I will reconfirm that also.

However, I don't get the characters I need to look for? ":" and "," ?
I do have ":" in "wording="VIR SEPA EMET : XXX"
few "?" in comments I wrote, "info= XX? "
I don't have ": ,"
I can not find Vacances:(null) (how to look for?)

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

ok.
bug reproduced, and know what happens and how you input that

Revision history for this message
tordik (toine-p) wrote :

But the strange point was that it did work on Windows, but crash on Fedora.

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

strcasecmp might be more compliant to NULL on Windows than on GNU/Linux

Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Medium
status: New → Confirmed
summary: - segmentation fault
+ segmentation fault if you entered a category ending with :
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

here's how to workaround this crash by editing a little your xhb file:

a) search for any <cat like this (there is no name="" attribute):
  <cat key="2" parent="1" flags="1" />
  (key and parent can have different value of course)

b) and change it by adding a name="" like this :
  <cat key="2" parent="1" flags="1" name="dummy" />

c) open your file, check, it should work.

then later on:
- you could remove/merge those dummy subcategories
- and of course never enter another category ending with a : until I prevent doing so and the associated crash as well.

Revision history for this message
tordik (toine-p) wrote :

Hi Great! It works. I do had a line with missing "name=xx", I corrected and no more crash.
I don't know how it happen to have this subcategory NULL (I am using the same file account since 2011... )
But Thank you!

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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