bugGNU Octave - Bugs: bug #32682, Segmentation fault in...

 
 

bug #32682: Segmentation fault in "title" when plotting surf with very large elevation

Submitter:  Carlo de Falco <cdf>
Submitted:  Fri 04 Mar 2011 11:06:43 PM UTC
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Sat 13 Oct 2012 04:15:40 AM UTC, comment #9: 

This report is quite old and the test in the original post seems to be working with current development sources, so I am closing the bug.

Carlo de Falco <cdf>
Project Member
Thu 21 Apr 2011 09:37:15 PM UTC, comment #8: 

The patch from comment #2 was previously shown not to work by Ben.  Did you re-test that failing patch or are your results actually for the second patch attempt in comment #5?

Rik <rik5>
Project Administrator
Thu 21 Apr 2011 08:29:24 PM UTC, comment #7: 

I can reproduce the original problem reported by Carlo de Falco, using his test case but instead of a crashing Octave just hangs.

I can reproduce this with both gnuplot and fltk so the original problem seems to be independent of the OpenGL double precision issue.

Patch from comment #2 is not a good idea.

Konstantinos Poulios <logari81>
Wed 06 Apr 2011 05:40:51 AM UTC, comment #6: 

I "fixed" the seg fault reported below by:
change line 5118 of graphics.cc from;

  for (int i = 0; i < n; i++)
to
  for (int i = 1; i < n; i++)

I only guessed at this working, but it does.
A more serious fix is called for.

Michael Godfrey <godfrey>
Project Member
Tue 05 Apr 2011 08:49:47 PM UTC, comment #5: 

Attached is another seg fault in graphics.cc
The context for this involves quite a bit of
code.  I hope that the gdb bt will be sufficient.
If not, I could package up the files needed to
reproduce the seg fault.

(file #23114)

Michael Godfrey <godfrey>
Project Member
Mon 04 Apr 2011 05:30:23 PM UTC, comment #4: 

The problem appears to lie mostly with the fact that OpenGL and the FLTK backend use single precision variables for axis positioning.  When these values overflow the behavior of the plotting functions, such as title, becomes indeterminate.  See bug #32980

It is still true that the interpreter shouldn't segfault and perhaps there needs to be some Octave code written to identify when high dynamic range plots are being attempted and stop this behavior.

Rik <rik5>
Project Administrator
Sat 02 Apr 2011 06:15:48 PM UTC, comment #3: 

I can confirm there is no crash. Unfortunately, the title does not display correctly.

The simple example below places the title in the lower left of the axis box.

plot (1:10)
title hello

Ben Abbott <bpabbott>
Project Member
Sat 02 Apr 2011 04:10:49 PM UTC, comment #2: 

I've attached a patch which fixes the problem for me.  However, the graphics area of Octave are not my area of expertise so someone with more experience should check this.

(file #23080)

Rik <rik5>
Project Administrator
Tue 08 Mar 2011 09:01:46 PM UTC, comment #1: 

Confirmed on 3.4.0 and dev branches, and with gnuplot or fltk toolkits. 

surf obviously needs a bit of attention regarding how it handles extreme values.  There is another bug (#32275) which reports NaN values not behaving in a compatible way.

Rik <rik5>
Project Administrator
Fri 04 Mar 2011 11:06:43 PM UTC, original submission:  

I get a consistently reproducible segmentation fault
with current development version on Mac OS X by doing the following:

>> [X,Y,Z]=sombrero;
>> surf (X, Y, Z*1e303);
>> title ('test')
Segmentation fault

this happens with both graphics_toolkit's but while gnuplot does show the sombrero, I see nothing in the fltk window.

c.

Carlo de Falco <cdf>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #23114:  seg_fault_plot_20110405 added by godfrey (20KiB - application/octet-stream)
file #23080:  title_segfault.diff added by rik5 (1KiB - text/x-patch)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by logari81 (Posted a comment)
  • -email is unavailable- added by godfrey (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-13 cdf Open/ClosedOpen Closed
    2011-04-05 godfrey Attached File- Added seg_fault_plot_20110405, #23114
    2011-04-04 rik5 StatusReady For Test Confirmed
    2011-04-04 rik5 Dependencies- Depends on bugs #32980
    2011-04-02 rik5 Attached File- Added title_segfault.diff, #23080
        StatusConfirmed Ready For Test
    2011-03-08 rik5 StatusNone Confirmed

    Back to the top


    Powered by Savane 3.9