You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by simon gladman <sg...@gmail.com> on 2013/07/08 15:51:54 UTC

Weird Issues With Flex Project

Hi All,

I have a project which is making FlashBuilder with the
latest Apache Flex behave very oddly.

The attached project is actually a rebuilt version of a previous one. When
I first started coding, it was fine, then suddenly I start getting *Java
heap space* errors and FB stops working. Interestingly, the first FXP
export is only 3.8MB but after the heap space errors, the FXP export jumps
up to 135MB (!).

I've done loads of stuff with workers without any problems. I can't see
what's different about this.

Any suggestions appreciated. The smaller FXP is here:
www.flexmonkey.co.uk/x_SwarmChemistry2.fxp


Thanks,

Simon

-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
It turns out that the 'Java Heap Space' error isn't an  mxmlc
issue. Frédéric THOMAS (@webDoubleFx) very kindly run some tests earlier.
The error only happens in FlashBuilder 4.7. In FB4.6 and IntelliJ it
compiles without any problems whatsoever - all using the same 4.9.1
compiler.

An Adobe issue I think :)

I will try to find some time to do some more tests over the weekend
comparing *Math.sqrt() *in mxmlc versus the ASC2.0 that's bundled with the
new AIR.

Thanks again to Frédéric if he's reading :)

Simon


On 9 July 2013 09:05, Simon Gladman <sg...@gmail.com> wrote:

> Cheers Alex.
>
> I'll create that bug report over the next few days.
>
> Simon
>
> *_________________________*
> *+44 (0) 7973 669691*
> *sgladman@gmail.com*
> *http://flexmonkey.blogspot.com/*
>
> On 9 Jul 2013, at 01:56, Alex Harui <ah...@adobe.com> wrote:
>
>
>
> On 7/8/13 4:05 PM, "simon gladman" <sg...@gmail.com> wrote:
>
> I've moved the project to a pure ActionScript 3 project and it works fine
>
> -
>
> compiling in a fraction of the time that the MXML compiler does.
>
>
> Also, under Flex, *Math.sqrt()* runs like a dog inside Workers. I had to
>
> pre-calculate square roots and put them in a look up array. Under the AIR
>
> 3.7 (with ASC2) compiler, it runs far, far quicker.
>
> Interesting.  Maybe file a bug with both SWFs so we can compare the
> results.
>
>
> Any news on Apache Flex using ASC2?
>
> We've got a lot of work ahead of us before that happens, and not enough
> folks who have time to do that work.
>
> -Alex
>
>


-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by Simon Gladman <sg...@gmail.com>.
Cheers Alex. 

I'll create that bug report over the next few days. 

Simon

_________________________
+44 (0) 7973 669691
sgladman@gmail.com
http://flexmonkey.blogspot.com/

On 9 Jul 2013, at 01:56, Alex Harui <ah...@adobe.com> wrote:

> 
> 
> On 7/8/13 4:05 PM, "simon gladman" <sg...@gmail.com> wrote:
> 
>> I've moved the project to a pure ActionScript 3 project and it works fine
>> -
>> compiling in a fraction of the time that the MXML compiler does.
>> 
>> Also, under Flex, *Math.sqrt()* runs like a dog inside Workers. I had to
>> pre-calculate square roots and put them in a look up array. Under the AIR
>> 3.7 (with ASC2) compiler, it runs far, far quicker.
> Interesting.  Maybe file a bug with both SWFs so we can compare the
> results.
>> 
>> Any news on Apache Flex using ASC2?
> We've got a lot of work ahead of us before that happens, and not enough
> folks who have time to do that work.
> 
> -Alex
> 

Re: Weird Issues With Flex Project

Posted by Alex Harui <ah...@adobe.com>.

On 7/8/13 4:05 PM, "simon gladman" <sg...@gmail.com> wrote:

>I've moved the project to a pure ActionScript 3 project and it works fine
>-
>compiling in a fraction of the time that the MXML compiler does.
>
>Also, under Flex, *Math.sqrt()* runs like a dog inside Workers. I had to
>pre-calculate square roots and put them in a look up array. Under the AIR
>3.7 (with ASC2) compiler, it runs far, far quicker.
Interesting.  Maybe file a bug with both SWFs so we can compare the
results.
>
>Any news on Apache Flex using ASC2?
We've got a lot of work ahead of us before that happens, and not enough
folks who have time to do that work.

-Alex


Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
I've moved the project to a pure ActionScript 3 project and it works fine -
compiling in a fraction of the time that the MXML compiler does.

Also, under Flex, *Math.sqrt()* runs like a dog inside Workers. I had to
pre-calculate square roots and put them in a look up array. Under the AIR
3.7 (with ASC2) compiler, it runs far, far quicker.

Any news on Apache Flex using ASC2?

Simon


On 8 July 2013 18:05, simon gladman <sg...@gmail.com> wrote:

