bugGNU Octave - Bugs: bug #38261, fdisp not called for objects...


bug #38261: fdisp not called for objects stored in structs or cell arrays

Submitted by:  John W. Eaton <jwe>
Submitted on:  Tue 05 Feb 2013 04:20:24 AM UTC  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: jweOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

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


Tue 15 Aug 2017 05:08:30 PM UTC, comment #4:

Yes, this bug is now resolved on the default branch.

The original example is now affected by bug #50756, where only the name of the class is displayed when it is in a cell array or a struct.

Mike Miller <mtmiller>
Project Administrator
Tue 15 Aug 2017 06:50:19 AM UTC, comment #3:

Checking with hg id 23915:adf580507691 and this seems to work now. Could someone else verify that and close this report?

Rik <rik5>
Project Administrator
Sat 19 Nov 2016 11:08:36 PM UTC, comment #2:

This bug is still present in Octave 4.2.0.

(The resulting file "foo.out" from comment #0 still has no string "foo" in it.)

Hartmut <hardy>
Fri 08 Feb 2013 06:26:31 PM UTC, comment #1:

I just verified that direct overloads of disp() or fdisp() are called by the interpreter so that part seems to be working correctly.

It seems the issue is really in the C++ code that has to loop over a data structure and display each element. That routine, which I haven't looked for in the code yet, must just be calling the ordinary print on each element in the data structure.

Rik <rik5>
Project Administrator
Tue 05 Feb 2013 04:20:24 AM UTC, original submission:

Given the following simple (old-style) class definition and overloaded methods:

(For ease of duplicating the problem, a tar file with these functions is attached).

fdisp is not called as one might expect when an object of class foo is stored in a struct or cell array:

This bug is why we are currently seeing output from the tests that were recently added for concatenation of class objects with built-in types.

Further, I suspect that display and disp are not called by the interpreter as described in the Matlab documentation.

John W. Eaton <jwe>
Project Administrator


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

Attach File(s):

Attached Files
file #27390:  @foo.tar added by jwe (10KiB - application/x-tar)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Aug 2017 05:08:30 PM UTCmtmillerStatusWorks For Me=>Fixed
    Tue 15 Aug 2017 06:50:19 AM UTCrik5StatusNone=>Works For Me
    Fri 08 Feb 2013 06:07:05 PM UTCrik5Dependencies-=>bugs #38286 is dependent
    Tue 05 Feb 2013 04:20:24 AM UTCjweAttached File-=>Added @foo.tar, #27390

    Back to the top

    Powered by Savane 3.1-cleanup1