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 329236 - Underscores in sheet names do not round trip
Underscores in sheet names do not round trip
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other other
: Urgent blocker
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2006-01-30 17:05 UTC by David Ronis
Modified: 2006-01-31 02:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Screenshot showing sort dialog (127.66 KB, image/png)
2006-01-30 22:59 UTC, David Ronis
Details

Description David Ronis 2006-01-30 17:05:36 UTC
Distribution: Slackware Slackware 10.2.0
Package: Gnumeric
Severity: critical
Version: GNOME2.12.2 1.7.x
Gnome-Distributor: FRG gsb.sourceforge.net build for slackware
Synopsis: Sorting Broken
Bugzilla-Product: Gnumeric
Bugzilla-Component: General
Bugzilla-Version: 1.7.x
BugBuddy-GnomeVersion: 2.0 (2.12.0)
Description:
Description of the crash:

I select a range of cells (contiguous) and select data->sort.  The usual
popup appears, with no sort columns showing.  When I select +Add,
gnumeric dies, giving me the popup saying that it has crashed, do I want
to restart, etc.

Steps to reproduce the crash:
1. 
2. 
3. 

Expected Results:

Things sort

How often does this happen?

Always

Additional Information:

I'm on a slackware-current box, with freerock gnome running.  I built
from CVS using gcc-4.0.2 and am running linux-2.6.15.1




Debugging Information:

Backtrace was generated from '/usr/bin/gnumeric'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1231783712 (LWP 29707)]
0xb6b4f04e in __waitpid_nocancel () from /lib/tls/libpthread.so.0
  • #0 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 <signal handler called>
  • #3 build_sort_field_base_menu
    from /usr/lib/libspreadsheet-1.7.0.so
  • #4 ??
  • #5 ??
  • #6 ??
  • #7 ??
    from /usr/lib/libspreadsheet-1.7.0.so
  • #8 ??
  • #9 ??
  • #10 ??
  • #11 cb_add_clicked
    from /usr/lib/libspreadsheet-1.7.0.so
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 ??
  • #16 ??
  • #17 ??
  • #18 ??
  • #19 ??
    from /usr/lib/libgobject-2.0.so.0
  • #20 ??
  • #21 ??
  • #22 ??
  • #23 ??
    from /usr/lib/libgobject-2.0.so.0
  • #24 ??
  • #25 ??
  • #26 ??
  • #27 ??
    from /usr/lib/libgobject-2.0.so.0
  • #28 ??
  • #29 ??
  • #30 ??
  • #31 g_value_peek_pointer
    from /usr/lib/libgobject-2.0.so.0




------- Bug created by bug-buddy at 2006-01-30 17:05 -------

Comment 1 Andreas J. Guelzow 2006-01-30 17:15:22 UTC
Would you be able to rebuild gnumeric with debugging symbols and add a more useful backtrace?

Which optimization settings are you using when you build gnumeric?
Comment 2 David Ronis 2006-01-30 19:00:16 UTC
First, I'm using the default optimizations that result from using ./configure with CFLAGS and CXXFLAGS unset.

I rebuilt with debugging, ran under ddd, and crashed in the same way (a SIGSEGV).  Backtrace shows :

 (gdb) backtrace
  • #0 build_sort_field_base_menu
    at dialog-cell-sort.c line 770
  • #1 show_add_menu
    at dialog-cell-sort.c line 801
  • #2 cb_add_clicked
    at dialog-cell-sort.c line 821
  • #3 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #5 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #8 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 gtk_button_get_relief
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #13 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #16 gtk_button_released
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 gtk_button_get_relief
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 gtk_marshal_VOID__UINT_STRING
    from /usr/lib/libgtk-x11-2.0.so.0
  • #19 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #21 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #24 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 gdk_x11_register_standard_event_type
    from /usr/lib/libgdk-x11-2.0.so.0
  • #28 g_main_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #29 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #30 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #31 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #32 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #33 main
    at main-application.c line 483


