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 165617 - Text import crash on multiple separators at the end of the buffer
Text import crash on multiple separators at the end of the buffer
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export Text
unspecified
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-01-29 17:23 UTC by Uri David Akavia
Modified: 2005-02-01 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An example of the file format (23.42 KB, text/html)
2005-01-29 17:32 UTC, Uri David Akavia
Details
A gzipped large HTML file that can cause the crash (98.75 KB, application/x-gzip)
2005-01-31 21:32 UTC, Uri David Akavia
Details

Description Uri David Akavia 2005-01-29 17:23:02 UTC
Distribution: Debian 3.1
Package: Gnumeric
Severity: normal
Version: GNOME2.8.1 unspecified
Gnome-Distributor: Debian
Synopsis: Importing a very large amount of txt causes gnumeric to crash
Bugzilla-Product: Gnumeric
Bugzilla-Component: import/export Text
Bugzilla-Version: unspecified
BugBuddy-GnomeVersion: 2.0 (2.8.0)
Description:
Description of the crash:
Open the soon to be attached file in your browser (I use firefox).
Select all rows that have three collumns.
Copy.
Open Gnumeric.
Paste.
Text importer starts.
Text importer crasehs after pressing Finish.


Debugging Information:

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

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its
symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 1088067648 (LWP 6912)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x408584ee in __waitpid_nocancel () from /lib/tls/libpthread.so.0

Thread 1 (Thread 1088067648 (LWP 6912))

  • #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 format_match
  • #4 stf_parse_region
  • #5 gnm_go_data_matrix_new_expr
  • #6 gnm_go_data_matrix_new_expr
  • #7 gtk_clipboard_set_text
    from /usr/lib/libgtk-x11-2.0.so.0
  • #8 _gtk_marshal_VOID__BOXED_UINT
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #13 _gtk_selection_property_notify
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 _gtk_selection_notify
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #24 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #28 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #29 main
  • #0 __waitpid_nocancel
    from /lib/tls/libpthread.so.0




------- Bug moved to this database by unknown@bugzilla.gnome.org 2005-01-29 12:23 -------


Unknown platform unknown. Setting to default platform "Other".
Unknown milestone "unknown" in product "Gnumeric".
   Setting to default milestone for this product, '---'
Setting to default status "UNCONFIRMED".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Uri David Akavia 2005-01-29 17:32:27 UTC
Created attachment 36689 [details]
An example of the file format
Comment 2 Uri David Akavia 2005-01-29 17:33:39 UTC
This is apparently related to the large size of the HTML file (2.8Mb).

When I just select two or three rows it works perfectly.

I'm attaching an small example of how the file looks.
For testing purposes, please replicate the file multiple times.
I can upload/send you an example file if you so wish (Or you can ask Ensembl to
give you the IDs of a long list of LocusLink IDs, if this actually means
anything to anyone).
Comment 3 Morten Welinder 2005-01-31 13:53:50 UTC
This does not crash for me.

Please attach a full sample that causes a crash (run it through gzip to get the
size down to something bugzilla will handle) and very precise instructions about
what to click in the import dialog.
Comment 4 Uri David Akavia 2005-01-31 21:32:21 UTC
Created attachment 36786 [details]
A gzipped large HTML file that can cause the crash

