bugGNU Octave - Bugs: bug #60144, output struct not always defined

 
 

bug #60144: output struct not always defined

Submitter:  Jim Van Zandt <vanzandtj>
Submitted:  Mon 01 Mar 2021 01:26:13 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Mar 2021 05:47:40 PM UTC, comment #2: 

I checked in the fix on the stable branch here: http://hg.savannah.gnu.org/hgweb/octave/rev/ce425b657693.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 01 Mar 2021 05:18:11 AM UTC, comment #1: 

Confirmed.  In fact, there is also a fifth possible output, fjac, which is also not set if an output function stops fsolve in the initialization procedure.  If I add


fjac = NaN;


at fsolve.m:261 then this case also passes.

Would you like to be credited in the Mercurial Changelog and in the list of contributors at the start of the Octave manual, or do you want me to just check in the patch under my credentials?

Rik <rik5>
Group administrator
Mon 01 Mar 2021 01:26:13 AM UTC, original submission:  

fsolve is called with four outputs and an output function stops it, an error is generated because the fourth output is never set.

The first attachment is a function that exercises the bug.  Its output is:
octave:8> stop_bug_demo
respects output function stop flag...error: 'output' undefined near line 177, column 177
error: called from
    fsolve at line 258 column 7
    stop_bug_demo at line 17 column 26

The second attachment is a simple patch that fixes the bug.


Jim Van Zandt <vanzandtj>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50952:  stop_bug_demo.m added by vanzandtj (2KiB - text/x-objcsrc)
file #50953:  output-patch added by vanzandtj (643B - application/octet-stream)

 

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 vanzandtj (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-01 rik5 StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2021-03-01 rik5 Item GroupNone Unexpected Error or Warning
        StatusConfirmed Patch Reviewed
        Release6.1.0 6.2.0
    2021-03-01 rik5 StatusNone Confirmed
    2021-03-01 vanzandtj Attached File- Added stop_bug_demo.m, #50952
        Attached File- Added output-patch, #50953

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code