> Yep - fully cleaned. In fact, I recreated the project and added in the
> text from the classes by hand.
>
> The embedded SWFs are AS Workers. It seems to be the renderer worker
> that's causing issues - I have no idea why, it's quite innocuous and I've
> had projects before using three or four embedded workers.
>
> I haven't tried from the command line - I'm off out in a minute, I'll try
> later.
>
> Thanks,
>
> Simon
>
>
> On 8 July 2013 17:48, Alex Harui <ah...@adobe.com> wrote:
>
>> I assume you tried a full clean of all projects?  And closed all unrelated
>> projects in that workspace?
>>
>> It looks like the error log says it fails when trying to embed a SWF.  Do
>> you have any embedded SWFs in the project?
>>
>> Can you build the project manually using MXMLC or ANT from the
>> command-line?  You may need to change the VM args in the MXMLC scripts or
>> batch files to get it to work.  If it fails when manually building we can
>> try getting a debugger on the compiler.
>>
>> -Alex
>>
>> On 7/8/13 9:35 AM, "simon gladman" <sg...@gmail.com> wrote:
>>
>> >Thanks Timothy,
>> >
>> >I'm back to:
>> >
>> >-Xms512m
>> >-Xmx1024m
>> >-XX:MaxPermSize=512m
>> >-XX:PermSize=256m
>> >
>> >The monitor shows that the heap size grows with each compile and when it
>> >reaches approx 1GB (with used around 430MB), Flash Builder crashes.
>> >
>> >Other projects in the same workspace including ones with more worker
>> SWF's
>> >and more code never exceed  588,906,496 B of heap. Something about my
>> >swarm
>> >chemistry project is getting the heap to 1,073,741,824 B.
>> >
>> >Maybe it's the 'chemistry' part!
>> >
>> >simon
>> >
>> >
>> >
>> >On 8 July 2013 16:53, Timothy Jones <Ti...@syniverse.com> wrote:
>> >
>> >> You definitely wouldn't need the -Xms1024m (stack size).  In fact, that
>> >> one might be hurting you.
>> >>
>> >> You can run JVisualVM to monitor the usage of the different areas of
>> JVM
>> >> memory.  That's takes the guesswork out of the picture.
>> >> I would also put MaxPermSize to be larger than PermSize (and actually,
>> >>you
>> >> can take that one down).
>> >> HTH.
>> >>
>> >>
>> >> tlj
>> >>
>> >> -----Original Message-----
>> >> From: simon gladman [mailto:sgladman@gmail.com]
>> >> Sent: Monday, July 08, 2013 11:12 AM
>> >> To: users@flex.apache.org
>> >> Subject: Re: Weird Issues With Flex Project
>> >>
>> >> I've tried all sorts. Currently using:
>> >>
>> >> *-Xms1024m*
>> >> *-Xmx2048m*
>> >> *-XX:MaxPermSize=512m*
>> >> *-XX:PermSize=512m*
>> >>
>> >> Simon
>> >>
>> >>
>> >> On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:
>> >>
>> >> > Have you tried increasing available heap?
>> >> >
>> >> >
>> http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-b
>> >> > uilde
>> >> > r-4-6
>> >> >
>> >> > On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
>> >> >
>> >> > >Thanks Alex,
>> >> > >
>> >> > >Flash Builder 4.7 (latest version - I uninstalled and reinstalled
>> >> > >earlier), the SDK is 4.9.1 (1447119). The logs says...
>> >> > >
>> >> > >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889*
>> *!MESSAGE
>> >> > >An internal error occurred during: "Building workspace".* *!STACK 0*
>> >> > >*java.lang.OutOfMemoryError: Java heap space*
>> >> > >* at java.util.Arrays.copyOf(Arrays.java:2786)*
>> >> > >* at
>> >> > >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
>> >> > >* at
>> flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
>> >> > >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
>> >> > >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
>> >> > >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
>> >> > >* at
>> flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
>> >> > >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
>> >> > >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
>> >> > >* at
>> >> >
>> >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922
>> >> > >)*
>> >> > >* at
>> >> >
>> >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore
>> >> > >.java
>> >> > >:875)
>> >> > >*
>> >> > >* at
>> >> >
>> >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStor
>> >> > >e.jav
>> >> > >a:662)
>> >> > >*
>> >> > >* at
>> >> > >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
>> >> > >* at
>> >> >
>> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
>> >> > >766)*
>> >> > >* at
>> >> >
>> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
>> >> > >741)*
>> >> > >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
>> >> > >* at flex2.tools.oem.Application.save(Application.java:619)*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(
>> >> > >ASBui
>> >> > >lder.java:870)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveSt
>> >> > >ate(A
>> >> > >SItemBuilder.java:119)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOlde
>> >> > >stBui
>> >> > >lder(BuilderManager.java:171)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Buil
>> >> > >derMa
>> >> > >nager.java:199)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
>> >> > >r.pre
>> >> > >Build(FlexIncrementalBuilder.java:464)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> >> > >ildIt
>> >> > >em(FlexProjectBuilder.java:705)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> >> > >ildWo
>> >> > >rkers(FlexProjectBuilder.java:592)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> >> > >ild(F
>> >> > >lexProjectBuilder.java:406)
>> >> > >*
>> >> > >* at
>> >> >
>> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
>> >> > >r.bui
>> >> > >ld(FlexIncrementalBuilder.java:171)
>> >> > >*
>> >> > >* at
>> >> >
>> >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
>> >> > >:728)
>> >> > >*
>> >> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>> >> > >* at
>> >> >
>> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
>> >> > >.java
>> >> > >:199)
>> >> > >*
>> >> > >* at
>> >> >
>> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
>> >> > >.java
>> >> > >:239)
>> >> > >*
>> >> > >* at
>> >> >
>> >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
>> >> > >:292)
>> >> > >*
>> >> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>> >> > >
>> >> > >Simon
>> >> > >
>> >> > >
>> >> > >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
>> >> > >
>> >> > >> Which exact versions of FlashBuilder and Apache Flex?
>> >> > >>
>> >> > >> What does the FlashBuilder log have to say?
>> >> > >>
>> >> > >> -Alex
>> >> > >>
>> >> > >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
>> >> > >>
>> >> > >> >Hi All,
>> >> > >> >
>> >> > >> >I have a project which is making FlashBuilder with the latest
>> >> > >> >Apache Flex behave very oddly.
>> >> > >> >
>> >> > >> >The attached project is actually a rebuilt version of a previous
>> >>one.
>> >> > >>When
>> >> > >> >I first started coding, it was fine, then suddenly I start
>> getting
>> >> > >>*Java
>> >> > >> >heap space* errors and FB stops working. Interestingly, the first
>> >> > >> >FXP export is only 3.8MB but after the heap space errors, the FXP
>> >> > >> >export
>> >> > >>jumps
>> >> > >> >up to 135MB (!).
>> >> > >> >
>> >> > >> >I've done loads of stuff with workers without any problems. I
>> >> > >> >can't see what's different about this.
>> >> > >> >
>> >> > >> >Any suggestions appreciated. The smaller FXP is here:
>> >> > >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
>> >> > >> >
>> >> > >> >
>> >> > >> >Thanks,
>> >> > >> >
>> >> > >> >Simon
>> >> > >> >
>> >> > >> >--
>> >> > >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey>
>> |
>> >> > >> >+44
>> >> > >> (0)
>> >> > >> >7973 669691*
>> >> > >>
>> >> > >>
>> >> > >
>> >> > >
>> >> > >--
>> >> > >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
>> >> > >+44
>> >> > (0)
>> >> > >7973 669691*
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
>> >>(0)
>> >> 7973 669691*
>> >>
>> >
>> >
>> >
>> >--
>> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
>> (0)
>> >7973 669691*
>>
>>
>
>
> --
> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> (0) 7973 669691*
>
>


-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
Yep - fully cleaned. In fact, I recreated the project and added in the text
from the classes by hand.

The embedded SWFs are AS Workers. It seems to be the renderer worker that's
causing issues - I have no idea why, it's quite innocuous and I've had
projects before using three or four embedded workers.

