bugGNU Octave - Bugs: bug #62432, classdef object display of boolean...

 
 

bug #62432: classdef object display of boolean matrix property fails with error: octave_base_value::bool_value(): wrong type argumen

Submitter:  PIERRE LABRECHE <pierre5018>
Submitted:  Tue 10 May 2022 04:12:06 PM UTC
   
 
Category:  Classdef Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Ready For Test Assigned to:  None
Originator Name:  PIERRE LABRECHE Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 24 Apr 2024 05:23:41 PM UTC, comment #7: 

I opened bug #65637 to keep track of some potential changes for short_disp.

Markus Mützel <mmuetzel>
Group administrator
Wed 24 Apr 2024 05:16:46 PM UTC, comment #6: 

Thanks for the feedback.  I pushed the following change on stable and merged with default.  Marking as ready for test.  A separate bug report for short_disp issues would probably be best.

https://hg.savannah.gnu.org/hgweb/octave/rev/f86b8eb0c654

John W. Eaton <jwe>
Group administrator
Wed 24 Apr 2024 04:04:06 PM UTC, comment #5: 

I like the seconds version better because it displays more information that could be useful.
If there are only a few elements to display for a property, it should be ok.
We should probably address the FIXME in the `short_disp` functions. That shouldn't be too hard. But imho, we could also do that at a later point. Maybe, we should open a new report about that so we don't forget? (Afaict, the `short_disp` functions are already used for the workspace widget where they might also drop trailing elements without "...".)

Applying this change on the stable branch should be fine.

Markus Mützel <mmuetzel>
Group administrator
Wed 24 Apr 2024 03:36:14 PM UTC, comment #4: 

I'm attaching two possible "fixes" for this problem.  The first just avoids attempting to display any values and instead only displays size and type info.  The second tries to do a better job of displaying values when they might fit on a single line, but note the FIXME message for some limitations.

Either one would be better than the current behavior.  It would be fine with me to make one of these changes on stable before 9.2 is released.  Comments?

(file #55966, file #55967)

John W. Eaton <jwe>
Group administrator
Mon 17 Oct 2022 07:00:02 AM UTC, comment #3: 

I'm seeing the same behavior with Octave 6.4.0. So, this is not a regression.
Imho, we shouldn't block Octave 7.3.0 on this.

Changing release to dev.

Markus Mützel <mmuetzel>
Group administrator
Tue 10 May 2022 08:31:13 PM UTC, comment #2: 

Confirmed.  This applies generally as I did my test on Linux so I have changed the Operating System to "Any".

Rik <rik5>
Group administrator
Tue 10 May 2022 07:58:53 PM UTC, comment #1: 

When using the variables editor to display object "obj" created in the command window, the interpreter goes into an infinite loop of errors :


GNU Octave, version 7.1.0
Copyright (C) 1993-2022 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> addpath( "C:/Users/pierr/Documents/Photo private/Octave bugs")
>> obj = Bool_matrix_class()
obj =

  Bool_matrix_class object with properties:

      bool_matrix_prop: error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> error: octave_base_value::bool_value(): wrong type argument 'bool matrix'


PIERRE LABRECHE <pierre5018>
Tue 10 May 2022 04:12:06 PM UTC, original submission:  

Given a classdef file Bool_matrix_class.m

classdef Bool_matrix_class
  properties
    x ;
  endproperties

  methods
    function obj = Bool_matrix_class()
      obj.x = false([1 3]) ;
    endfunction
  endmethods
endclassdef


The interpreter behaves as shown below:

⃲>> obj = Bool_matrix_class()
                    obj =

                      Bool_matrix_class object with properties:

                          x: error: octave_base_value::bool_value(): wrong type argument 'bool matrix'
>> obj.x
ans =

                          0  0  0

>>


PIERRE LABRECHE <pierre5018>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pierre5018 (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    17:16 jwe StatusPatch Reviewed Ready For Test
    16:04 mmuetzel StatusConfirmed Patch Reviewed
    15:36 jwe Attached File- Added logical-properties-display-1.txt, #55966
        Attached File- Added logical-properties-display-2.txt, #55967
    2024-04-24 mmuetzel Dependencies- bugs #65633 is dependent
    2024-01-23 mmuetzel CategoryInterpreter Classdef
    2022-10-17 mmuetzel Release7.1.0 dev
    2022-05-10 rik5 StatusNone Confirmed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code