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

 
 

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

Submitted by:  Christian Bergstrand <chbe>
Submitted on:  Thu 26 Aug 2010 03:30:29 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.2.3Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by chbe (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 30 Aug 2010 05:35:41 AM UTCjweStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Sun 29 Aug 2010 02:26:28 PM UTCjweStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1