I haven't tried from the command line - I'm off out in a minute, I'll try
later.

Thanks,

Simon


On 8 July 2013 17:48, Alex Harui <ah...@adobe.com> wrote:

> I assume you tried a full clean of all projects?  And closed all unrelated
> projects in that workspace?
>
> It looks like the error log says it fails when trying to embed a SWF.  Do
> you have any embedded SWFs in the project?
>
> Can you build the project manually using MXMLC or ANT from the
> command-line?  You may need to change the VM args in the MXMLC scripts or
> batch files to get it to work.  If it fails when manually building we can
> try getting a debugger on the compiler.
>
> -Alex
>
> On 7/8/13 9:35 AM, "simon gladman" <sg...@gmail.com> wrote:
>
> >Thanks Timothy,
> >
> >I'm back to:
> >
> >-Xms512m
> >-Xmx1024m
> >-XX:MaxPermSize=512m
> >-XX:PermSize=256m
> >
> >The monitor shows that the heap size grows with each compile and when it
> >reaches approx 1GB (with used around 430MB), Flash Builder crashes.
> >
> >Other projects in the same workspace including ones with more worker SWF's
> >and more code never exceed  588,906,496 B of heap. Something about my
> >swarm
> >chemistry project is getting the heap to 1,073,741,824 B.
> >
> >Maybe it's the 'chemistry' part!
> >
> >simon
> >
> >
> >
> >On 8 July 2013 16:53, Timothy Jones <Ti...@syniverse.com> wrote:
> >
> >> You definitely wouldn't need the -Xms1024m (stack size).  In fact, that
> >> one might be hurting you.
> >>
> >> You can run JVisualVM to monitor the usage of the different areas of JVM
> >> memory.  That's takes the guesswork out of the picture.
> >> I would also put MaxPermSize to be larger than PermSize (and actually,
> >>you
> >> can take that one down).
> >> HTH.
> >>
> >>
> >> tlj
> >>
> >> -----Original Message-----
> >> From: simon gladman [mailto:sgladman@gmail.com]
> >> Sent: Monday, July 08, 2013 11:12 AM
> >> To: users@flex.apache.org
> >> Subject: Re: Weird Issues With Flex Project
> >>
> >> I've tried all sorts. Currently using:
> >>
> >> *-Xms1024m*
> >> *-Xmx2048m*
> >> *-XX:MaxPermSize=512m*
> >> *-XX:PermSize=512m*
> >>
> >> Simon
> >>
> >>
> >> On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:
> >>
> >> > Have you tried increasing available heap?
> >> >
> >> >
> http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-b
> >> > uilde
> >> > r-4-6
> >> >
> >> > On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
> >> >
> >> > >Thanks Alex,
> >> > >
> >> > >Flash Builder 4.7 (latest version - I uninstalled and reinstalled
> >> > >earlier), the SDK is 4.9.1 (1447119). The logs says...
> >> > >
> >> > >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889* *!MESSAGE
> >> > >An internal error occurred during: "Building workspace".* *!STACK 0*
> >> > >*java.lang.OutOfMemoryError: Java heap space*
> >> > >* at java.util.Arrays.copyOf(Arrays.java:2786)*
> >> > >* at
> >> > >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
> >> > >* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
> >> > >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
> >> > >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
> >> > >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
> >> > >* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
> >> > >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
> >> > >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
> >> > >* at
> >> > >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922
> >> > >)*
> >> > >* at
> >> > >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore
> >> > >.java
> >> > >:875)
> >> > >*
> >> > >* at
> >> > >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStor
> >> > >e.jav
> >> > >a:662)
> >> > >*
> >> > >* at
> >> > >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
> >> > >* at
> >> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> >> > >766)*
> >> > >* at
> >> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> >> > >741)*
> >> > >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
> >> > >* at flex2.tools.oem.Application.save(Application.java:619)*
> >> > >* at
> >> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(
> >> > >ASBui
> >> > >lder.java:870)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveSt
> >> > >ate(A
> >> > >SItemBuilder.java:119)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOlde
> >> > >stBui
> >> > >lder(BuilderManager.java:171)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Buil
> >> > >derMa
> >> > >nager.java:199)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> >> > >r.pre
> >> > >Build(FlexIncrementalBuilder.java:464)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >> > >ildIt
> >> > >em(FlexProjectBuilder.java:705)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >> > >ildWo
> >> > >rkers(FlexProjectBuilder.java:592)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >> > >ild(F
> >> > >lexProjectBuilder.java:406)
> >> > >*
> >> > >* at
> >> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> >> > >r.bui
> >> > >ld(FlexIncrementalBuilder.java:171)
> >> > >*
> >> > >* at
> >> > >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
> >> > >:728)
> >> > >*
> >> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >> > >* at
> >> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> >> > >.java
> >> > >:199)
> >> > >*
> >> > >* at
> >> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> >> > >.java
> >> > >:239)
> >> > >*
> >> > >* at
> >> > >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
> >> > >:292)
> >> > >*
> >> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >> > >
> >> > >Simon
> >> > >
> >> > >
> >> > >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
> >> > >
> >> > >> Which exact versions of FlashBuilder and Apache Flex?
> >> > >>
> >> > >> What does the FlashBuilder log have to say?
> >> > >>
> >> > >> -Alex
> >> > >>
> >> > >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
> >> > >>
> >> > >> >Hi All,
> >> > >> >
> >> > >> >I have a project which is making FlashBuilder with the latest
> >> > >> >Apache Flex behave very oddly.
> >> > >> >
> >> > >> >The attached project is actually a rebuilt version of a previous
> >>one.
> >> > >>When
> >> > >> >I first started coding, it was fine, then suddenly I start getting
> >> > >>*Java
> >> > >> >heap space* errors and FB stops working. Interestingly, the first
> >> > >> >FXP export is only 3.8MB but after the heap space errors, the FXP
> >> > >> >export
> >> > >>jumps
> >> > >> >up to 135MB (!).
> >> > >> >
> >> > >> >I've done loads of stuff with workers without any problems. I
> >> > >> >can't see what's different about this.
> >> > >> >
> >> > >> >Any suggestions appreciated. The smaller FXP is here:
> >> > >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> >> > >> >
> >> > >> >
> >> > >> >Thanks,
> >> > >> >
> >> > >> >Simon
> >> > >> >
> >> > >> >--
> >> > >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey>
> |
> >> > >> >+44
> >> > >> (0)
> >> > >> >7973 669691*
> >> > >>
> >> > >>
> >> > >
> >> > >
> >> > >--
> >> > >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
> >> > >+44
> >> > (0)
> >> > >7973 669691*
> >> >
> >> >
> >>
> >>
> >> --
> >> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> >>(0)
> >> 7973 669691*
> >>
> >
> >
> >
> >--
> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> (0)
> >7973 669691*
>
>


