file.openAsString error when opening big files in macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

file.openAsString error when opening big files in macro

Moritz Kirschmann
Dear mailing list members,

 

I get an error when using file.openAsString to open a tiff file of 3.8 GB
running on win7. (I use it to extract metadata which is stored at the end of
the file.)

The error reads: "Error null in line XX".

With smaller files (800MB) it works like a charm. Also opening the 3.8GB
tiff file as an image just works.

 

On http://imagej.nih.gov/ij/notes.html  I found the info:

"1.47j 15 February 2013

[.]

The File.openAsString() macro function no longer has a file size limit."

 

Is there an implicit limit or is this a bug?

 

Thank you for your help in advance!

 

Best regards, Moritz

 


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: file.openAsString error when opening big files in macro

Michael Schmid
Hi Moritz,

there is a limit to Java Strings, their maximum length is 2^31-1 = 2147483647 characters. ImageJ is Java-based, so it can't go beyond that.

The line in http://imagej.nih.gov/ij/notes.html was just meant to say that the previous limit of a few thousand characters was removed.

Michael
________________________________________________________________
On Jun 29, 2015, at 11:30, Moritz Kirschmann wrote:

> Dear mailing list members,
>
>
>
> I get an error when using file.openAsString to open a tiff file of 3.8 GB
> running on win7. (I use it to extract metadata which is stored at the end of
> the file.)
>
> The error reads: "Error null in line XX".
>
> With smaller files (800MB) it works like a charm. Also opening the 3.8GB
> tiff file as an image just works.
>
>
>
> On http://imagej.nih.gov/ij/notes.html  I found the info:
>
> "1.47j 15 February 2013
>
> [.]
>
> The File.openAsString() macro function no longer has a file size limit."
>
>
>
> Is there an implicit limit or is this a bug?
>
>
>
> Thank you for your help in advance!
>
>
>
> Best regards, Moritz
>
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html