GNOME Bugzilla – Bug 407274
Entering relative R1C1 reference in GoTo dialog or selection descriptor causes crash
Last modified: 2007-02-13 17:28:16 UTC
Using R1C1-style relative references in the GoTo dialog or the selection descriptor is not handled correctly and can cause a crash. A relative reference is treated like an absolute reference, with the square brackets being ignored. For example, entering R[1]C[1] will make R1C1 the active cell, not the cell one row below and one row to the right of the current cell. Worse, if negative offsets are given Gnumeric will crash. Here's an example backtrace, after entering 'R[-2]C1' in the selection descriptor: Program received signal SIGSEGV, Segmentation fault.
+ Trace 110246
Thread NaN (LWP 14272)
Avoiding the segfault is one line fix (see patch), but this doesn't fix the underlying problem, with the references being interpreted as absolute values. I've spent a while trying to work out how to do this, but have ended up a bit lost in value_new_cellrange_str() and parser.y. It would probably help if I knew how to program in either C or yacc :)
Created attachment 82431 [details] [review] Fix for crash from relative R1C1 references
Confirmed. I am not sure what a relative location entered up there should mean -- what is it relative to? But it clearly shouldn't crash.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.
(In reply to comment #2) > Confirmed. I am not sure what a relative location entered up there should > mean -- what is it relative to? Relative to the currently active cell. That's what Excel does anyway -- if R3C3 is active and you enter R[2]C[-1] then it will change the selection to be R5C2. This is only very occasionally useful.