-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

RE: Weird Issues With Flex Project

Posted by Timothy Jones <Ti...@syniverse.com>.
The other thing that helps a lot in my project builds is to use fork='true' when starting the compile tasks (<javac>, <mxmlc>, <compc>) from ant.  It will incur the overhead of new JVM child processes, but with the benefit of reclaiming ALL of the memory used for the compile.   In this model, memory gets reclaimed because of the compile process exiting, instead of waiting for the Java GC in the parent ant process to do it.


tlj

-----Original Message-----
From: simon gladman [mailto:sgladman@gmail.com] 
Sent: Monday, July 08, 2013 12:35 PM
To: users@flex.apache.org
Subject: Re: Weird Issues With Flex Project

Thanks Timothy,

I'm back to:

-Xms512m
-Xmx1024m
-XX:MaxPermSize=512m
-XX:PermSize=256m

The monitor shows that the heap size grows with each compile and when it reaches approx 1GB (with used around 430MB), Flash Builder crashes.

Other projects in the same workspace including ones with more worker SWF's and more code never exceed  588,906,496 B of heap. Something about my swarm chemistry project is getting the heap to 1,073,741,824 B.

Maybe it's the 'chemistry' part!

simon



On 8 July 2013 16:53, Timothy Jones <Ti...@syniverse.com> wrote:

> You definitely wouldn't need the -Xms1024m (stack size).  In fact, 
> that one might be hurting you.
>
> You can run JVisualVM to monitor the usage of the different areas of 
> JVM memory.  That's takes the guesswork out of the picture.
> I would also put MaxPermSize to be larger than PermSize (and actually, 
> you can take that one down).
> HTH.
>
>
> tlj
>
> -----Original Message-----
> From: simon gladman [mailto:sgladman@gmail.com]
> Sent: Monday, July 08, 2013 11:12 AM
> To: users@flex.apache.org
> Subject: Re: Weird Issues With Flex Project
>
> I've tried all sorts. Currently using:
>
> *-Xms1024m*
> *-Xmx2048m*
> *-XX:MaxPermSize=512m*
> *-XX:PermSize=512m*
>
> Simon
>
>
> On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:
>
> > Have you tried increasing available heap?
> >
> > http://stackoverflow.com/questions/14143753/java-heap-error-in-flash
> > -b
> > uilde
> > r-4-6
> >
> > On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
> >
> > >Thanks Alex,
> > >
> > >Flash Builder 4.7 (latest version - I uninstalled and reinstalled 
> > >earlier), the SDK is 4.9.1 (1447119). The logs says...
> > >
> > >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889* 
> > >*!MESSAGE An internal error occurred during: "Building workspace".* 
> > >*!STACK 0*
> > >*java.lang.OutOfMemoryError: Java heap space*
> > >* at java.util.Arrays.copyOf(Arrays.java:2786)*
> > >* at
> > >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
> > >* at 
> > >flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
> > >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
> > >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
> > >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
> > >* at 
> > >flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
> > >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
> > >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
> > >* at
> > >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:9
> > >22
> > >)*
> > >* at
> > >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceSto
> > >re
> > >.java
> > >:875)
> > >*
> > >* at
> > >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceSt
> > >or
> > >e.jav
> > >a:662)
> > >*
> > >* at
> > >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
> > >* at
> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java
> > >:4
> > >766)*
> > >* at
> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java
> > >:4
> > >741)*
> > >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
> > >* at flex2.tools.oem.Application.save(Application.java:619)*
> > >* at
> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveStat
> > >e(
> > >ASBui
> > >lder.java:870)
> > >*
> > >* at
> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.save
> > >St
> > >ate(A
> > >SItemBuilder.java:119)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOl
> > >de
> > >stBui
> > >lder(BuilderManager.java:171)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Bu
> > >il
> > >derMa
> > >nager.java:199)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuil
> > >de
> > >r.pre
> > >Build(FlexIncrementalBuilder.java:464)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.
> > >bu
> > >ildIt
> > >em(FlexProjectBuilder.java:705)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.
> > >bu
> > >ildWo
> > >rkers(FlexProjectBuilder.java:592)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.
> > >bu
> > >ild(F
> > >lexProjectBuilder.java:406)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuil
> > >de
> > >r.bui
> > >ld(FlexIncrementalBuilder.java:171)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.ja
> > >va
> > >:728)
> > >*
> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManag
> > >er
> > >.java
> > >:199)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManag
> > >er
> > >.java
> > >:239)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.ja
> > >va
> > >:292)
> > >*
> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> > >
> > >Simon
> > >
> > >
> > >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
> > >
> > >> Which exact versions of FlashBuilder and Apache Flex?
> > >>
> > >> What does the FlashBuilder log have to say?
> > >>
> > >> -Alex
> > >>
> > >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
> > >>
> > >> >Hi All,
> > >> >
> > >> >I have a project which is making FlashBuilder with the latest 
> > >> >Apache Flex behave very oddly.
> > >> >
> > >> >The attached project is actually a rebuilt version of a previous one.
> > >>When
> > >> >I first started coding, it was fine, then suddenly I start 
> > >> >getting
> > >>*Java
> > >> >heap space* errors and FB stops working. Interestingly, the 
> > >> >first FXP export is only 3.8MB but after the heap space errors, 
> > >> >the FXP export
> > >>jumps
> > >> >up to 135MB (!).
> > >> >
> > >> >I've done loads of stuff with workers without any problems. I 
> > >> >can't see what's different about this.
> > >> >
> > >> >Any suggestions appreciated. The smaller FXP is here:
> > >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> > >> >
> > >> >
> > >> >Thanks,
> > >> >
> > >> >Simon
> > >> >
> > >> >--
> > >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> 
> > >> >|
> > >> >+44
> > >> (0)
> > >> >7973 669691*
> > >>
> > >>
> > >
> > >
> > >--
> > >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
> > >+44
> > (0)
> > >7973 669691*
> >
> >
>
>
> --
> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 
> (0)
> 7973 669691*
>



