After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 477417 - gnumeric crashed with SIGSEGV in gnm_filter_combo_apply()
gnumeric crashed with SIGSEGV in gnm_filter_combo_apply()
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: High critical
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-09-16 08:08 UTC by Jérôme Guelfucci
Modified: 2007-09-18 17:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jérôme Guelfucci 2007-09-16 08:08:30 UTC
Steps to reproduce:
This was reported on Launchpad : https://bugs.launchpad.net/ubuntu/+source/gnumeric/+bug/139702
by : https://bugs.edge.launchpad.net/~perchrh-malone

1. get http://launchpadlibrarian.net/9284671/auctiondata.gnumeric
2. open it
3. do either of the following:
  a) Press the save button

  OR

  b) Try to change the filter setting in the autofilter in sheet 1, setting e.g. skill header to value 10

I couldn't reproduce it, but it happens every time for the original reporter.

Stack trace:
  • #0 ??
    from /usr/lib/libspreadsheet-1.7.11.so
  • #1 gnm_filter_combo_apply
    from /usr/lib/libspreadsheet-1.7.11.so
  • #2 ??
    from /usr/lib/libspreadsheet-1.7.11.so
  • #3 gnm_cell_combo_foo_view_popdown
    from /usr/lib/libspreadsheet-1.7.11.so
  • #4 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.14.0/gobject/gclosure.c line 490
  • #5 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2440
  • #6 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2199
  • #7 IA__g_signal_emit
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2243
  • #8 gtk_button_button_press
    at /build/buildd/gtk+2.0-2.11.6/gtk/gtkbutton.c line 1362
  • #9 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.11.6/gtk/gtkmarshalers.c line 84
  • #10 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.14.0/gobject/gclosure.c line 490
  • #11 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2478
  • #12 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2209
  • #13 IA__g_signal_emit
    at /build/buildd/glib2.0-2.14.0/gobject/gsignal.c line 2243
  • #14 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.11.6/gtk/gtkwidget.c line 4674
  • #15 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.11.6/gtk/gtkmain.c line 2317
  • #16 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.11.6/gtk/gtkmain.c line 1537
  • #17 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.11.6/gdk/x11/gdkevents-x11.c line 2351
  • #18 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.14.0/glib/gmain.c line 2061
  • #19 g_main_context_iterate
    at /build/buildd/glib2.0-2.14.0/glib/gmain.c line 2694
  • #20 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.14.0/glib/gmain.c line 2898
  • #21 bonobo_main
    at bonobo-main.c line 311
  • #22 main

Other information:
THis might alos be useful for you :
http://launchpadlibrarian.net/9284679/ThreadStacktrace.txt
http://launchpadlibrarian.net/9284680/StacktraceSource.txt
Comment 1 Morten Welinder 2007-09-16 12:42:50 UTC
No crash for me on i86.

Stack trace seems to be from 64-bit.  That shouldn't matter, but I'll test
later.
Comment 2 Morten Welinder 2007-09-16 12:52:55 UTC
We could use a few preconditions in gnm_filter_combo_apply, though.
Comment 3 Jean Bréfort 2007-09-16 13:16:10 UTC
No crash for me on amd64 either
Comment 4 Andreas J. Guelzow 2007-09-17 00:24:28 UTC
Can you replicate this without optimization?
Comment 5 Morten Welinder 2007-09-17 13:39:03 UTC
Also, does this happen with default theme?  Certain themes, like "Industrial",
are known to corrupt memory.
Comment 6 Jérôme Guelfucci 2007-09-17 16:48:07 UTC
What do you mean by without optimization ?
Comment 7 Morten Welinder 2007-09-17 17:22:28 UTC
He means that the gnumeric binary was compiled with optimization on ("-O2"
probably) and that debug information was stripped off.  Both make it hard
to make sense of the back trace.

From the disassembly I am guessing that the crash is happening near the
end of filter_expr_init.
Comment 8 Jérôme Guelfucci 2007-09-18 16:25:05 UTC
Ok thank you. 

I have some news, an interesting one : the file the original reporter gave was not the crashing file, that's why no one could reproduce it !

The right file : http://launchpadlibrarian.net/9322198/transfer-data.gnumeric

I can reproduce the crash this time, no matter what the gtk theme is. It can't be a gutsy regression has it also happens with gnumeric 1.7.8-0ubuntu1 in feisty.

I'm going to build the package without optimization to see if the stacktrace has more details.
Comment 9 Morten Welinder 2007-09-18 16:50:47 UTC
Confirmed.
Comment 10 Morten Welinder 2007-09-18 17:04:08 UTC
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.
Comment 11 Jérôme Guelfucci 2007-09-18 17:05:52 UTC
Morten Welinder : When will the next version be released ? For Gnome 2.20?
Comment 12 Morten Welinder 2007-09-18 17:27:39 UTC
I don't know, but I wouldn't count on it.  You might want to apply
this simple patch if you plan to snapshot for a release.  (It should
apply against anything recent.)


Index: src/xml-sax-read.c
===================================================================
--- src/xml-sax-read.c  (revision 15900)
+++ src/xml-sax-read.c  (revision 15901)
@@ -1869,9 +1869,11 @@
                        v0 = value_new_from_string (vtype0, val0, NULL, FALSE);
                if (val1 != NULL && vtype1 != VALUE_EMPTY)
                        v1 = value_new_from_string (vtype1, val1, NULL, FALSE);
-               if (v0 != NULL)
+               if (v0 && v1)
                        cond = gnm_filter_condition_new_double (
                                op0, v0, is_and, op1, v1);
+               else if (v0)
+                       cond = gnm_filter_condition_new_single (op0, v0);
        } else if (0 == g_ascii_strcasecmp (type, "blanks")) {
                cond = gnm_filter_condition_new_single (
                        GNM_FILTER_OP_BLANKS, NULL);
Comment 13 Jérôme Guelfucci 2007-09-18 17:31:31 UTC
Morten Welinder : Thank you very much, I will try to get this patch applied.