After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 620198 - Segfault on adding a point to a series in a chart
Segfault on adding a point to a series in a chart
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other All
: Normal critical
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-06-01 00:12 UTC by Sameer Morar
Modified: 2010-06-01 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
stack trace (4.62 KB, text/plain)
2010-06-01 00:23 UTC, Sameer Morar
  Details
Tentative patch (1.30 KB, patch)
2010-06-01 01:48 UTC, Morten Welinder
none Details | Review
Book1.gnumeric test file (2.41 KB, application/octet-stream)
2010-06-01 01:50 UTC, Morten Welinder
  Details

Description Sameer Morar 2010-06-01 00:12:06 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
Comment 1 Sameer Morar 2010-06-01 00:23:27 UTC
Created attachment 162413 [details]
stack trace
Comment 2 Morten Welinder 2010-06-01 01:21:13 UTC
Confirmed.
Comment 3 Morten Welinder 2010-06-01 01:48:15 UTC
Created attachment 162417 [details] [review]
Tentative patch

This seems to fix the issue, but I am not familiar with the
code there.  Jean?
Comment 4 Morten Welinder 2010-06-01 01:50:29 UTC
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.
Comment 5 Morten Welinder 2010-06-01 01:56:41 UTC
If the patch is right, a similar thing needs to be done near line 969.
Comment 6 Jean Bréfort 2010-06-01 12:42:44 UTC
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.
Comment 7 Jean Bréfort 2010-06-01 13:13:00 UTC
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.
Comment 8 Morten Welinder 2010-06-01 13:17:28 UTC
gog-xy fixed.
Comment 9 Jean Bréfort 2010-06-01 15:39:21 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.