This article applies to earlier versions of Cortona3D RapidAuthor up to 6.0, where only 32–bit software was available.
When starting RapidGenerator, the amount of memory used is being specified. Due to the specifics of the Java platform, this value should be specified when starting the application and cannot be changed at run time. By default, it is set to 1 GB (1024 MB).
RapidGenerator uses computer memory (RAM) to store the structure of the imported project and 3D object currently being processed. After a 3D object has been processed, it is saved to disk and unloaded from memory. The project structure is being kept in memory all the time. If the specified amount of memory is not enough to store the project or shape, the importing fails with an “OutOfMemoryError” message.
Due to the specifics of the Java platform, the memory should be allocated as one contiguous block (in the virtual address space, of which 2 GB is available to applications). Various drivers and shared libraries may happen to load before Java and occupy locations in the address space, dividing contiguous blocks into smaller parts. This limits the maximum amount of memory that RapidGenerator can allocate. The actual maximum depends on the computer configuration: drivers, antiviruses etc. There is no direct correspondence with the amount of installed physical memory.
There are three kinds of memory issues in RapidGenerator. They can be solved by changing the requested amount of memory.
Not enough memory to start RapidGenerator
Symptoms: RapidGenerator does not start and shows one of the following messages:
This means that RapidGenerator can’t find a contiguous block of 1024 megabytes. To solve this issue, the memory amount that RapidGenerator is requesting should be decreased. For example, 900 megabytes, then 800 etc.
OutOfMemoryError during import
Symptoms: RapidGenerator starts normally, the user begins importing data, and after some time importing fails with an OutOfMemoryError message. The messages can be different, but there will be an OutOfMemoryError line:
This means that RapidGenerator tried to process a large 3D object requiring more than 1024 megabytes of memory. To solve this issue, the amount of memory RapidGenerator uses should be increased, for example, to 1200 or 1500 megabytes.
Errors with Excel files
Symptoms: RapidGenerator starts normally, but when importing an Excel file, the process stops with an unexpected or unknown error. For example:
This can happen if the Java module occupies so much system memory that the Excel reader module (which is external to Java) doesn’t have enough free memory to start in. To solve this issue, the memory amount that RapidGenerator is requesting should be decreased. Usually it’s enough decreasing memory by few megabytes.
Changing the amount of memory in RapidGenerator
There are two ways to change the memory amount. Each of them has advantages and disadvantages.
Method 1: registry
The needed amount of memory (in megabytes) should be specified in the system registry:
Registry folder: HKEY_CURRENT_USER\Software\ParallelGraphics\RapidGenerator\VRG
Value type: REG_SZ
Value name: memory
For example, the registry setting on this screenshot decreases the amount of memory to 800 megabytes:
This method works if RapidGenerator is started as a stand-alone application, and if RapidGenerator is launched from Rapid Tools via the “Import Data” command.
Method 2: command line
Memory can be specified in the RapidGenerator command line. For example:
RapidGenerator.exe – absolute or relative path to RapidGenerator executable
-mx – indicates that the amount of memory is specified
800 – the amount of memory, measurement units are specified by the next parameter
m – abbreviation of the memory measurement units
The following abbreviations are recognized:
without abbreviation – bytes, e.g. -mx700000000 is 700 million bytes
k – kilobytes, e.g. -mx800000k is 800 thousand kilobytes
m – megabytes, e.g. -mx900m is 900 megabytes
g – gigabytes, e.g. -mx1g is 1 gigabyte
This method works only if it is possible to change the command line. For example, it will not work when launching RapidGenerator from Rapid Tools via the “Import Data” command. On the other hand, it does not require access to the registry.