Description of problem: When opening a new account tab (either manually or automatically during startup) gnucash crashes with the backtrace below. Reverting from glib2-2.19.2-2.fc11.i386 to glib2-2.18.3-2.fc10.i386 fixes this. Don't know if this is a glib2 bug or if it can be fixed by simply recompiling gnucash against the new glib2. Version-Release number of selected component (if applicable): gnucash-2.2.7-1.fc10.i386 How reproducible: Always Steps to Reproduce: 1. Update to new glib2 2. start gnucash 3. open account tab Actual results: backtrace below Expected results: Additional info: Program received signal SIGSEGV, Segmentation fault. set_dimensions_pass_one () at gnucash-style.c:177 177 cd->can_span_over = FALSE; Missing separate debuginfos, use: debuginfo-install gamin-0.1.10-1.fc11.i386 gvfs-1.1.1-2.fc11.i386 (gdb) bt #0 set_dimensions_pass_one () at gnucash-style.c:177 #1 styles_recompute_layout_dimensions () at gnucash-style.c:493 #2 gnucash_sheet_styles_set_dimensions (sheet=0xab64058, default_width=680) at gnucash-style.c:506 #3 0xb7e6b3e0 in gnucash_sheet_compile_styles (sheet=0xab64058) at gnucash-style.c:668 #4 0xb7e6bccf in gnc_table_init_gui (widget=0xa02f438, data=0xa047438) at table-gnome.c:189 #5 0xb7ee7c50 in gsr_create_table () at gnc-split-reg.c:387 #6 gnc_split_reg_init2 () at gnc-split-reg.c:353 #7 gnc_split_reg_new (ld=0xa732c98, parent=0x9e0c800, numberOfLines=10, read_only=0) at gnc-split-reg.c:325 #8 0xb7ee2f97 in gnc_plugin_page_register_create_widget (plugin_page=0xa86ecd0) at gnc-plugin-page-register.c:727 #9 0xb7db5b6a in gnc_plugin_page_create_widget (plugin_page=0xa86ecd0) at gnc-plugin-page.c:151 #10 0xb7da9fae in gnc_main_window_open_page (window=0x9e0c800, page=0xa86ecd0) at gnc-main-window.c:2211 #11 0xb7ee2371 in gnc_plugin_page_register_recreate_page (window=0x9e0c800, key_file=0x9ef1568, group_name=0xa5347e8 "Page 3") at gnc-plugin-page-register.c:1028 #12 0xb7db444a in gnc_plugin_page_recreate_page (window=0x9e0c800, page_type=0xa12d380 "GncPluginPageRegister", key_file=0x9ef1568, page_group=0xa5347e8 "Page 3") at gnc-plugin-page.c:260 #13 0xb7daffd4 in gnc_main_window_restore_page () at gnc-main-window.c:501 #14 gnc_main_window_restore_window () at gnc-main-window.c:692 #15 gnc_main_window_restore_all_windows (keyfile=0x9ef1568) at gnc-main-window.c:764 #16 0xb7eebcdb in gnc_restore_all_state (session=0xa031260, unused=0x0) at top-level.c:273 #17 0xb7f55546 in call_c_hook (hook=0xa01e420, data=0xa031260) at gnc-hooks.c:262 #18 0xb7865440 in g_hook_list_marshal () from /lib/libglib-2.0.so.0 #19 0xb7f569de in gnc_hook_run (name=0xb7dee711 "hook_book_opened", data=0xa031260) at gnc-hooks.c:277 #20 0xb7d9d14f in gnc_book_opened () at gnc-file.c:499 #21 gnc_post_file_open (filename=<value optimized out>) at gnc-file.c:834 #22 0x0804aa58 in inner_main (closure=0x0, argc=1, argv=0xbf9f2a44) at gnucash-bin.c:475 #23 0xb79c8046 in ?? () from /usr/lib/libguile.so.17 #24 0xb7997f22 in ?? () from /usr/lib/libguile.so.17 #25 0xb7a11885 in scm_c_catch () from /usr/lib/libguile.so.17 #26 0xb7998522 in scm_i_with_continuation_barrier () from /usr/lib/libguile.so.17 #27 0xb7998603 in scm_c_with_continuation_barrier () from /usr/lib/libguile.so.17 #28 0xb7a10399 in scm_i_with_guile_and_parent () from /usr/lib/libguile.so.17 #29 0xb7a1048e in scm_with_guile () from /usr/lib/libguile.so.17 #30 0xb79c7fdf in scm_boot_guile () from /usr/lib/libguile.so.17 #31 0x0804a739 in main (argc=1, argv=0xbf9f2a44) at gnucash-bin.c:622 (gdb) list 160,180 160 for (row = 0; row < cursor->num_rows; row++) 161 { 162 for (col = 0; col < cursor->num_cols; col++) 163 { 164 int width; 165 char *text; 166 BasicCell *cell; 167 168 cd = g_table_index (dimensions->cell_dimensions, 169 row, col); 170 171 cell = gnc_cellblock_get_cell (cursor, row, col); 172 if (!cell) 173 continue; 174 175 text = cell->sample_text; 176 if (text) 177 cd->can_span_over = FALSE; 178 179 if (text) 180 {
It's tripping on the hash table changes - patching that back into 2.18.3 causes the crash to appear there. Are there any assumptions apps may have made about the hash table that are no longer valid with the new implementation?
This is actually a gnucash bug, not a glib2 bug. I've submitted a patch to the gnucash folks, but they often take a long time to release new versions, so Fedora probably needs to patch gnucash. See the new gnome bug linked above -- it has my patch in it.
Patch added in -2.
I introduced a double-free in my patch. This section of my patch needs to be removed: --- src/register/register-gnome/gnucash-sheet.c~ 2008-01-07 20:05:28.000000000 -0500 +++ src/register/register-gnome/gnucash-sheet.c 2008-12-04 16:01:47.000000000 -0500 @@ -2367,7 +2367,8 @@ sheet->width = 0; sheet->height = 0; - sheet->cursor_styles = g_hash_table_new (g_str_hash, g_str_equal); + sheet->cursor_styles = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, NULL); sheet->blocks = g_table_new (sizeof (SheetBlock), gnucash_sheet_block_construct, It's not necessary because the hash table keys are freed up in gnucash_sheet_cleer_styles. See GNOME bug number 564928. Sorry!
Upstream changeset added in 2.2.8-2.