--
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by Alex Harui <ah...@adobe.com>.
I assume you tried a full clean of all projects?  And closed all unrelated
projects in that workspace?

It looks like the error log says it fails when trying to embed a SWF.  Do
you have any embedded SWFs in the project?

Can you build the project manually using MXMLC or ANT from the
command-line?  You may need to change the VM args in the MXMLC scripts or
batch files to get it to work.  If it fails when manually building we can
try getting a debugger on the compiler.

-Alex

On 7/8/13 9:35 AM, "simon gladman" <sg...@gmail.com> wrote:

>Thanks Timothy,
>
>I'm back to:
>
>-Xms512m
>-Xmx1024m
>-XX:MaxPermSize=512m
>-XX:PermSize=256m
>
>The monitor shows that the heap size grows with each compile and when it
>reaches approx 1GB (with used around 430MB), Flash Builder crashes.
>
>Other projects in the same workspace including ones with more worker SWF's
>and more code never exceed  588,906,496 B of heap. Something about my
>swarm
>chemistry project is getting the heap to 1,073,741,824 B.
>
>Maybe it's the 'chemistry' part!
>
>simon
>
>
>
>On 8 July 2013 16:53, Timothy Jones <Ti...@syniverse.com> wrote:
>
>> You definitely wouldn't need the -Xms1024m (stack size).  In fact, that
>> one might be hurting you.
>>
>> You can run JVisualVM to monitor the usage of the different areas of JVM
>> memory.  That's takes the guesswork out of the picture.
>> I would also put MaxPermSize to be larger than PermSize (and actually,
>>you
>> can take that one down).
>> HTH.
>>
>>
>> tlj
>>
>> -----Original Message-----
>> From: simon gladman [mailto:sgladman@gmail.com]
>> Sent: Monday, July 08, 2013 11:12 AM
>> To: users@flex.apache.org
>> Subject: Re: Weird Issues With Flex Project
>>
>> I've tried all sorts. Currently using:
>>
>> *-Xms1024m*
>> *-Xmx2048m*
>> *-XX:MaxPermSize=512m*
>> *-XX:PermSize=512m*
>>
>> Simon
>>
>>
>> On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:
>>
>> > Have you tried increasing available heap?
>> >
>> > http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-b
>> > uilde
>> > r-4-6
>> >
>> > On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
>> >
>> > >Thanks Alex,
>> > >
>> > >Flash Builder 4.7 (latest version - I uninstalled and reinstalled
>> > >earlier), the SDK is 4.9.1 (1447119). The logs says...
>> > >
>> > >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889* *!MESSAGE
>> > >An internal error occurred during: "Building workspace".* *!STACK 0*
>> > >*java.lang.OutOfMemoryError: Java heap space*
>> > >* at java.util.Arrays.copyOf(Arrays.java:2786)*
>> > >* at
>> > >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
>> > >* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
>> > >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
>> > >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
>> > >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
>> > >* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
>> > >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
>> > >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
>> > >* at
>> > >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922
>> > >)*
>> > >* at
>> > >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore
>> > >.java
>> > >:875)
>> > >*
>> > >* at
>> > >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStor
>> > >e.jav
>> > >a:662)
>> > >*
>> > >* at
>> > >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
>> > >* at
>> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
>> > >766)*
>> > >* at
>> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
>> > >741)*
>> > >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
>> > >* at flex2.tools.oem.Application.save(Application.java:619)*
>> > >* at
>> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(
>> > >ASBui
>> > >lder.java:870)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveSt
>> > >ate(A
>> > >SItemBuilder.java:119)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOlde
>> > >stBui
>> > >lder(BuilderManager.java:171)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Buil
>> > >derMa
>> > >nager.java:199)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
>> > >r.pre
>> > >Build(FlexIncrementalBuilder.java:464)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> > >ildIt
>> > >em(FlexProjectBuilder.java:705)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> > >ildWo
>> > >rkers(FlexProjectBuilder.java:592)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
>> > >ild(F
>> > >lexProjectBuilder.java:406)
>> > >*
>> > >* at
>> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
>> > >r.bui
>> > >ld(FlexIncrementalBuilder.java:171)
>> > >*
>> > >* at
>> > >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
>> > >:728)
>> > >*
>> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>> > >* at
>> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
>> > >.java
>> > >:199)
>> > >*
>> > >* at
>> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
>> > >.java
>> > >:239)
>> > >*
>> > >* at
>> > >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
>> > >:292)
>> > >*
>> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>> > >
>> > >Simon
>> > >
>> > >
>> > >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
>> > >
>> > >> Which exact versions of FlashBuilder and Apache Flex?
>> > >>
>> > >> What does the FlashBuilder log have to say?
>> > >>
>> > >> -Alex
>> > >>
>> > >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
>> > >>
>> > >> >Hi All,
>> > >> >
>> > >> >I have a project which is making FlashBuilder with the latest
>> > >> >Apache Flex behave very oddly.
>> > >> >
>> > >> >The attached project is actually a rebuilt version of a previous
>>one.
>> > >>When
>> > >> >I first started coding, it was fine, then suddenly I start getting
>> > >>*Java
>> > >> >heap space* errors and FB stops working. Interestingly, the first
>> > >> >FXP export is only 3.8MB but after the heap space errors, the FXP
>> > >> >export
>> > >>jumps
>> > >> >up to 135MB (!).
>> > >> >
>> > >> >I've done loads of stuff with workers without any problems. I
>> > >> >can't see what's different about this.
>> > >> >
>> > >> >Any suggestions appreciated. The smaller FXP is here:
>> > >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
>> > >> >
>> > >> >
>> > >> >Thanks,
>> > >> >
>> > >> >Simon
>> > >> >
>> > >> >--
>> > >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
>> > >> >+44
>> > >> (0)
>> > >> >7973 669691*
>> > >>
>> > >>
>> > >
>> > >
>> > >--
>> > >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
>> > >+44
>> > (0)
>> > >7973 669691*
>> >
>> >
>>
>>
>> --
>> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
>>(0)
>> 7973 669691*
>>
>
>
>
>-- 
>*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
>7973 669691*


Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
Thanks Timothy,

I'm back to:

-Xms512m
-Xmx1024m
-XX:MaxPermSize=512m
-XX:PermSize=256m

The monitor shows that the heap size grows with each compile and when it
reaches approx 1GB (with used around 430MB), Flash Builder crashes.

