Some of our testers using the Install4j installers that we produce, are receiving an OurOfMemoryError part way through the process. After a closer inspection, we've narrowed it down to the .install4j/files.log file that Install4j generates. The cumulative entries in this file from all the installers that they run has caused the file to grow larger than 27mb.
My question is what can I do to manage this file so that I don't have this OutOfMemoryError occur anymore? Do I simply have to clear it before every install, or is there a way I can override it to not generate anything at all?
As an alternative, is there any reason I couldn't or shouldn't just delete the .install4j directory?
Here is the stacktrace leading up to the OutOfMemoryError.
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.StringValue.from(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at java.io.Win32FileSystem.resolve(Unknown Source)
at java.io.File.<init>(Unknown Source)
at com.install4j.runtime.installer.helper.fileinst.FileLogger.readEntries(Unknown Source)
at com.install4j.runtime.installer.helper.fileinst.FileLogger.read(Unknown Source)
at com.install4j.runtime.installer.helper.fileinst.MainFileInstallerState.setLogDir(Unknown Source)
at com.install4j.runtime.installer.helper.fileinst.FileInstaller.setLogDir(Unknown Source)
at com.install4j.runtime.beans.actions.InstallFilesAction.install(Unknown Source)
at com.install4j.runtime.installer.InstallerContextImpl$2.fetchValue(Unknown Source)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(Unknown Source)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionDirect(Unknown Source)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionInt(Unknown Source)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionChecked(Unknown Source)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.fetchObjectChecked(Unknown Source)
at com.install4j.runtime.installer.InstallerContextImpl.performActionIntStatic(Unknown Source)
at com.install4j.runtime.installer.InstallerContextImpl.performActionInt(Unknown Source)
at com.install4j.runtime.installer.ContextImpl.performAction(Unknown Source)
at com.install4j.runtime.installer.controller.Controller.executeActions(Unknown Source)
at com.install4j.runtime.installer.controller.Controller.handleCommand(Unknown Source)
at com.install4j.runtime.installer.controller.Controller.start(Unknown Source)
at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
On the "Installer->Screens & Actions" step, select the installer and add
-Xmx512m
to the "VM parameters" property. If that does not help add -XX:+HeapDumpOnOutOfMemoryError
and post the zipped HPROF snapshot.