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 FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: GuillaumeOpen/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.

 

(Jump to the original submission 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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by gyom (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Jun 2016 06:31:21 PM UTCrik5Attached File-=>Added octlink.diff, #37435
    Wed 08 Jun 2016 05:42:35 PM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 08 Jun 2016 04:22:21 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1