Other projects in the same workspace including ones with more worker SWF's
and more code never exceed  588,906,496 B of heap. Something about my swarm
chemistry project is getting the heap to 1,073,741,824 B.

Maybe it's the 'chemistry' part!

simon



On 8 July 2013 16:53, Timothy Jones <Ti...@syniverse.com> wrote:

> You definitely wouldn't need the -Xms1024m (stack size).  In fact, that
> one might be hurting you.
>
> You can run JVisualVM to monitor the usage of the different areas of JVM
> memory.  That's takes the guesswork out of the picture.
> I would also put MaxPermSize to be larger than PermSize (and actually, you
> can take that one down).
> HTH.
>
>
> tlj
>
> -----Original Message-----
> From: simon gladman [mailto:sgladman@gmail.com]
> Sent: Monday, July 08, 2013 11:12 AM
> To: users@flex.apache.org
> Subject: Re: Weird Issues With Flex Project
>
> I've tried all sorts. Currently using:
>
> *-Xms1024m*
> *-Xmx2048m*
> *-XX:MaxPermSize=512m*
> *-XX:PermSize=512m*
>
> Simon
>
>
> On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:
>
> > Have you tried increasing available heap?
> >
> > http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-b
> > uilde
> > r-4-6
> >
> > On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
> >
> > >Thanks Alex,
> > >
> > >Flash Builder 4.7 (latest version - I uninstalled and reinstalled
> > >earlier), the SDK is 4.9.1 (1447119). The logs says...
> > >
> > >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889* *!MESSAGE
> > >An internal error occurred during: "Building workspace".* *!STACK 0*
> > >*java.lang.OutOfMemoryError: Java heap space*
> > >* at java.util.Arrays.copyOf(Arrays.java:2786)*
> > >* at
> > >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
> > >* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
> > >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
> > >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
> > >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
> > >* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
> > >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
> > >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
> > >* at
> > >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922
> > >)*
> > >* at
> > >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore
> > >.java
> > >:875)
> > >*
> > >* at
> > >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStor
> > >e.jav
> > >a:662)
> > >*
> > >* at
> > >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
> > >* at
> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> > >766)*
> > >* at
> > >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> > >741)*
> > >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
> > >* at flex2.tools.oem.Application.save(Application.java:619)*
> > >* at
> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(
> > >ASBui
> > >lder.java:870)
> > >*
> > >* at
> > >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveSt
> > >ate(A
> > >SItemBuilder.java:119)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOlde
> > >stBui
> > >lder(BuilderManager.java:171)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Buil
> > >derMa
> > >nager.java:199)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> > >r.pre
> > >Build(FlexIncrementalBuilder.java:464)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> > >ildIt
> > >em(FlexProjectBuilder.java:705)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> > >ildWo
> > >rkers(FlexProjectBuilder.java:592)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> > >ild(F
> > >lexProjectBuilder.java:406)
> > >*
> > >* at
> > >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> > >r.bui
> > >ld(FlexIncrementalBuilder.java:171)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
> > >:728)
> > >*
> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> > >.java
> > >:199)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> > >.java
> > >:239)
> > >*
> > >* at
> > >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
> > >:292)
> > >*
> > >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> > >
> > >Simon
> > >
> > >
> > >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
> > >
> > >> Which exact versions of FlashBuilder and Apache Flex?
> > >>
> > >> What does the FlashBuilder log have to say?
> > >>
> > >> -Alex
> > >>
> > >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
> > >>
> > >> >Hi All,
> > >> >
> > >> >I have a project which is making FlashBuilder with the latest
> > >> >Apache Flex behave very oddly.
> > >> >
> > >> >The attached project is actually a rebuilt version of a previous one.
> > >>When
> > >> >I first started coding, it was fine, then suddenly I start getting
> > >>*Java
> > >> >heap space* errors and FB stops working. Interestingly, the first
> > >> >FXP export is only 3.8MB but after the heap space errors, the FXP
> > >> >export
> > >>jumps
> > >> >up to 135MB (!).
> > >> >
> > >> >I've done loads of stuff with workers without any problems. I
> > >> >can't see what's different about this.
> > >> >
> > >> >Any suggestions appreciated. The smaller FXP is here:
> > >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> > >> >
> > >> >
> > >> >Thanks,
> > >> >
> > >> >Simon
> > >> >
> > >> >--
> > >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
> > >> >+44
> > >> (0)
> > >> >7973 669691*
> > >>
> > >>
> > >
> > >
> > >--
> > >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> |
> > >+44
> > (0)
> > >7973 669691*
> >
> >
>
>
> --
> *flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
> 7973 669691*
>



-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

RE: Weird Issues With Flex Project

Posted by Timothy Jones <Ti...@syniverse.com>.
You definitely wouldn't need the -Xms1024m (stack size).  In fact, that one might be hurting you.

You can run JVisualVM to monitor the usage of the different areas of JVM memory.  That's takes the guesswork out of the picture.
I would also put MaxPermSize to be larger than PermSize (and actually, you can take that one down).
HTH.


tlj

-----Original Message-----
From: simon gladman [mailto:sgladman@gmail.com] 
Sent: Monday, July 08, 2013 11:12 AM
To: users@flex.apache.org
Subject: Re: Weird Issues With Flex Project

I've tried all sorts. Currently using:

*-Xms1024m*
*-Xmx2048m*
*-XX:MaxPermSize=512m*
*-XX:PermSize=512m*

Simon


On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:

