GNOME Bugzilla – Bug 499717
NULL pointer crash in header/footer customization code
Last modified: 2007-11-26 21:29:30 UTC
Version: r16203 OS: Ubuntu Gutsy Steps to reproduce: - Run Gnumeric - Import gnumeric/samples/excel/mathfuns.xls - File > Page Setup - Select the "Headers and Footers" tab - Press either Configure button to crash Gnumeric Backtrace: Program received signal SIGSEGV, Segmentation fault.
+ Trace 179679
Thread NaN (LWP 5447)
It's worse. Selecting Cancel and the exiting crashes in the gconf code.
Created attachment 99673 [details] [review] patch for the first crash This patch fixes the first crash. I haven'tbeen able to replicate the second one yet. Morten: what exactly are you cancelling and exiting?
I agree with that patch in the sense that it will fix the crash. I do not know if having NULL there is a good idea. Go ahead and commit. I start with mathfuns.xls Select File->Page Setup Click Headers and Footers --> and see "(null) (null) (null)" Click Cancel. Ctrl-Q (gdb) where
+ Trace 179717
Morten: We used to allow null pointers for the formats. This implies that we have to check everywhere for those null pointers. I think it is better just to use empty strings. THose extra 6 bytes per sheet should not kill us. I'll redo the patch.
Created attachment 99675 [details] [review] Fix for both crashes THis patch fixes both crashes by using "" rather than NULL.
Comment on attachment 99675 [details] [review] Fix for both crashes Looks good.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.