bugGNU Octave - Bugs: bug #50084, OF geometry: minDistancePoints...

 
 

bug #50084: OF geometry: minDistancePoints error when requesting three outputs

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Thu 19 Jan 2017 08:49:31 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 01 Feb 2017 05:35:00 PM UTC, comment #6: 

Thanks for the fix, closing report.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 01 Feb 2017 01:52:12 AM UTC, comment #5: 

I have fixed this issue. It was caused by faulty input argument parsing, which in turn was caused by too complicated logic.

I re-wrote the function
https://sourceforge.net/p/octave/geometry/ci/502362bc2611f143d7844461e1090095020b4ab4/


Please close this bug.

Thanks.


Juan Pablo Carbajal <juanpi>
Group Member
Mon 23 Jan 2017 09:04:08 PM UTC, comment #4: 

Sorry for the delay. I will get this sorted out soon.

Juan Pablo Carbajal <juanpi>
Group Member
Mon 23 Jan 2017 08:51:47 PM UTC, comment #3: 

No patch or solution was supplied, just an analysis.
JuanPi is the one who hopefully knows what the right fix should be.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 23 Jan 2017 05:41:41 PM UTC, comment #2: 

Confirmation from Juan is needed. I can also mark this as patch submitted, as a possible solution is given. State none was too default after quickly reviewing this bug report.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 23 Jan 2017 04:58:39 PM UTC, comment #1: 

@Kai: what info is needed?

Philip Nienhuis <philipnienhuis>
Group Member
Thu 19 Jan 2017 08:49:31 AM UTC, original submission:  

(OF geometry 2.1.1)


>> pt1 = [1  1]
pt1 =
   1   1
>> pts = [0 0; 1 0; 1 1; 0 1; 1 2]
pts =
   0   0
   1   0
   1   1
   0   1
   1   2
>> [a, b, c] = minDistancePoints (pt1, pts)
error: 'ind1' undefined near line 211 column 21
error: called from
    minDistancePoints at line 211 column 19


while

>> [a, b] = minDistancePoints (pt1, pts)
a = 0
b =  3


looks to be OK.

The bug lies in the if block at L. 186 that is skipped while in the elseif clause in L.208+ values from uninitialized variables in that skipped if block are assigned to varargout.

(package maintainer cc'd - hopefully I got his email right))

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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 juanpi (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  • -email is unavailable- added by philipnienhuis
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-01 philipnienhuis StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2017-01-22 siko1056 StatusNone Need Info
    2017-01-19 philipnienhuis Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code