> Have you tried increasing available heap?
>
> http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-b
> uilde
> r-4-6
>
> On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
>
> >Thanks Alex,
> >
> >Flash Builder 4.7 (latest version - I uninstalled and reinstalled 
> >earlier), the SDK is 4.9.1 (1447119). The logs says...
> >
> >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889* *!MESSAGE 
> >An internal error occurred during: "Building workspace".* *!STACK 0*
> >*java.lang.OutOfMemoryError: Java heap space*
> >* at java.util.Arrays.copyOf(Arrays.java:2786)*
> >* at 
> >java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
> >* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
> >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
> >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
> >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
> >* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
> >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
> >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
> >* at
> >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922
> >)*
> >* at
> >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore
> >.java
> >:875)
> >*
> >* at
> >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStor
> >e.jav
> >a:662)
> >*
> >* at 
> >flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
> >* at
> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> >766)*
> >* at
> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4
> >741)*
> >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
> >* at flex2.tools.oem.Application.save(Application.java:619)*
> >* at
> >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(
> >ASBui
> >lder.java:870)
> >*
> >* at
> >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveSt
> >ate(A
> >SItemBuilder.java:119)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOlde
> >stBui
> >lder(BuilderManager.java:171)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(Buil
> >derMa
> >nager.java:199)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> >r.pre
> >Build(FlexIncrementalBuilder.java:464)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >ildIt
> >em(FlexProjectBuilder.java:705)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >ildWo
> >rkers(FlexProjectBuilder.java:592)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.bu
> >ild(F
> >lexProjectBuilder.java:406)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilde
> >r.bui
> >ld(FlexIncrementalBuilder.java:171)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java
> >:728)
> >*
> >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >* at
> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> >.java
> >:199)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager
> >.java
> >:239)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java
> >:292)
> >*
> >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >
> >Simon
> >
> >
> >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Which exact versions of FlashBuilder and Apache Flex?
> >>
> >> What does the FlashBuilder log have to say?
> >>
> >> -Alex
> >>
> >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
> >>
> >> >Hi All,
> >> >
> >> >I have a project which is making FlashBuilder with the latest 
> >> >Apache Flex behave very oddly.
> >> >
> >> >The attached project is actually a rebuilt version of a previous one.
> >>When
> >> >I first started coding, it was fine, then suddenly I start getting
> >>*Java
> >> >heap space* errors and FB stops working. Interestingly, the first 
> >> >FXP export is only 3.8MB but after the heap space errors, the FXP 
> >> >export
> >>jumps
> >> >up to 135MB (!).
> >> >
> >> >I've done loads of stuff with workers without any problems. I 
> >> >can't see what's different about this.
> >> >
> >> >Any suggestions appreciated. The smaller FXP is here:
> >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> >> >
> >> >
> >> >Thanks,
> >> >
> >> >Simon
> >> >
> >> >--
> >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | 
> >> >+44
> >> (0)
> >> >7973 669691*
> >>
> >>
> >
> >
> >--
> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | 
> >+44
> (0)
> >7973 669691*
>
>


--
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
I've tried all sorts. Currently using:

*-Xms1024m*
*-Xmx2048m*
*-XX:MaxPermSize=512m*
*-XX:PermSize=512m*

Simon


On 8 July 2013 16:01, Alex Harui <ah...@adobe.com> wrote:

> Have you tried increasing available heap?
>
> http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-builde
> r-4-6
>
> On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:
>
> >Thanks Alex,
> >
> >Flash Builder 4.7 (latest version - I uninstalled and reinstalled
> >earlier),
> >the SDK is 4.9.1 (1447119). The logs says...
> >
> >*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889*
> >*!MESSAGE An internal error occurred during: "Building workspace".*
> >*!STACK 0*
> >*java.lang.OutOfMemoryError: Java heap space*
> >* at java.util.Arrays.copyOf(Arrays.java:2786)*
> >* at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
> >* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
> >* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
> >* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
> >* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
> >* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
> >* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
> >* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
> >* at
> >flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922)*
> >* at
> >flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore.java
> >:875)
> >*
> >* at
> >flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStore.jav
> >a:662)
> >*
> >* at flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
> >* at
> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4766)*
> >* at
> >flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4741)*
> >* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
> >* at flex2.tools.oem.Application.save(Application.java:619)*
> >* at
> >com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(ASBui
> >lder.java:870)
> >*
> >* at
> >com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveState(A
> >SItemBuilder.java:119)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOldestBui
> >lder(BuilderManager.java:171)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(BuilderMa
> >nager.java:199)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.pre
> >Build(FlexIncrementalBuilder.java:464)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildIt
> >em(FlexProjectBuilder.java:705)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildWo
> >rkers(FlexProjectBuilder.java:592)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(F
> >lexProjectBuilder.java:406)
> >*
> >* at
> >com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.bui
> >ld(FlexIncrementalBuilder.java:171)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> >*
> >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >* at
> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java
> >:199)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java
> >:239)
> >*
> >* at
> >org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> >*
> >* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
> >
> >Simon
> >
> >
> >On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Which exact versions of FlashBuilder and Apache Flex?
> >>
> >> What does the FlashBuilder log have to say?
> >>
> >> -Alex
> >>
> >> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
> >>
> >> >Hi All,
> >> >
> >> >I have a project which is making FlashBuilder with the
> >> >latest Apache Flex behave very oddly.
> >> >
> >> >The attached project is actually a rebuilt version of a previous one.
> >>When
> >> >I first started coding, it was fine, then suddenly I start getting
> >>*Java
> >> >heap space* errors and FB stops working. Interestingly, the first FXP
> >> >export is only 3.8MB but after the heap space errors, the FXP export
> >>jumps
> >> >up to 135MB (!).
> >> >
> >> >I've done loads of stuff with workers without any problems. I can't see
> >> >what's different about this.
> >> >
> >> >Any suggestions appreciated. The smaller FXP is here:
> >> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> >> >
> >> >
> >> >Thanks,
> >> >
> >> >Simon
> >> >
> >> >--
> >> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> >> (0)
> >> >7973 669691*
> >>
> >>
> >
> >
> >--
> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> (0)
> >7973 669691*
>
>


-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by Alex Harui <ah...@adobe.com>.
Have you tried increasing available heap?

http://stackoverflow.com/questions/14143753/java-heap-error-in-flash-builde
r-4-6

On 7/8/13 7:46 AM, "simon gladman" <sg...@gmail.com> wrote:

