Thread Locked This thread is locked - replies are not allowed.



Permlink Replies: 7 - Pages: 1 - Last Post: 19-Jun-2016 20:30 Last Post By: jGromit
jGromit

Posts: 32,928
Registered: 01/31/06
java.lang.OutOfMemoryError : Java heap space
Posted: 07-Apr-2011 04:41
If you receive this error, particularly when making an album with a very large number of images, or one with very large original images, it indicates that Java is running out of RAM. To increase the amount of memory allocated to jAlbum, choose Tools, Open Directories, Program Directory. Now close the jAlbum application, and open the jalbum.ini file in a text editor.

For 32-bit jAlbum, find the line that begins:
Virtual Machine Parameters=-Xms64M -Xmx800M ...
Change the -Xmx value from 800 to 1200 or 1600. Save the file, and launch jAlbum again.

For 64-bit jAlbum, the -Xmx value is probably already 1600, so try 2000.

(By the way, for 32-bit jAlbum, this value cannot be set higher than 2GB, including overhead. A 32-bit application can't address more memory than that. If you get an error when launching jAlbum, you have set the value too high. It may max out at 1600M, or even 1500M, depending upon your system.)

There is also a way to reduce the amount of memory the application requires. Choose Tools, Preferences, General, and reduce the Number of threads setting. This will slow down album generation, but it will demand less RAM.
MarkE

Posts: 4,583
Registered: 04/24/06
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 07-Apr-2011 07:59   in response to: jGromit in response to: jGromit
If using Console Mode, do the same thing by editing the -Xmx400M parameter to
–Xmx800M, for example.
jGromit

Posts: 32,928
Registered: 01/31/06
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 09-May-2013 18:53   in response to: jGromit in response to: jGromit
From posts by David (so blame him if it's wrong - I know nothing!):

On Mac, right click the jAlbum.app bundle and select Show package contents. Now open the Contents subfolder and double click the Info.plist file. Double click it and edit the Java section to allocate more RAM there. Look for this line (towards the bottom of the file), and change the 800M to 1200M, for example:
<string>-Xmx800M</string>
On Ubuntu, locate the file Jalbum.desktop and edit it. Look for Exec=java -Xmx800m and change that to 1200m or 1600M and save.
Laza

Posts: 9,414
Registered: 09/06/05
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 03-Jul-2013 11:56   in response to: jGromit in response to: jGromit
Here's how you can edit the Jalbum.ini file on Windows 7:

1. Press the start button, and start typing "notepad"
2. Now you'll see Notepad above, right-click -> Run as Administrator (Press "Ok" if asked).
3. Now Open the "C:\ \Program Files (x86)\jAlbum\Jalbum.ini" file (Change "Text Documents" to "All Files" right bottom)
4. Replace -Xmx800M with -Xmx1600M in the line "Virtual Machine Parameters="
5. Save
6. Restart jAlbum
Laza

Posts: 9,414
Registered: 09/06/05
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 04-Jul-2013 17:55   in response to: jGromit in response to: jGromit
This little skin does not create an album only creates the downscaled images, mitigating the risk of a memory out condition when the skin and the downscaling process both consume memory and CPU.

1. Create the album (add images, arrange folders)
2. Choose Process images only skin
3. Choose style
4. Set everything the same as you want in the final album on the skin's control panel and on the Settings / Images tab
5. Make
6. Choose Turtle
7. Make sure each and every parameter is the same as before
8. Make (Not Make All!)

This way the images will be generated first and the HTML files in the second run.

Edited by: Laza on 04-Jul-2013 17:56
jGromit

Posts: 32,928
Registered: 01/31/06
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 04-Jul-2013 18:14   in response to: Laza in response to: Laza
There's already a skin to do that. It will process only slide images, only thumbnails, or both, and can also be used to watermark the images.

http://jalbum.net/skins/skin/NoPages
davidekholm

Posts: 21,298
Registered: 10/18/02
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 07-Jul-2013 23:28   in response to: jGromit in response to: jGromit
Please also try updating to Album 11.3. It has improved memory management.
jGromit

Posts: 32,928
Registered: 01/31/06
Re: java.lang.OutOfMemoryError : Java heap space
Posted: 20-May-2015 13:56   in response to: jGromit in response to: jGromit
If your PC is running a 64-bit version of Windows, and you still encounter "out of memory" problems after increasing the -Xmx value in jalbum.ini, the next step is to install the 64-bit version of jAlbum if you're not already using it, which will allow you to assign more RAM to the process.

Uninstall jAlbum completely - use the Windows Settings > System > Apps & features option, but then also manually delete the installation directory, C:\Program Files (x86)\jAlbum.

Download the 64-bit version of jAlbum from here: http://jalbum.net/software/download/all-systems/. Choose the option labeled jAlbum for 64-bit Windows (bundled with Java).

After you've installed it, launch jAlbum and look at Help, About, Application - it should tell you that you're running the 64-bit version. The amount of RAM dedicated to the application can now be pushed to a higher number, like 2000M. Don't overdo it - assigning massive amounts of RAM to the process will actually make it less efficient. Assign enough RAM to get rid of the "out of memory" problems, but no more than that.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums