[Laszlo-dev] building from source: java.lang.OutOfMemoryError

Henry Minsky hminsky at laszlosystems.com
Tue Dec 30 12:50:09 PST 2008


This might be fixed by toggling this compiler properties flag in lps.properties


compiler.swf9.execflex=true

Setting it to true will make sure that when the flex is compiler is
invoked, it will execute in a separate
process, so it won't add to the heap size of the LPS compiler.

My JAVA_OPTS says to use max 800 MB:

badtzmaru:trunk4 hqm$ echo $JAVA_OPTS
-Xmx800m

and it compiles the LFC swf9 and swf10 without any memory overflow
though, so I wonder
if something else is wrong.

My java  version is
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)










On Tue, Dec 30, 2008 at 2:45 PM, Sarah Allen <sallen at laszlosystems.com> wrote:
> Hi all,
>
> I decided to try building trunk from source on my super cool MacBook Pro
> that I have at home running OSX 10.5.6  -- I followed all of the
> instructions on http://wiki.openlaszlo.org/SubversionBuildInstructions
>
> Everything seemed to go well except that $LPS_HOME wasn't automatically
> defined by the script, but I guessed it should be ~/src/svn/openlaszlo/trunk
>
> Then when I did ant build, I the OutOfMemoryError below.  I tried making my
> java memory really big:
> JAVA_OPTS="-Xms1024m -Xmx3072m"with no luck.
>
> Any ideas?
>
> Thanks,
> Sarah
>
> ------------------------------------------------
> Here's the complete text of the error:
>
> lzl:     [echo] Compiling
> /Users/sarah/src/svn/openlaszlo/trunk/lps/includes/lfc/LFC9-debug.swc [java]
> Executing compiler: (cd /tmp/lzswf9/lzgen33805;
> /Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/bin/compc
> -load-config=/Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/frameworks/flex-config.xml
> -compiler.show-actionscript-warnings=false
> -compiler.source-path+=/tmp/lzswf9/lzgen33805 -debug=true
> -compiler.headless-server=true -compiler.fonts.advanced-anti-aliasing=true
> -output /tmp/lzswf9/lzgen33805/app.swc -include-classes \$lzsc\$runtime
> LzDebugConsole LzBootstrapDebugConsole LzBootstrapDebugLogger
> LzBootstrapDebugService LzBootstrapMessage LzFormatter LzDebugMessage
> LzMessage LzSourceMessage LzWarning LzError LzInfo LzDebug LzDebugService
> LzAS3DebugService LzFlashRemoteDebugConsole LzDebuggerWindowConsoleBridge
> LzBacktrace LzDeclaredEventClass LzValueExpr LzInitExpr LzOnceExpr
> LzConstraintExpr LzAlwaysExpr LzStyleExpr LzStyleAttr LzStyleIdent
> LzInheritedHash LzCache LzEventable LzStyleAttrBinder PresentationType
> GenericPresentationType BooleanPresentationType NumberPresentationType
> ColorPresentationType ExpressionPresentationType SizePresentationType LzNode
> \$lzc\$class_userClassPlacement LzDelegate LzEvent LzLibraryCleanup
> LFCApplication LzIdleKernel LzSprite LzTextSprite LzInputTextSprite
> LzFontManager LzTimeKernelClass LzLibrary LzXMLParser LzXMLTranslator
> LzHTTPLoader LzMouseKernel LzBrowserKernel LzKeyboardKernelClass
> LzScreenKernel LzContextMenuKernel LzContextMenuItemKernel LzAudioKernel
> LzAsset DojoExternalInterfaceClass LzView LzText LzInputText LzViewLinkage
> LzCanvas LzScript LzAnimatorGroup LzAnimator LzLayout LzFont
> LzSelectionManager LzDataSelectionManager LzCommand LzState LzDataNodeMixin
> LzDataNode LzDataElementMixin LzDataElement LzDataText LzDataRequest
> LzDataProvider LzHTTPDataRequest LzHTTPDataProvider LzDataset
> __LzHttpDatasetPoolClass LzDatapointer LzParam LzParsedPath
> AnonDatasetGenerator LzDatapath LzReplicationManager LzRefNode
> LzDataAttrBind LzLazyReplicationManager LzResizeReplicationManager
> LzColorUtilsWrapperClass LzColorUtils LzUtilsClass LzInstantiatorService
> LzGlobalMouseService LzBrowserService LzContextMenu LzContextMenuItem
> LzModeManagerService LzCursorService LzURL LzKeysService LzAudioService
> LzHistoryService LzTrackService LzIdleService LzCSSStyleRule LzCSSStyleClass
> LzCSSStyleDeclaration LzStyleSheet LzCSSStyleSheet LzFocusService
> LzTimerService \$lzsc\$mixin\$LzDataNodeMixin\$LzNode
> \$lzsc\$mixin\$LzFormatter\$LzBootstrapDebugService
> \$lzsc\$mixin\$LzDataElementMixin\$LzDataNodeMixin\$LzNode
> \$lzsc\$mixin\$LzDataNodeMixin\$LzDataNode
> \$lzsc\$mixin\$LzDataElementMixin\$LzDataNodeMixin\$LzDataNode
> \$lzsc\$mixin\$LzFormatter\$LzView LzCSSStyle \$dhtml canvas \$swf7 \$swf8 _
> LzDeclaredEvent \$svg LzKeyboardKernel global LzTimeKernel __ES3Globals
> \$reportUndefinedMethod \$reportNotFunction LzUtils \$profile \$runtime
> \$swf10 __LzDebug \$reportSourceWarning Debug \$debug __ \$j2me \$as3 \$js1
> \$modules \$as2 ___ globalValue \$reportUndefinedVariable
> DojoExternalInterface LzHttpDatasetPool \$swf9 \$reportUndefinedProperty lz
> LzResourceLibrary \$reportUndefinedObjectProperty _Copyright)     [java]
> compiler output is Loading configuration file
> /Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/frameworks/flex-config.xml
> [java] Stray error string from external compiler:      [java] compiler
> output:     [java] Loading configuration file
> /Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/frameworks/flex-config.xml
> [java] SEVERE ERROR: Error: Java heap space     [java] SEVERE ERROR:
> java.lang.OutOfMemoryError: Java heap space     [java] FAIL: compiler
> returned 1     [java] Done executing compiler     [java] Intermediate file
> /tmp/lzswf9/lzgen33805/app.swc: does not exist     [java] Exception
> compiling scriptfile: org.openlaszlo.sc.CompilerError: SEVERE ERROR: Error:
> Java heap space     [java] SEVERE ERROR: java.lang.OutOfMemoryError: Java
> heap space     [java] org.openlaszlo.sc.CompilerException:
> org.openlaszlo.sc.CompilerError: SEVERE ERROR: Error: Java heap space
> [java] SEVERE ERROR: java.lang.OutOfMemoryError: Java heap space     [java]
>  at org.openlaszlo.sc.Compiler.compile(Compiler.java:401)     [java]
>  at org.openlaszlo.sc.lzsc.compile(lzsc.java:110)     [java]        at
> org.openlaszlo.sc.lzsc.compile(lzsc.java:325)     [java]        at
> org.openlaszlo.sc.Main.main(Main.java:10)     [java] Compilation
> aborted.BUILD FAILED/Users/sarah/src/svn/openlaszlo/trunk/build.xml:608: The
> following error occurred while executing this
> line:/Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/lps/lfc/build.xml:132:
> The following error occurred while executing this
> line:/Users/sarah/src/svn/openlaszlo/trunk/WEB-INF/lps/lfc/build.xml:84:
> Java returned: 1
>



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com


More information about the Laszlo-dev mailing list