GNOME Bugzilla – Bug 165617
Text import crash on multiple separators at the end of the buffer
Last modified: 2005-02-01 16:45:54 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
+ Trace 55064
Thread 1 (Thread 1088067648 (LWP 6912))
------- 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.
Created attachment 36689 [details] An example of the file format
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).
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.
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.
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.
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.
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]
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.