GNOME Bugzilla – Bug 361391
ssindex crashes
Last modified: 2006-10-11 15:53:39 UTC
Steps to reproduce: 1. create an empty file named ".csv" => touch test.csv 2. run ssindex -i test.csv 3. ssindex crashes Stack trace: see http://librarian.launchpad.net/4705196/_usr_bin_ssindex.1000.crash for the apport report (>65k characters, bugzilla does not let me paste it here). Other information: ubuntu edgy (6.10) ships beagle by default, and when indexing the files on the harddisk, beagle is running ssindex on .csv files and maybe excel files too. edgy also uses "apport", a software to detect program crashes and collect stack traces. "apport" started displaying messages about ssindex crashing. Those crashes, triggered by beagle indexing CSV files in the background, would go unnoticed without apport, and that's why they've been there so long (and they're coming up so numerous now). Ubuntu bug #63297 collects several of those crash bugs (not only my case of an empty CSV file!). each of the crashes in that bug have stacktrace and most have the file which triggered the problem. https://launchpad.net/distros/ubuntu/+source/gnumeric/+bug/63297
I do not see this problem. Are you sure that ssindex (which is not compiled by default) is not an old executable? The time stamp on ssindex and gnumeric should be roughly the same. I would like to see a stack trace for the crash. (The link above does not lead to a stack trace, but a crash report on some kind.) ./ssindex -i test.csv -> test.csv Reading file:///home/welinder/private/gnome/gnumeric/src/test.csv <?xml version="1.0" encoding="UTF-8"?> <gnumeric> <data>test.csv</data> </gnumeric>
i never compiled gnumeric on this computer, it's from ubuntu packages. /usr/bin/ssindex comes with gnumeric on ubuntu (just checked in synaptic). ssindex --version ssindex version '1.7.0' datadir := '/usr/share/gnumeric/1.7.0' libdir := '/usr/lib/gnumeric/1.7.0' here's a backtrace from GDB: Program received signal SIGSEGV, Segmentation fault.
+ Trace 75814
Thread NaN (LWP 5061)
Ah, that one. Fixed in 1.7.1. *** This bug has been marked as a duplicate of 345477 ***
For the (Ubuntu) record: the above crash triggered when we failed to guess a separator based on the data. In particular, comma separated files in locales using decimal commas (such as no_NO) could hit this. Two fixes were involved: (a) survive not being able to guess a separator. (b) become better at guessing The patch below should work, if you don't want to upgrade to 1.7.1 for reasons that I cannot think of right now. Mean_shrtest_path.csv looks like it might very well have hit the problem in a decimal comma locale. Index: stf-parse.c =================================================================== RCS file: /cvs/gnome/gnumeric/src/stf-parse.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -r1.119 -r1.120 --- stf-parse.c 25 May 2006 16:09:36 -0000 1.119 +++ stf-parse.c 21 Jun 2006 00:39:23 -0000 1.120 @@ -1400,6 +1400,7 @@ if (count_character (lines, (c = sepchar), 0.5) > 0 || count_character (lines, (c = format_get_col_sep ()), 0.5) > 0 || count_character (lines, (c = ':'), 0.5) > 0 || + count_character (lines, (c = ','), 0.5) > 0 || count_character (lines, (c = ';'), 0.5) > 0 || count_character (lines, (c = '|'), 0.5) > 0 || count_character (lines, (c = '!'), 0.5) > 0 || @@ -1414,14 +1415,18 @@ if (1) { /* Separated */ + gboolean dups = + res->sep.chr && + strchr (res->sep.chr, ' ') != NULL; + gboolean trim = + res->sep.chr && + strchr (res->sep.chr, ' ') != NULL; stf_parse_options_set_type (res, PARSE_TYPE_CSV); stf_parse_options_set_trim_spaces (res, TRIM_TYPE_LEFT | TRIM_TYPE_RIGHT); stf_parse_options_csv_set_indicator_2x_is_single (res, TRUE); - stf_parse_options_csv_set_duplicates - (res, strchr (res->sep.chr, ' ') != NULL); - stf_parse_options_csv_set_trim_seps - (res, strchr (res->sep.chr, ' ') != NULL); + stf_parse_options_csv_set_duplicates (res, dups); + stf_parse_options_csv_set_trim_seps (res, trim); stf_parse_options_csv_set_stringindicator (res, '"'); } else {