bugGNU Octave - Bugs: bug #38128, Overloaded vercat() not called in...


bug #38128: Overloaded vercat() not called in some cases

Submitted by:  None
Submitted on:  Sun 20 Jan 2013 09:35:29 PM UTC  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Julien BectOriginator Email: -email is unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Thu 28 Feb 2013 04:42:36 PM UTC, comment #10:

Thanks, I merged your addendum:


Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu 28 Feb 2013 08:03:10 AM UTC, comment #9:

Oops, sorry... here is the patch

(file #27541)

Julien Bect <jbect>
Thu 28 Feb 2013 08:02:42 AM UTC, comment #8:

Here is a patch for the bug number in classes.tst.

Julien Bect <jbect>
Wed 27 Feb 2013 08:20:51 PM UTC, comment #7:

I have pushed and merged your change:


I noticed your commit message doesn't mention the bug number. I had to hunt around to find it. :-/

The bug number you refer to in classes.tst (38170) also seems to be wrong and is pointing at an unrelated problem.

Can you please fix that?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Tue 26 Feb 2013 01:45:03 PM UTC, comment #6:

Here is a minor update of my patch (rebased and tested).

(file #27533)

Julien Bect <jbect>
Thu 21 Feb 2013 03:56:07 PM UTC, comment #5:

I just found out that the same problem was already exhibited (although not advertised in the comments) by the example file #24630 attached to bug #35118.

Julien Bect <jbect>
Mon 11 Feb 2013 07:57:06 PM UTC, comment #4:

Here is the same patch with test_classes.m renamed to classes.tst.

(file #27444)

Julien Bect <jbect>
Fri 08 Feb 2013 07:57:27 AM UTC, comment #3:

A few tests concerning classes and concatenation are located test/class-concat (added by JWE in Nov 2011).

In the patch that I just posted, I have added my own tests in test/classes/test_classes.m.

Should I move my concatenation tests into test/class-concat, or rather merge the old tests from test/class-concat into test/classes/test_classes.m ?

[Note: this was originally discussed on the maintainer mailing-list, http://octave.1599824.n4.nabble.com/Tracking-bug-38128-Overloaded-vertcat-not-called-in-some-cases-td4649193.html]

Julien Bect <jbect>
Fri 08 Feb 2013 07:51:49 AM UTC, comment #2:

The attached patch seems to fix the problem.

I have added a few tests in test/classes/test_classes.m, to check that vertical and horizontal concatenation still work in the case where nothing is overloaded.

[Note: this was initially posted on the patch tracker, see patch #7935. Mea culpa.]

(file #27422)

Julien Bect <jbect>
Sat 26 Jan 2013 01:14:17 PM UTC, comment #1:

horzcat() is affected by the exact same problem

Julien Bect <jbect>
Sun 20 Jan 2013 09:35:29 PM UTC, original submission:

Let us consider a class @A, with the following constructor:

and the following overload vertcat function:

The following script illustrates the problem:

It seems that the overloaded vertcat function is only called when both arguments are class A objects.

I would expect it to be called as soon as one of the two arguments is of class A (this is what happens, for instance, with an overloaded plus() function).

The problem has been observed in Octave 3.6.2 (Ubuntu 12.10 install) and 3.6.4-rc1 (built from branch stable, revision 7ad3eea8a3af).

Attachment: test script + @A class directory.



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

Attach File(s):

Attached Files
file #27533:  jbFixObjConcatProblem3.patch added by jbect (3KiB - text/x-patch)
file #27444:  jbFixObjConcatProblem2.patch added by jbect (3KiB - text/x-patch)
file #27422:  jbFixObjConcatProblem.patch added by jbect (3KiB - text/x-patch)
file #27305:  octaveVertcatIssue.zip added by None (2KiB - application/zip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by jbect (Posted a comment)
  • -email is unavailable- added by None (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 28 Feb 2013 08:03:10 AM UTCjbectAttached File-=>Added jbFixObjConcatProblem3Addendum.patch, #27541
    Wed 27 Feb 2013 08:20:51 PM UTCjordighStatusPatch Submitted=>Fixed
    Tue 26 Feb 2013 01:45:03 PM UTCjbectAttached File-=>Added jbFixObjConcatProblem3.patch, #27533
    Mon 11 Feb 2013 07:57:06 PM UTCjbectAttached File-=>Added jbFixObjConcatProblem2.patch, #27444
    Fri 08 Feb 2013 02:09:32 PM UTCjordighStatusNone=>Patch Submitted
    Fri 08 Feb 2013 07:51:49 AM UTCjbectAttached File-=>Added jbFixObjConcatProblem.patch, #27422
    Sun 20 Jan 2013 09:35:29 PM UTCNoneAttached File-=>Added octaveVertcatIssue.zip, #27305

    Back to the top

    Powered by Savane 3.1-cleanup1