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 766829 - Graph related segfault
Graph related segfault
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Normal critical
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2016-05-24 07:34 UTC by Michal Smid
Modified: 2016-06-15 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Problematic fle (24.03 KB, application/x-gnumeric)
2016-05-24 11:43 UTC, Michal Smid
  Details
Proposed patch (2.58 KB, patch)
2016-05-26 09:49 UTC, Jean Bréfort
committed Details | Review

Description Michal Smid 2016-05-24 07:34:30 UTC
Hi,
when trying to open a gnumeric file I got an error
>>gnumeric over2.gnumeric 

** (gnumeric:24185): CRITICAL **: gog_axis_get_ticks: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_get_atype: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_get_color_map: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_get_ticks: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_get_bounds: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_is_inverted: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_map_new: assertion 'GOG_IS_AXIS (axis)' failed

** (gnumeric:24185): CRITICAL **: gog_axis_color_map_get_max: assertion 'GOG_IS_AXIS_COLOR_MAP (map)' failed
Segmentation fault (core dumped)


The file was created by gnumeric, possible before the upgrade to newest version of Kubuntu 16.04, so this might be an compatibility issue between version. Current version of gnumeric is 1.12.28.

Any help extremely appreciated, 
Michal
Comment 1 Morten Welinder 2016-05-24 10:26:17 UTC
We're going to need a copy of the file or, at least, a stack trace of
where the problem happens.

It would be best to attach the file here, but mailing a copy to me
will work too if it is confidential.  I'll delete after investigating.
Comment 2 Michal Smid 2016-05-24 11:43:08 UTC
Created attachment 328432 [details]
Problematic fle

The file causing trouble.
Comment 3 Morten Welinder 2016-05-24 12:20:12 UTC
Confirmed.  Here's the stack trace.

(gdb) where
  • #0 gog_axis_color_map_to_cairo
    at graph/gog-axis-color-map.c line 597
  • #1 gog_renderer_draw_color_map
    at graph/gog-renderer.c line 1288
  • #2 gog_color_scale_view_render
    at graph/gog-color-scale.c line 701
  • #3 gog_chart_view_render
    at graph/gog-chart.c line 1584
  • #4 gog_graph_view_render
    at graph/gog-graph.c line 1026
  • #5 gog_view_render
    at graph/gog-view.c line 892
  • #6 gog_renderer_update
    at graph/gog-renderer.c line 1429
  • #7 _goc_item_update_bounds

Comment 4 Morten Welinder 2016-05-24 12:23:44 UTC
The trace of the first critical is...

  • #0 g_log
  • #1 gog_axis_get_ticks
    at graph/gog-axis.c line 3728
  • #2 gog_color_scale_view_size_request
    at graph/gog-color-scale.c line 424
  • #3 gog_view_size_allocate_real
    at graph/gog-view.c line 570
  • #4 gog_outlined_view_size_allocate
    at graph/gog-outlined-object.c line 143
  • #5 gog_chart_view_size_allocate
    at graph/gog-chart.c line 1413
  • #6 gog_view_size_allocate
    at graph/gog-view.c line 840
  • #7 gog_graph_view_size_allocate
    at graph/gog-graph.c line 1007
  • #8 gog_view_size_allocate
    at graph/gog-view.c line 840
  • #9 gog_renderer_update
    at graph/gog-renderer.c line 1402
  • #10 _goc_item_update_bounds
    at canvas/goc-item.c line 322

Comment 5 Jean Bréfort 2016-05-24 13:48:17 UTC
This one looks quite serious, and is clearly my bad. I'll fix as soon as possible.
Comment 6 Morten Welinder 2016-05-24 21:51:28 UTC
I added a precondition to gog_axis_color_map_to_cairo.  That avoids the
crash, but obviously doesn't solve the real problem.
Comment 7 Jean Bréfort 2016-05-25 09:24:32 UTC
It fix the initial crash, but there are still one (on graph edition attempt).
Comment 8 Jean Bréfort 2016-05-25 09:42:20 UTC
The real issue comes from how the axis is linked to the scale. I used the axis object name, but this is a very bas idea since it is locale dependent. We probably need two properties: the axis type and the axis id. I should find time tomorrow to implement that. Unfortunately it will break existent files with color scales.
Comment 9 Jean Bréfort 2016-05-26 09:49:35 UTC
Created attachment 328549 [details] [review]
Proposed patch

In the future, we should merge color and pseudo-3D axes since they are very similar. This should be done without breaking any old file which might be not so easy if one chart has both axis types.
Comment 10 Morten Welinder 2016-05-26 12:34:09 UTC
Well, there's a first for everything.  I believe this is the first case of
a patch introducing Cyrillic, Greek, and Arabic strings.  It probably won't
make top 10 of our proudest achievements.

But please go ahead and commit.
Comment 11 Jean Bréfort 2016-05-26 13:09:08 UTC
Review of attachment 328549 [details] [review]:

Patch commited.
Comment 12 Jean Bréfort 2016-05-26 13:09:45 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Comment 13 Michal Smid 2016-06-15 11:56:49 UTC
Thank you very much, I owe a beer to both of you! (preferably here in Prague:)