bugGNU Octave - Bugs: bug #48171, Third output argument of uiputfile...

 
 

bug #48171: Third output argument of uiputfile undefined when user presses Cancel

Submitted by:  Guillaume <gyom>
Submitted on:  Wed 08 Jun 2016 10:27:03 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Closed
Release:  dev Operating System:  Any

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)

Wed 08 Jun 2016 07:16:05 PM UTC, comment #6:

Okay, I cleaned up some of the surrounding code here (http://hg.savannah.gnu.org/hgweb/octave/rev/3ef630a564f8) but didn't bother to switch to a case statement.

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 06:47:15 PM UTC, comment #5:

The way the Qt side of the link is coded, it will never return a list with fewer than 2 elements. We could certainly make the function that calls the link object more robust to be defensive against future breakage, but at present the Qt implementation always returns a list of length >= 2.

Mike Miller <mtmiller>
Project Administrator
Wed 08 Jun 2016 06:32:27 PM UTC, comment #4:

Incidentally, there are multiple problems with the link dialogs. I'm going to file another one about the filename which is returned being incorrect.

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 06:31:21 PM UTC, comment #3:

Is there any danger that Qt will return anything other than 2,3, or 3+ elements? I coded a slightly different fix which I have attached where I initialize all the outputs to 0.0 and override as necessary based on a switch statement.

(file #37435)

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 05:42:35 PM UTC, comment #2:

Fixed on the default branch with the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/2049e123bf7b

Mike Miller <mtmiller>
Project Administrator
Wed 08 Jun 2016 04:22:21 PM UTC, comment #1:

Confirmed. Incidentally, it works if you run the cli version of Octave which does not have access to Qt by starting with '--no-gui-libs'

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 10:27:03 AM UTC, original submission:

When the user presses the Cancel button in the uiputfile window, the third output variable should be 0 but is instead undefined:

A breakpoint in the uiputfile.m function at the line calling _octave_link_file_dialog_ gives:

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37435:  octlink.diff added by rik5 (2KiB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-08 rik5 Attached File- => Added octlink.diff, #37435
    2016-06-08 mtmiller StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2016-06-08 rik5 StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.4