bugGNU Octave - Bugs: bug #54318, inputParser parse error for struct...


bug #54318: inputParser parse error for struct with no fields

Submitter:  None
Submitted:  Mon 16 Jul 2018 02:16:52 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Lucas Jeub Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.0
Operating System:  * Mac OS Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 16 Jul 2018 07:35:47 PM UTC, comment #1: 


I patched the stable branch of Octave here (https://hg.savannah.gnu.org/hgweb/octave/rev/a0d642f24349), but it may not make it in to the 4.4.1 bug fix release which just started.  You can always patch your own local copy of inputParser.m since the fix is only three lines.

Rik <rik5>
Group administrator
Mon 16 Jul 2018 02:16:52 PM UTC, original submission:  

Using the struct expansion feature of inputParser with a struct with no fields as input produces an error instead of returning default values in Results.

To reproduce the problem consider the following minimal example:

test = inputParser();
addParameter(test, 'param', 1)
parse(test, struct())

which produces the following error:

error: non-string for Parameter name or Switch
error: called from
    error at line 553 column 7
    parse at line 459 column 11



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

Attach Files:

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 rik5 (Posted a comment)
  • -email is unavailable- added by None (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-16 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code