Use of g_return_if_fail to catch data errors
Submitted by sum1
Link to original bug (#570285)
Description
Version: r1040 OS: Ubuntu Intrepid
Steps to reproduce:
- Download Attachment 104243 (.xls file from Bug 513831)
- ssconvert attachment.xls /tmp/foo.txt
Console output:
libgsf:msole-CRITICAL **: ole_dirent_new: assertion !seen_before[entry]' failed libgsf:msole-CRITICAL **: ole_dirent_new: assertion
!seen_before[entry]' failed
libgsf:msole-CRITICAL **: ole_dirent_new: assertion `!seen_before[entry]' failed
Backtrace:
(gdb) bt
#0 IA__g_return_if_fail_warning (log_domain=0xb79c8ebb "libgsf:msole", pretty_function=0xb79c9016 "ole_dirent_new",
expression=0xb79c9065 "!seen_before[entry]") at /build/buildd/glib2.0-2.18.2/glib/gmessages.c:525
#1 0xb79b138a in ole_dirent_new (ole=0x9f54538, entry=0, parent=0x9f2dbf0, seen_before=0x9f7a2f8 "\001") at gsf-infile-msole.c:299
#2 0xb79b1883 in ole_dirent_new (ole=0x9f54538, entry=2, parent=0x9f2dbf0, seen_before=0x9f7a2f8 "\001") at gsf-infile-msole.c:377
#3 0xb79b18cd in ole_dirent_new (ole=0x9f54538, entry=0, parent=0x0, seen_before=0x9f7a2f8 "\001") at gsf-infile-msole.c:381
#4 0xb79b2387 in ole_init_info (ole=0x9f54538, err=0x0) at gsf-infile-msole.c:610
#5 0xb79b3268 in gsf_infile_msole_new (source=0x9f6c118, err=0x0) at gsf-infile-msole.c:935
#6 0xb685598e in excel_file_probe (fo=0x9e19cf0, input=0x9f6c118, pl=FILE_PROBE_CONTENT) at boot.c:107
#7 0xb7a7b6eb in go_plugin_loader_module_func_file_probe (fo=0x9e19cf0, service=0x9f24db0, input=0x9f6c118, pl=FILE_PROBE_CONTENT)
at go-plugin-loader-module.c:224
#8 0xb7a7d067 in go_plugin_file_opener_probe (fo=0x9e19cf0, input=0x9f6c118, pl=FILE_PROBE_CONTENT) at go-plugin-service.c:445
#9 0xb7a7fa2c in go_file_opener_probe (fo=0x9e19cf0, input=0x9f6c118, pl=FILE_PROBE_CONTENT) at file.c:274
#10 0xb7c7d7d9 in wb_view_new_from_input (input=0x9f6c118, optional_fmt=0x0, io_context=0x9e0e110, optional_enc=0x0)
at workbook-view.c:1194
#11 0xb7c7dac0 in wb_view_new_from_uri (uri=0x9f43ed0 "file:///home/s/test/gnumeric/samples-bugzilla/tmp/bg513831-104243.xls",
optional_fmt=0x0, io_context=0x9e0e110, optional_enc=0x0) at workbook-view.c:1284
#12 0x08049e01 in convert (inarg=0xbfa7e6fc "bg513831-104243.xls", outarg=0xbfa7e710 "/tmp/foo.txt", cc=0x9f1e8b0) at ssconvert.c:291
#13 0x0804a252 in main (argc=3, argv=0xbfa7c804) at ssconvert.c:401