bugGNU Octave - Bugs: bug #30377, find_in_path() Misses first...

 
 

bug #30377: find_in_path() Misses first character in path list

Submitted by:  None
Submitted on:  Wed 07 Jul 2010 08:56:41 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Octave ForgeAssigned to: None
Originator Name: Tobias KiertscherOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 08 Jul 2010 05:31:43 PM UTC, comment #5:

THat should read

pkg rebuild -noauto oct2mat
pkg unload oct2mat

Sorry
D.

David Bateman <dbateman>
Project Member
Thu 08 Jul 2010 05:01:08 PM UTC, comment #4:

The oct2mat package is useful when converting Octave code for use with matlab, so it shouldn't be used in Octave itself. Alois is overhauling the oct2mat package at the moment and hopefully this problem will go away in a future version.

For now do the following

pkg -noauto oct2mat
pkg unload oct2mat

and the oct2mat functions will be removed from your path permenantly. I'm assigning this bug to octave-forge, putting Alois in copy to this bug and closing it

D.

David Bateman <dbateman>
Project Member
Thu 08 Jul 2010 04:44:51 PM UTC, comment #3:

Yeah, the oct2mat package screws up a lot of stuff, and is biting people in the ass quite often. I think it is a real problem. What can we do to eliminate that as a problem for people who download the binary package of 3.2.4 for Windows, especially, where this seems to be the biggest problem, typically for the least experienced users?

John W. Eaton <jwe>
Project Administrator
Thu 08 Jul 2010 08:11:07 AM UTC, comment #2:

Sorry, of course its 'file_in_path' and I should have been more precise. The bug is in the file:

Octave\3.2.4_gcc-4.4.0\share\octave\packages\oct2mat-1.0.7\file_in_path.m

It seems, that the oct2mat package is overriding the build-in-function.

I'm new to bug reporting but I found this weird behavior and even a solution so I thought today is the day I can do my stint. :-)

Tobias Kiertscher <cytrek83>
Wed 07 Jul 2010 07:06:17 PM UTC, comment #1:

There doesn't appear that there is a find_in_path function in Octave. I think you mean file_in_path, which is a built-in function. I therefore don't understand your proposed change, which is in an octave syntax, where file_in_path is defined from src/utils.cc

Maybe you have another version of file_in_path that is buggy in your path. Can you tell me where file_in_path.m is located in your version of Octave? Can you tell me what "which file_in_path" returns in Octave?

D.

David Bateman <dbateman>
Project Member
Wed 07 Jul 2010 08:56:41 AM UTC, original submission:

The second line of the function find_in_path() needs to be

idx=[0 findstr(p,pathsep) length(p)+1];
~

instead of

idx=[1 findstr(p,pathsep) length(p)+1];
~

to catch the first character in p.

I found the bug while trying imread() on Windows where the pathlist is IMAGE_PATH = '.;C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\imagelib'. And because of the buggy find_in_path() imread() never find images in current directory.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by cytrek83 (Posted a comment)
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by None (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
    Thu 08 Jul 2010 05:01:08 PM UTCdbatemanStatusNeed Info=>Octave Forge
      Open/ClosedOpen=>Closed
      Carbon-Copy-=>Added -unavailable-
    Wed 07 Jul 2010 07:06:17 PM UTCdbatemanStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1