bugGNU Octave - Bugs: bug #47378, When we create a repetitive .xlsx...

 
 

bug #47378: When we create a repetitive .xlsx file we use all resource (memory?)

Submitter:  None
Submitted:  Thu 10 Mar 2016 08:09:05 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Paolo Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 10 Mar 2016 09:06:53 PM UTC, comment #5: 

Somewhere in the code a file handle wasn't closed. Fixed here:
http://hg.code.sf.net/p/octave/io/rev/26b9a8c7ff76
(...just in time for io-2.4.1 release.)

Thanks for reporting, closing report.

Philip Nienhuis <philipnienhuis>
Group Member
Thu 10 Mar 2016 08:11:41 PM UTC, comment #4: 

Thanks,
I'll have a look.

Philip Nienhuis <philipnienhuis>
Group Member
Thu 10 Mar 2016 05:22:49 PM UTC, comment #3: 

His example showed up in email but not here. Reposted below.


clear
more off
for j=1:(2000)
        % extract file's name
        name=dec2hex(j);
        my_path=strcat(name,'.xlsx');
        % save data into file
        data=[j,j*2,j*3];
        xlswrite(my_path,data);
  j
end

and here the problem after some loops:
j =  397
j =  398
j =  399
j =  400
j =  401
j =  402
error: fprintf: invalid stream number = -1
error: called from
    __OCT_oct2xlsx__>__OCT_oct2xlsx_sh__ at line 353 column 3
    __OCT_oct2xlsx__ at line 125 column 16
    __OCT_oct2spsh__ at line 72 column 18
    oct2xls at line 181 column 18
    xlswrite at line 197 column 20
    Test at line 9 column 2


Anonymous
Thu 10 Mar 2016 05:20:52 PM UTC, comment #2: 

The example was eaten by savannah, here it is (pasted from email):


clear
more off
for j=1:(2000)
        % extract file's name
        name=dec2hex(j);
        my_path=strcat(name,'.xlsx');
        % save data into file
        data=[j,j*2,j*3];
        xlswrite(my_path,data);
  j
end

and here the problem after some loops:
j =  397
j =  398
j =  399
j =  400
j =  401
j =  402
error: fprintf: invalid stream number = -1
error: called from
    __OCT_oct2xlsx__>__OCT_oct2xlsx_sh__ at line 353 column 3
    __OCT_oct2xlsx__ at line 125 column 16
    __OCT_oct2spsh__ at line 72 column 18
    oct2xls at line 181 column 18
    xlswrite at line 197 column 20
    Test at line 9 column 2


Mike Miller <mtmiller>
Group Member
Thu 10 Mar 2016 04:35:35 PM UTC, comment #1: 

Where's the example?

Philip Nienhuis <philipnienhuis>
Group Member
Thu 10 Mar 2016 08:09:05 AM UTC, original submission:  

I use pkg io-2.4.0
If i run multiple generator .xlsx file after some run we have an error.
After error is necessary close octave.
An other things that I see is that Octave generate in users temporary files a large amount of oct-... files (every loop generate 1 file) and don't delete after close.
Here the example that can generate the problem:


clear
more off
for j=1:(2000)
        % extract file's name
        name=dec2hex(j);
        my_path=strcat(name,'.xlsx');
        % save data into file
        data=[j,j*2,j*3];
        xlswrite(my_path,data);
  j
end

and here the problem after some loops:
j =  397
j =  398
j =  399
j =  400
j =  401
j =  402
error: fprintf: invalid stream number = -1
error: called from
    __OCT_oct2xlsx__>__OCT_oct2xlsx_sh__ at line 353 column 3
    __OCT_oct2xlsx__ at line 125 column 16
    __OCT_oct2spsh__ at line 72 column 18
    oct2xls at line 181 column 18
    xlswrite at line 197 column 20
    Test at line 9 column 2
>>

Anonymous

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by None (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-10 philipnienhuis StatusNone Fixed
        Assigned toNone philipnienhuis
        Open/ClosedOpen Closed
        Release4.0.0 other
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code