Ok. I just switch the 5th image (in the zip file) that troubles me... and ...
the outOfMemiry error ... is gone.
I will try right away to add -Xmx256M  as you said. Tell you reight away.
Thanks Paul.

Thierry


-------Message original-------

De : Discussion list for Java 3D API
Date : 10/20/04 18:52:10
A : [EMAIL PROTECTED]
Sujet : Re: [JAVA3D] OutOfMemory with aTextureLoader.getImage();

Thierry Milard wrote:

>Hello java3D friends.
>I happened to be stuck in a OutOfMemory error when I read an image file with a
>Texture loader.
>Description
>- I have a lot of Memory availlable on my machine. I mean it's not a physical
>memory problem.
>- My 10 images/jpeg files are stored in a zip file and are read all at once.
>- I get a memory error on the fifth image. God knows why
>- I tested my program with another zip file (different images).... bigger ones
>... and I had no memory error (?).
>
>
Have you assigned the JVM a larger maximum heap than the default
(generally 128MB?).  Try adding -Xmx256M to give it twice as much
maximum memory, etc..  If another set of images loads fine by default,
there may be a difference in how well they are compressed, or the number
of colours, who knows, that tip those particular images over the top
while the others are okay.

>Strange no ? If you have an hint.
>Thierry, Paris
>
>Ps: Here is a bit of the code;
>
>            ZipEntry inputEntry = zipFileDatas.getEntry(nomTexture);
>            InputStream inputStream = zipFileDatas.getInputStream(inputEntry);
>            BufferedImage uneBuffImg = ImageIO.read(inputStream);
>            TextureLoader textLoad = new TextureLoader(uneBuffImg);
>
>            //This bloody line gives me grey hair:
>            ImageComponent2D textImage = textLoad.getImage();
>
>            Texture2D texture = new Texture2D(......, textImage);
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to