>Thanks Alex,
>
>Flash Builder 4.7 (latest version - I uninstalled and reinstalled
>earlier),
>the SDK is 4.9.1 (1447119). The logs says...
>
>*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889*
>*!MESSAGE An internal error occurred during: "Building workspace".*
>*!STACK 0*
>*java.lang.OutOfMemoryError: Java heap space*
>* at java.util.Arrays.copyOf(Arrays.java:2786)*
>* at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
>* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
>* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
>* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
>* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
>* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
>* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
>* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
>* at 
>flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922)*
>* at
>flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore.java
>:875)
>*
>* at
>flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStore.jav
>a:662)
>*
>* at flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
>* at
>flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4766)*
>* at
>flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4741)*
>* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
>* at flex2.tools.oem.Application.save(Application.java:619)*
>* at
>com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(ASBui
>lder.java:870)
>*
>* at
>com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveState(A
>SItemBuilder.java:119)
>*
>* at
>com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOldestBui
>lder(BuilderManager.java:171)
>*
>* at
>com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(BuilderMa
>nager.java:199)
>*
>* at
>com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.pre
>Build(FlexIncrementalBuilder.java:464)
>*
>* at
>com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildIt
>em(FlexProjectBuilder.java:705)
>*
>* at
>com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildWo
>rkers(FlexProjectBuilder.java:592)
>*
>* at
>com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(F
>lexProjectBuilder.java:406)
>*
>* at
>com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.bui
>ld(FlexIncrementalBuilder.java:171)
>*
>* at
>org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
>*
>* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>* at
>org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java
>:199)
>*
>* at
>org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java
>:239)
>*
>* at
>org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
>*
>* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
>
>Simon
>
>
>On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:
>
>> Which exact versions of FlashBuilder and Apache Flex?
>>
>> What does the FlashBuilder log have to say?
>>
>> -Alex
>>
>> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
>>
>> >Hi All,
>> >
>> >I have a project which is making FlashBuilder with the
>> >latest Apache Flex behave very oddly.
>> >
>> >The attached project is actually a rebuilt version of a previous one.
>>When
>> >I first started coding, it was fine, then suddenly I start getting
>>*Java
>> >heap space* errors and FB stops working. Interestingly, the first FXP
>> >export is only 3.8MB but after the heap space errors, the FXP export
>>jumps
>> >up to 135MB (!).
>> >
>> >I've done loads of stuff with workers without any problems. I can't see
>> >what's different about this.
>> >
>> >Any suggestions appreciated. The smaller FXP is here:
>> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
>> >
>> >
>> >Thanks,
>> >
>> >Simon
>> >
>> >--
>> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
>> (0)
>> >7973 669691*
>>
>>
>
>
>-- 
>*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
>7973 669691*


Re: Weird Issues With Flex Project

Posted by simon gladman <sg...@gmail.com>.
Thanks Alex,

Flash Builder 4.7 (latest version - I uninstalled and reinstalled earlier),
the SDK is 4.9.1 (1447119). The logs says...

*!ENTRY org.eclipse.core.jobs 4 2 2013-07-08 14:33:36.889*
*!MESSAGE An internal error occurred during: "Building workspace".*
*!STACK 0*
*java.lang.OutOfMemoryError: Java heap space*
* at java.util.Arrays.copyOf(Arrays.java:2786)*
* at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)*
* at flash.swf.RandomAccessBuffer.write(RandomAccessBuffer.java:101)*
* at flash.swf.SwfEncoder.writeUI16(SwfEncoder.java:71)*
* at flash.swf.TagEncoder.encodeTagHeader(TagEncoder.java:311)*
* at flash.swf.TagEncoder.defineBinaryData(TagEncoder.java:330)*
* at flash.swf.tags.DefineBinaryData.visit(DefineBinaryData.java:37)*
* at flash.swf.MovieEncoder.define(MovieEncoder.java:231)*
* at flash.swf.MovieEncoder.export(MovieEncoder.java:139)*
* at flex2.compiler.PersistenceStore.writeAssets(PersistenceStore.java:922)*
* at
flex2.compiler.PersistenceStore.writeCompilationUnit(PersistenceStore.java:875)
*
* at
flex2.compiler.PersistenceStore.writeCompilationUnits(PersistenceStore.java:662)
*
* at flex2.compiler.PersistenceStore.write(PersistenceStore.java:310)*
* at
flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4766)*
* at
flex2.compiler.CompilerAPI.persistCompilationUnits(CompilerAPI.java:4741)*
* at flex2.tools.oem.internal.OEMUtil.save(OEMUtil.java:180)*
* at flex2.tools.oem.Application.save(Application.java:619)*
* at
com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.saveState(ASBuilder.java:870)
*
* at
com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.saveState(ASItemBuilder.java:119)
*
* at
com.adobe.flexbuilder.project.compiler.BuilderManager.maybeRemoveOldestBuilder(BuilderManager.java:171)
*
* at
com.adobe.flexbuilder.project.compiler.BuilderManager.getBuilder(BuilderManager.java:199)
*
* at
com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.preBuild(FlexIncrementalBuilder.java:464)
*
* at
com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectBuilder.java:705)
*
* at
com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildWorkers(FlexProjectBuilder.java:592)
*
* at
com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:406)
*
* at
com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:171)
*
* at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)*
* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*
* at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
*
* at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
*
* at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)*
* at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)*

Simon


On 8 July 2013 15:30, Alex Harui <ah...@adobe.com> wrote:

> Which exact versions of FlashBuilder and Apache Flex?
>
> What does the FlashBuilder log have to say?
>
> -Alex
>
> On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:
>
> >Hi All,
> >
> >I have a project which is making FlashBuilder with the
> >latest Apache Flex behave very oddly.
> >
> >The attached project is actually a rebuilt version of a previous one. When
> >I first started coding, it was fine, then suddenly I start getting *Java
> >heap space* errors and FB stops working. Interestingly, the first FXP
> >export is only 3.8MB but after the heap space errors, the FXP export jumps
> >up to 135MB (!).
> >
> >I've done loads of stuff with workers without any problems. I can't see
> >what's different about this.
> >
> >Any suggestions appreciated. The smaller FXP is here:
> >www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
> >
> >
> >Thanks,
> >
> >Simon
> >
> >--
> >*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44
> (0)
> >7973 669691*
>
>


-- 
*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
7973 669691*

Re: Weird Issues With Flex Project

Posted by Alex Harui <ah...@adobe.com>.
Which exact versions of FlashBuilder and Apache Flex?

What does the FlashBuilder log have to say?

-Alex

On 7/8/13 6:51 AM, "simon gladman" <sg...@gmail.com> wrote:

>Hi All,
>
>I have a project which is making FlashBuilder with the
>latest Apache Flex behave very oddly.
>
>The attached project is actually a rebuilt version of a previous one. When
>I first started coding, it was fine, then suddenly I start getting *Java
>heap space* errors and FB stops working. Interestingly, the first FXP
>export is only 3.8MB but after the heap space errors, the FXP export jumps
>up to 135MB (!).
>
>I've done loads of stuff with workers without any problems. I can't see
>what's different about this.
>
>Any suggestions appreciated. The smaller FXP is here:
>www.flexmonkey.co.uk/x_SwarmChemistry2.fxp
>
>
>Thanks,
>
>Simon
>
>-- 
>*flexmonkey.co.uk | @FlexMonkey <https://twitter.com/FlexMonkey> | +44 (0)
>7973 669691*