GNOME Bugzilla – Bug 620198
Segfault on adding a point to a series in a chart
Last modified: 2010-06-01 15:39:21 UTC
Adding a point to a data series in a chart crashes gnumeric. Steps to reproduce: 1) Open a new spreadsheet 2) Create two columns of x and y data for a plot 3) Select both columns of data 4) Select Insert->Chart... 5) Select the XY plot type 6) Click on Insert button 7) Click on the spreadsheet 8) Right click graph and select Properties 9) Select "Series 1" 10) Click on add and then select "Point to Series 1" gnumeric subsequently sefaults
Created attachment 162413 [details] stack trace
Confirmed.
Created attachment 162417 [details] [review] Tentative patch This seems to fix the issue, but I am not familiar with the code there. Jean?
Created attachment 162418 [details] Book1.gnumeric test file Jean: with the above patch I can add a point as described. I can then select and index from 0 to 4 (inclusive) but if the index is 0 there is no sign that anything is going on. There are five point so I would expect to be able to use either of those five points.
If the patch is right, a similar thing needs to be done near line 969.
The patch looks right. I need to check if similar code exists elsewhere, not only near line 969, but also for other plot types. I don't remember why I changed that code some times ago (probably to fix a bug), but I clearly missed something. About comment #4: this behavior is what is anticipated. The automatic style is the same for point #0 and series #0 (even if the name is Series1). If you had done it with the second series, the second point would have the same automatic style than the first. You need to change the style to see the difference.
GogRadar is affected too. And I'm not sure about the patch. This needs more thinking. I hope I'll have time during next week-end.
gog-xy fixed.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.