bugGNU Octave - Bugs: bug #30877, invalid value for array property...

 
 

bug #30877: invalid value for array property "cdata" when displaying surface

Submitter:  Christian Bergstrand <chbe>
Submitted:  Thu 26 Aug 2010 03:30:29 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Aug 2010 05:35:42 AM UTC, comment #4: 

After some discussion on the maintainers list, I checked in teh following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/56f9c10e9e98

John W. Eaton <jwe>
Group administrator
Sun 29 Aug 2010 02:26:06 PM UTC, comment #3: 

Yes, any function that tries to set the cdata property of the surface graphics object will be subject to the constraints that it can presently be only double or uint8 data.  The fix is simple, just add additional lines like

  alphadata.add_constraint ("single");
  cdata.add_constraint ("single");

in the surface::properties::init function in src/graphics.h.in in the Octave sources and recompile.

But before doing that, I'd like to understand the reason for the current limitation to double and uint8, and whether using single can cause some other problems elsewhere.  So far, I haven't seen any response to my question about this on the maintainers list.

John W. Eaton <jwe>
Group administrator
Sat 28 Aug 2010 01:47:17 PM UTC, comment #2: 

Even if the definition of the cdata structure is kept as it is, either a cast somewhere in the call chain would be appropriate, or at the very least a better error message.

Took me a couple of hours to figure out why some of my surfaces worked perfectly and some not.

This problem also exist for mesh and similar functions

Christian Bergstrand <chbe>
Fri 27 Aug 2010 04:05:07 PM UTC, comment #1: 

Matlab is documented to require double or uint8 data for the cdata surface property and Octave follows that.  I'm not sure why this restriction exists though, so maybe it could be removed.  I've started a thread about this on the maintainers mailing list.

John W. Eaton <jwe>
Group administrator
Thu 26 Aug 2010 03:30:29 PM UTC, original submission:  

When creating a surface using a matrix of single values it fails with 'invalid value for array property "cdata"', when creating a surface with the same matrix of doubles it succeds, see below.

octave-3.2.3.exe:48:W:\mxresearch\projects\flow\foreign_object_log

> surface( [ 1 2 ; 4 5 ] )

octave-3.2.3.exe:49:W:\mxresearch\projects\flow\foreign_object_log

> surface( single( [ 1 2 ; 4 5 ] ) )

error: invalid value for array property "cdata"
error: called from:
error:   C:\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\surface.m at line 150, column 7
error:   C:\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\surface.m at line 51, column 5
error: _go_draw_axes_: invalid grid data
error: called from:
error:   C:\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__go_draw_axes__.m at line 903, column 8
error:   C:\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__go_draw_figure__.m at line 92, column 3
error:   C:\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\gnuplot_drawnow.m at line 91, column 5
octave-3.2.3.exe:49:W:\mxresearch\projects\flow\foreign_object_log

>

Christian Bergstrand <chbe>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by chbe (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 group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-30 jwe StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2010-08-29 jwe StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code