In particular we seem to be at  dialog-cell-sort.c:769
   
        if (state->is_cols) {
                start = state->sel->v_range.cell.a.col;
                end  = state->sel->v_range.cell.b.col;
                index = state->sel->v_range.cell.a.row;
        } else {
                start = state->sel->v_range.cell.a.row;
                end  = state->sel->v_range.cell.b.row;
                index = state->sel->v_range.cell.a.col;
        }




state is null (after the crash).  

I've put a breakpoint at the calling routine and stepped through; state is fine until after the assignment.  The problem seems to be state->sel with is null on entry.

David



Comment 3 Andreas J. Guelzow 2006-01-30 19:40:38 UTC
Yeah that should be protected against sucha a crash. I am still wondering: when you open the dialog, is anything selected on your sheet? You must be getting into this dialog without any selection and I am not sure how that could happen.
Comment 4 Andreas J. Guelzow 2006-01-30 19:50:52 UTC
Another question:

Is there any range shown in the range box at the top of the dialog?

What happens if you click in the box and reselect your sort range?
Comment 5 Andreas J. Guelzow 2006-01-30 20:01:47 UTC
The crash should now be fixed in CVS. This not address the underlying problem that you should not have a NULL selection here. (There is the possibility that a NULL selection could occur but because of 329250 this can't be the case here.)
Comment 6 David Ronis 2006-01-30 20:18:01 UTC
Couple of things:

1.  Yes I had selected a range of rows and columns (but had done so for earlier versions).
2.  The selected range does show at the top of the dialog box.
3.  Even if I don't select the range by dragging with the mouse (actually I click the topmost left cell and then alt-click the bottommost right cell),  but add it manually to the dialog box, the crash still happens.
4.  While the CVS patch keeps things from crashing,  the sort dialog is still broken.  Normally, when I click on +Add, I get a popup list of columns or rows to add to the sort criteria;  this doesn't happen, and activating the sort does nothing.

Comment 7 Andreas J. Guelzow 2006-01-30 21:56:36 UTC
If you add columns or rows to the sort specification by clicking in the entry box to the left of the add button, then selecting a column (or row) intersecting the sort range and then clicking add, do you get any column specifications added to the dialog?

How does the sort range at the top of the dialog look like?

(Unfortunately I can't replicate your problem so it is difficult to determine why your sort range as stored inside the dialog is empty.)
Comment 8 David Ronis 2006-01-30 22:59:27 UTC
Created attachment 58431 [details]
Screenshot showing sort dialog
Comment 9 David Ronis 2006-01-30 23:00:50 UTC
The entry box  you mentioned (to the left of the +Add) button seems to be dead. 

The main sort range is:  grade_365!$A$4:$C$50 (where I'd previously selected the cells who's upper left corner is A4 and lower right is at C50).

I've attached a screenshot of the dialog (the main gnumeric window contains sensitive information and I've moved it off to the side on purpose).
Comment 10 Andreas J. Guelzow 2006-01-30 23:40:52 UTC
Something is horribly broken, and it isn't the sorting dialog: the problem is the underscore in the sheet name. Gnumeric creates the underscore in its reference name without escaping the sheet name but it does not understand the name.

For the moment please remove the underscore from your sheet name and the sort dialog should work for you.
Comment 11 Andreas J. Guelzow 2006-01-30 23:43:08 UTC
Please note that the same problem occurs with various dialogs in gnumeric. For example selecteing a range on that sheet and opening the descriptive statics tool explicitly warns of an invalid range.
Comment 12 David Ronis 2006-01-30 23:54:51 UTC
You are indeed correct; removing the underscore on the sheet name makes everything work as expected.

Comment 13 Morten Welinder 2006-01-31 02:14:37 UTC
Argh!

Any idea whether Excel quotes underscores?
Comment 14 Andreas J. Guelzow 2006-01-31 02:34:01 UTC
I just tried it with gnumeric version 1.6.0 (well that may not be the final release 1.6.0 but some nearly 1.6.0 cvs version) and it quoted sheet names with underscores, so this is relatively recent!
Comment 15 Morten Welinder 2006-01-31 02:50:14 UTC
Fixed in cvs.