GNOME Bugzilla – Bug 658223
Segfault when adding a comma to the expression from another sheet
Last modified: 2011-09-06 14:44:38 UTC
Tested using both 1.10.15 and 1.10.16 Steps to reproduce: 1) Insert a chart in sheet 1. (I used pie) 2) Go to the data series, press the select button and go to sheet 2. 3) Press one cell (it should appear in the expression line) 4) Enter a comma after the last cell in the expression line Result: A delay and then segfault. Basically, it's impossible to select non-sequential ranges of cells from other sheets using the GUI. The workaround is to type the expression manually.
I am unable to reproduce.
I can reproduce (and so can Jean). It is essential to go to a second sheet.
I can reproduce, but not always. Seems something loops indefinitely. Running in gdb with G_DEBUG="fatal_criticals" gives: GLib-GObject-CRITICAL **: g_closure_ref: assertion `closure->ref_count < CLOSURE_MAX_REF_COUNT' failed aborting... Program received signal SIGABRT, Aborted. 0x00007ffff3c87405 in raise () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt
+ Trace 228341
I first observe a long delay, then a large number of (/home/aguelzow/gnumeric/bin/gnumeric:9511): GLib-GObject-CRITICAL **: g_closure_ref: assertion `closure->ref_count < CLOSURE_MAX_REF_COUNT' failed and finally a crash:
+ Trace 228347
My backtrace on the first log message is:
+ Trace 228348
The signal in play in the bts of comments #3 and #5 must be the "update" signal of the gnumeric-expr-entry (due to the bt in comment #5). The only callback attached to that signal seems to be cb_graph_dim_editor_update.
This trace is interesting: (created at a random break point)
+ Trace 228349
and then I got bored...
We have (in gnumeric-expr-entry.c): /* Reset the entry in case something changed */ str = gnm_expr_top_as_string (texpr, pp, gee_convs (gee)); g_printerr ("gnm_expr_entry_parse: '%s' vs '%s'\n", str, text); if (strcmp (str, text)) { SheetControlGUI *scg = wbcg_cur_scg (gee->wbcg); Rangesel const *rs = &gee->rangesel; if (gee == wbcg_get_entry_logical (gee->wbcg) && start_sel && sc_sheet (SHEET_CONTROL (scg)) == rs->ref.a.sheet) { scg_rangesel_bound (scg, rs->ref.a.col, rs->ref.a.row, rs->ref.b.col, rs->ref.b.row); } else { if (gee_debug) g_printerr ("Setting entry text: [%s]\n", str); gtk_entry_set_text (gee->entry, str); } } g_free (str); We have str = '(Sheet2!$B$5,Sheet2!$C$8)' vs text = 'Sheet2!$B$5,Sheet2!$C$8' and end up calling scg_rangesel_bound. This calls gnm_expr_entry_freeze/gnm_expr_entry_thaw, the latter causing an UPDATE signal to be triggered (for continuous update expression entries). And the cycle repeats.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.