bugGNU Octave - Bugs: bug #46455, Input bug for .m function

 
 

bug #46455: Input bug for .m function

Submitter:  andrefou <andreff92>
Submitted:  Mon 16 Nov 2015 10:57:08 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Need Info Assigned to:  None
Originator Name:  Andre F Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 25 Nov 2015 10:53:19 AM UTC, comment #4: 

Sorry for not answering earlier.
I create a new ticket since this one is closed and don't see how to re-open it.

andrefou <andreff92>
Wed 25 Nov 2015 10:51:04 AM UTC, comment #3: 


Here is the script herebelow,
The problem seems to be related to the function "babu" that I am using. When I use a string paameter to any function (can be "babu" or anything else), the problem occurs. Looks like a memory issue. Do you see anything wrong with what I am doing here.
I understand that in octave all function parameters are passed by value

I also tried
    essai1=babu('/home/andre/clone/search-workers/image-processing/algo/set_of_images/testsethamed/Images/3.jpg');

----------------------------
function loaded = image_loader(s)
%let the user launch some matlab functions on the set of pictures realized by hamed

l={1;2;6;9;10;12;14;15;17;19;20;21;25;26;28;29;35;44;50;57;58;59;60;61;62;63;64;65;66;67;68;69;70;71;72;73;74;75;76;77;78;79;80;81;82;83;84;85;86;87;88};

for i =1:51
    a=l{[i,1]};
    text=sprintf('/home/andre/clone/search-workers/image-processing/algo/set_of_images/testsethamed/Images/%d.jpg',a);
    essai1=babu(text);
    disp(essai1)
end
loaded=1;

-------------------------------
function Quality=babu(img)
im=imread(img);

if length(size(im))>2
y=rgb2gray(im);
else
y=im;
end

andrefou <andreff92>
Tue 24 Nov 2015 11:53:12 PM UTC, comment #2: 

No response.  Closing report.

Rik <rik5>
Group administrator
Tue 17 Nov 2015 05:26:21 PM UTC, comment #1: 

Can you upload the m-file you are using and the exact sequence at the command line that triggers the bug so that others can try to duplicate this.  It's too vague right now for me to decide what is going on.

Rik <rik5>
Group administrator
Mon 16 Nov 2015 10:57:08 AM UTC, original submission:  

Hello,
My issue is linked with my build system, For some reason when I try on some function.m file
result=function('a String')
the function returns  A(I): index out of bounds; value %% out of bound %%

But if the result do not depend on the input
result=function(a number)
would work and
result=function('a String')
wouldnt with the same error  A(I): index out of bounds triggered.

Moreover, I can also avoid the error by changing the name of the function and function file by for example call the function function1 and then
result=function1('a String')
would work

So it is like my build is related to the issue and randomly create errors on some functions that take string in input(it could be some random function with random names). I reinstalled octave multiple time and it didn t change anything.
Any idea on what part of octave on an ubuntu system could be related to this kind of bug?
Thank you,
Andre Fougeront

andrefou <andreff92>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by andreff92 (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-24 rik5 Open/ClosedOpen Closed
    2015-11-17 rik5 CategoryConfiguration and Build System Interpreter
        Item GroupInstallation Failure Other
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code