Okay - this attachment should work.
Open the attachment in Firefox.
Select a large amount of tables (it has to be multiple screens - one or two
isn't enough).
Paste to Gnumeric.
Text importer opens.
| should be selected as a seperator automatically.
Select space as a seperator.
Check "see two seperators as one"
Click Okay, Okay, Finish.

Gnumeric should crash.
Comment 5 Morten Welinder 2005-01-31 23:49:42 UTC
I see no crash here.  What version have you been using?

(For the record, I tested using Gnumeric 1.4.1 on SuSE 9.1)

Unrelatedly, your html files have an extra blank line at the beginning.
Gnumeric doesn't care, but something else might.
Comment 6 Uri David Akavia 2005-02-01 06:38:16 UTC
Gnumeric 1.4.1 on Debian Testing.

The extra blank line shouldn't matter, since I'm not importing text or HTML. I'm
selecting and copying. (Import seems to work, IIRC)

Are you using Firefox? (my version is 1.0+dfsg.1-2) For the record, this happens
with Galeon 1.3.19.

Okay - just happened to me again.
I'll try being detailed as possible.

Select from the line starting  ENSRNOG00000010392.2. Do NOT select the two lines
above it (when I select them, I've had no crash).
Select inclusive to the line starting "| ENSRNOG00000000459.2 " (one line before
the lines that start to have (not found) in the rightmost collumn).

Paste into A1 of a new workbook.
Encoding is UTF-8 grayed out.
Line breaks - all three types are checked.
Original data - seperated.
Lines to import 1 to 2610.

Second Screen
-------------
Seperators - Pipe is checked. Check space. Check See two seperators as one.
Text indicator - "
                  Adjacent text indicators escaped is checked.
(Right now you should have 4 collumns).

Third Screen
------------
Trim - Both Sides
Source Locale - Current Locale: United States/English (C)
All 4 collumns are marked as General format, and checked for import.

Press Finish.

Crash.
Comment 7 Morten Welinder 2005-02-01 16:06:31 UTC
While I don't see the crash, I do see something wrong.
Could you try running under gdb and see if you can get a stack trace where
it crashes for you?

Here's the problems I see (under purify on solaris/sparc):

      ABR: Array bounds read (6 times)
      This is occurring while in:
            g_utf8_get_char [gutf8.c:271 pc=0xfa3f3588]
            stf_parse_csv_line [stf-parse.c:671 pc=0x1c8390]
            stf_parse_general [stf-parse.c:803 pc=0x1c8850]
            stf_parse_region [stf-parse.c:1215 pc=0x1c96b0]
            text_to_cell_region [gui-clipboard.c:123 pc=0x1062fc]
            complex_content_received [gui-clipboard.c:214 pc=0x106648]
            selection_received [gtkclipboard.c:860 pc=0xfacb4b18]
            _gtk_marshal_VOID__BOXED_UINT [gtkmarshalers.c:1261 pc=0xfade63bc]
            g_closure_invoke [gclosure.c:437 pc=0xfa85e084]
            signal_emit_unlocked_R [gsignal.c:2485 pc=0xfa8866c8]
            g_signal_emit_valist [gsignal.c:2244 pc=0xfa8832fc]
            g_signal_emit_by_name [gsignal.c:2312 pc=0xfa8843ec]
            gtk_selection_retrieval_report [gtkselection.c:2341 pc=0xfae607c0]
            _gtk_selection_property_notify [gtkselection.c:2225 pc=0xfae6045c]
            _gtk_marshal_BOOLEAN__BOXED [gtkmarshalers.c:83 pc=0xfade42e0]
            g_type_class_meta_marshal [gclosure.c:514 pc=0xfa85e444]
            g_closure_invoke [gclosure.c:437 pc=0xfa85e084]
            signal_emit_unlocked_R [gsignal.c:2523 pc=0xfa8871ec]
            g_signal_emit_valist [gsignal.c:2254 pc=0xfa883380]
            g_signal_emit  [gsignal.c:2288 pc=0xfa883830]
            gtk_widget_event_internal [gtkwidget.c:3616 pc=0xfaf9c620]
            gtk_widget_event [gtkwidget.c:3422 pc=0xfaf9c0f8]
            gtk_main_do_event [gtkmain.c:1406 pc=0xfade09bc]
            gdk_event_dispatch [gdkevents-x11.c:2218 pc=0xfb3eb974]
            g_main_dispatch [gmain.c:1947 pc=0xfa3bb024]
      Reading 1 byte from 0x13deab4 in the heap.
      Address 0x13deab4 is 1 byte past end of a malloc'd block at 0x13b2108 of
182700 bytes.
      This block was allocated from:
            malloc         [rtlib.o pc=0x74000]
            g_malloc       [gmem.c:137 pc=0xfa3c6a74]
            g_convert_with_iconv [gconvert.c:578 pc=0xfa398674]
            g_convert      [gconvert.c:517 pc=0xfa39856c]
            main_page_set_encoding [dialog-stf-main-page.c:44 pc=0x24b6d8]
            stf_dialog_main_page_init [dialog-stf-main-page.c:344 pc=0x24c3b8]
            stf_dialog     [dialog-stf.c:364 pc=0x24afd4]
            text_to_cell_region [gui-clipboard.c:118 pc=0x1062d0]
            complex_content_received [gui-clipboard.c:214 pc=0x106648]
            selection_received [gtkclipboard.c:860 pc=0xfacb4b18]
            _gtk_marshal_VOID__BOXED_UINT [gtkmarshalers.c:1261 pc=0xfade63bc]
            g_closure_invoke [gclosure.c:437 pc=0xfa85e084]
            signal_emit_unlocked_R [gsignal.c:2485 pc=0xfa8866c8]
            g_signal_emit_valist [gsignal.c:2244 pc=0xfa8832fc]
            g_signal_emit_by_name [gsignal.c:2312 pc=0xfa8843ec]
            gtk_selection_retrieval_report [gtkselection.c:2341 pc=0xfae607c0]
            _gtk_selection_property_notify [gtkselection.c:2225 pc=0xfae6045c]
            _gtk_marshal_BOOLEAN__BOXED [gtkmarshalers.c:83 pc=0xfade42e0]
            g_type_class_meta_marshal [gclosure.c:514 pc=0xfa85e444]
            g_closure_invoke [gclosure.c:437 pc=0xfa85e084]
            signal_emit_unlocked_R [gsignal.c:2523 pc=0xfa8871ec]
            g_signal_emit_valist [gsignal.c:2254 pc=0xfa883380]
            g_signal_emit  [gsignal.c:2288 pc=0xfa883830]
            gtk_widget_event_internal [gtkwidget.c:3616 pc=0xfaf9c620]
            gtk_widget_event [gtkwidget.c:3422 pc=0xfaf9c0f8]
Comment 8 Morten Welinder 2005-02-01 16:45:54 UTC
Fixed in cvs.

Three lines was more than enough to hit this.  It has to do with the particular
contents of the lines.

The reason that you only see an actual crash with huge chunks is that for large
chunks, the glibc memory allocator will start using mmap for providing memory.
A side effect of that is that any access beyond the buffer will cause a crash
as opposed to just reading random garbage.