FlasCC SWC freezes FB 4.7

I have a 1.5 MB SWC created using FlasCC. When I add this SWC to my project, FB 4.7 becomes unresponsive for a couple of minutes. When I close it and then re-open it, it becomes unresponsive for four minutes. After it finally opens, the auto-complete on the CModue class brings up the pin-wheel for a few seconds.
FB 4.6 is fine. It opens normally and the auto-complete is fast. I'm using OS X 10.8.4.
Does anyone know what's causing this issue in FB 4.7?

I have a similar issue. I have used FlasCC to create a trivial SWC (literally one function that just returns an int (2)), and whenever I use autocomplete in my project in flash builder 4.7 it takes an eternity to respond. This is for anything at all, not just members of the library. Member functions in the swc might be even slower than a general autocomplete, but the main problem is that everything is really slow. I think once the autocomplete cannot be something from an SWC then it returns to being fast.
I haven't noticed the project opening being slow or adding the swc being particularly slow however.
This issue is present when using the sample SWC created exactly as in sample 5 in the flascc folder. Having created a similarly simple SWC in Flash Builder 4.7 directly there is no delay in autocomplete.

Similar Messages

  • FlasCC SWC freezes Flash Builder 4.7

    I have a 1.5 MB SWC created using FlasCC. When I add this SWC to my project, FB 4.7 becomes unresponsive for a couple of minutes. When I close it and then re-open it, it becomes unresponsive for four minutes. After it finally opens, the auto-complete on the CModue class brings up the pin-wheel for a few seconds.
    FB 4.6 is fine. It opens normally and the auto-complete is fast. I'm using OS X 10.8.4.
    Does anyone know what's causing this issue in FB 4.7?

    I have a similar issue. I have used FlasCC to create a trivial SWC (literally one function that just returns an int (2)), and whenever I use autocomplete in my project in flash builder 4.7 it takes an eternity to respond. This is for anything at all, not just members of the library. Member functions in the swc might be even slower than a general autocomplete, but the main problem is that everything is really slow. I think once the autocomplete cannot be something from an SWC then it returns to being fast.
    I haven't noticed the project opening being slow or adding the swc being particularly slow however.
    This issue is present when using the sample SWC created exactly as in sample 5 in the flascc folder. Having created a similarly simple SWC in Flash Builder 4.7 directly there is no delay in autocomplete.

  • Using external AS3 classes in a FlasCC SWC

    I am building a Flascc SWC, which is to be used in a regular Flash swf, build in FlashBuilder 4.6.
    I have managed to build an API that uses regular built-in types, like Number, uint.  However, when I try to pass in or out a class type of my own creation, I had build problems building my swf.
    I figured it out, and I thought I would share it.  Perhaps Adobe could include this example in a blog, or in the next set of SWC samples, so that people know how to do this.
    File Bob.as
    package me {
         public class Bob {
              private var _x : int;
              public function Bob() {}
              public function set x( val:int ) : void {
                   _x = val;         
              public function get x():int {
                   return _x;
    2) Compile in FlashBuilder to Bob.swc
    3) Create Library.cpp
    #include <AS3/AS3.h>
    #include <AS3/AS3++.h>
    using namespace AS3::local;
    var impl_make_Bob( int count )
         var ns = internal::new_Namespace("me", 35);
         var className = internal::new_String("Bob");
         var cc = internal::getlex(ns, className);
         var bob = internal::construct(cc);
         var xProperty = internal::new_String("x");
         var newX = internal::new_int( count );
         internal::setproperty(bob, xProperty, newX);
         return bob;
    void thunk_makeBob() __attribute__((used,
         annotate("as3import:me.Bob"),
         annotate("as3sig:public function thunk_makeBob(count:int):Bob"),
         annotate("as3package:me.SWCLibrary")));
    void thunk_makeBob() {
         int local_count;
         AS3_GetScalarFromVar(local_count, count);
         var retVal = impl_makeBob(local_count);
         AS3_DeclareVar(as3Val,Bob);
         AS3_CopyVarxxToVar(as3Val, retVal);
         AS3_ReturnAS3Var(as3Val);
    int main() {
         AS3GoAsync();
    4) Use FlasCC to Compile the Library.cpp to SWCLibrary.swc (me.SWCLibrary)
    #Using the same environment as the FlasCC_1.0.0 samples, compile with a Makefile,
    T01: check
         "$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) \
              -fllvm-llc-opt=-ascopt=-le -fllvm-llc-opt=-ascopt=E:/myProject/myLibrary/Bob.swc \
              -O4 Library.cpp -emit-swc=me.SWCLibrary -o SWCLibrary.swc -lFlash++ -lAS3++
    include ../Makefile.common
    clean:
         rm -f SWCLibrary.swc *.bc *.abc *.exe
    5) Create a new Wrapper.swc that embeds (merges) Bob.swc and SWCLibrary.swc , in FlashBuilder
    package me{
         public class WrapperFlascc {
              import me.SWCLibrary.CModule;
                   me.SWCLibrary.CModule.startAsync(null);
              import me.Bob;
              public static function makeBob( count : int ) : Bob {
                   return me.SWCLibrary.thunk_makeBob(count);
    NOTE: It may not be best to embed Bob.swc , if Bob.swc had classes that aren't referenced by Wrapper.swc or SWCLibrary.swc .  They could be lost.  Instead, link it in the final swf.
    This Wrapper.swc can then be used as normal in a FlashBuilder project.  I am not creating a C++ app, but rather using flasCC as an alchemy replacement.
    Perhaps there was a better way?  Anyway, I hope this helps someone.

    Shortly after I posted my question, I realized I had to check "Export for runtime sharing" for each object.
    -- Brian

  • Cannot package Flascc swc for ios

    Trying to package a an swf that contains a swc that I made with Flascc. Everything works just fine on the desktop.
    I have tried setting Xmx to anything from -Xmx=256 to -Xmx=18G nothing works.

    Yes, but wouldn't it be great if it did work? It shouldn't be all that difficult to test it for a select subset of Android devices and newer Apple devices ...
    I am very impressd with all that Adobe has accomplished with flasCC, but how much effort would it be to push it just a little further ...

  • Is there any flascc swc Hello World tutorial?

    Hi,
    I saw samples from flascc. But as for swc lib creationg - it's too complicated. Who can share samples with simple things like sending from flash to c++ data and back it using swc?

    Is this blog post useful?
    http://blogs.adobe.com/flascc/2012/12/08/operating-on-actionscript-objects-in-c/

  • Accessing the filesystem

    Is it possible to acces the real filesystem (not a vfs) through libc with abode air? Even if this do not work for a release build that would be nice. I am trying to setup a dev environement with Lua, but each time I change my assets I have to compile a vfs and my as3 project. It would be really nice to be able to add assets without compiling each time, since as3 compilation (when linking with a flascc swc) is a bit long.
    Also, at the moment I am loading my lua files with an URLLoader, but then I need to execute the file as a string (doString in lua), but a lua doString is a bit harder to debug than a real file. So I'd prefer to do it with a doFile call (which need to do it through libc).

    We do provide a VFS based on URLLoader; you can see an example in the filesystem sample (samples/07_FileSystem). While I haven't tried it, I believe that Air will alow you to access local files via URLLoader. That said, the current implementation of the URLLoader VFS does some processing on the files that would need to be performed each time they change, so it may not speed up your development cycle much. If that's the case, you could try writing a custom VFS by implementing the IBackingStore interface. Note that the VFS system assumes that once your program is running, all changes to the filesystem are performed either via libc or the VFS ActionScript interface. In other words, if you make any changes to the files on your native filesystem, you'll need to relaunch your SWF or Air program before you'll see the changes.

  • Interop problems and questions

    Hi,
    I am trying to interface our engine with flash through flascc, but I encounter some problem with the interop.
    I see that there is three way to do interop. The inline assembly way, (inline_as3() macro) and two more C++ way.
    The as3/as3++.h way
                        Example:
                        AS3::local::var propertyName = AS3::local::internal::new_String("x");
                        AS3::local::var newValue = AS3::local::internal::new_int(100);
                        AS3::local::internal::setproperty(mc, propertyName, newValue);
    And the Flash++.h which wrap all the flash api with C++ object.
    The inline_as3 way is nice, it's more readable than the as3/as3++.h way, I would prefer the Flash++.h way, but it would do okay for my need. I can compile basic example with int for example, but as soon as I use flash api classes :
    Error: Type was not found or was not a compile-time constant: MovieClip.
    var foo:MovieClip;
            ^
    The code provoking this was :
                        inline_as3("import flash.display.MovieClip;\n"
                                                      "var foo:MovieClip;\n"::);
    The as3/as3++.h way work great, but is the less elegant to me, I need to marshall every variable and I can't call directly the functions and properties, I need to query them and pass them to the call/call_v function afterward. It works great and I will fallback to it if I can't use the two other options, but I'd rather not to. Also the var marshalling/function query overhead seems to be less performant than the inline_as3 way. Maybe I am wrong about this last point, since I don't know the details about the implementation. Maybe this marshaling/query thing is done either way, one manually and the other by the compiler or flash runtime. Do I suffer a performance hit by going this way?
    The last way seems like the best way to me. Auto-completion from my ide, easily readable, statically typed, etc. But, we have a couple of problem with it.
    -The swc double in size (Which isn't a deal breaker to me, I know that there isn't much to do, but still... it's double)
    -The link time go through the roof, it cripple our workflow a bit.
    -The biggest problem, I can't take the swc outputed by flascc and merge it with another swc using compc.
    The last step of our makefile is merging a normal swc with a flascc swc. I could work around it and just use both swc separately, but it works great with the first two interop way I don't see why using Flascc++ should prevent it. It result in a insanely long compc step, that abort after 10 minutes with this error :
    Error: Java heap space
    So,
    -Do you have an idea why I can't use flash.display classes with inline_as3? (I tried with MovieClip, Sprite and Graphic.)
    -Is the as3++.h way less performant than the other two ?
    -Do you have an idea why I can't merge my two swc with compc when I use Flash++.h classes?
    EDIT:
    Sorry, I was wrong.  I do not merge two swc with compc, I just add a AS3 class to it, like this :
    "$(FLEX)/bin/compc" -include-libraries=$(BUILD_PATH)/temp.swc -include-classes=EntityHolderMovieClip -source-path . -debug=true -o $(BUILD_PATH)/BaconBox.swc

    No I wasn't, I can see why it is a problem, but even when I am using it, it doesn't work. Here is my call to g++ :
    "/cygdrive/c/flascc/sdk/usr/bin/g++" ../../../BaconBox/Components/Flash/MovieClipHolder.cpp -c -Werror -Wno-write-strings -Wno-trigraphs -DTINYXML_USE_STL -I../../.. -fllvm-llc-opt=-ascopt=-import -fllvm-llc-opt=-ascopt=C:/flascc/sdk/usr/lib/playerglobal.abc -I../../../libraries/FreeBSD/i686/include -o ../../../build/BaconBox/Components/Flash/MovieClipHolder.o
    I compile all my .cpp as .o before linking them together.
    It does work when I add the -emit-swf option (but afterward my link phase crash for obvious reason).

  • FlasCC compiled swc library is very slow on first function call - how can I speed it up?

    Hi everyone,
    I have a C++ library that fits a mesh onto images of faces, now compiled into an swc.
    I have just exposed one function from the library, that operates on a BitmapData and returns a Vector of Points indicating various parts of the face.
    The problem is that the first call to the library (to process the first image) seems to take about 10 seconds. After that repeated calls take a fraction of a second.
    Is there any way I can improve the performance on the first call, by initialising my library class in an init method or something? In the target application most users will only call the library once, so I need to improve this.
    UPDATE: Profiling in Flash Builder, the [verify] action (which I understand is JIT bytecode verification) takes 10.1 seconds. The other main culprits are [avm1] (1.7s) and global$init.global$init (2.0s).
    Can this be normal behaviour that JIT verification takes 10 seconds? Or can I speed it up? The source C++ code is probably 100,000 lines because it includes several modules from OpenCV, however so does Alex Mac's OpenCV demo and it doesn't take this long.
    Below is the code for my library wrapper. Very grateful for any help!
    #include <AS3/AS3.h>
    #include <AS3/AS3++.h>
    #include <Flash++.h>
    #include "FlashCLM.h"
    using namespace AS3::local;
    // First we mark the function declaration with a GCC attribute specifying the
    // AS3 signature we want it to have in the generated SWC. The function will
    // be located in the com.FrameFish namespace.
    void fitCLM() __attribute__((used,
              annotate("as3sig:public function fitCLM(img:BitmapData,shape:Vector.<Point>):int"),
              annotate("as3package:com.FrameFish"),
              annotate("as3import:flash.utils.ByteArray"),
              annotate("as3import:flash.geom.Point"),
              annotate("as3import:flash.display.BitmapData"),
              annotate("as3import:flash.Vector")));
    void fitCLM(){
              AS3_Trace("fitCLM starting");
              // Copy pixels to C ram
              inline_as3(
                        "var ba:ByteArray = img.getPixels(img.rect);\n"
            "var imgPtr:int = CModule.malloc(ba.length);\n"
                        "ba.position = 0;\n"
                        "CModule.writeBytes(imgPtr, ba.length, ba);\n"
        uint8_t* pixels = 0;
        AS3_GetScalarFromVar(pixels, imgPtr);
              // Get the width and height of image
              inline_as3(
                        "var w:int = img.width;\n"
                        "var h:int = img.height;\n"
              int width, height;
              AS3_GetScalarFromVar(width, w);
              AS3_GetScalarFromVar(height, h);
              // Fit CLM
              ff::FlashCLM clm;
              int shapeSize = 58*2; // Size of the imm_face_db markup
              int* shapeBuffer = new int[shapeSize];
              int result;
              clm.fit(pixels, width, height, shapeBuffer, &shapeSize, &result);
              // Copy shape to as3 shape vector
              if (result == ff::FlashCLM::FOUND){
                        for (int i=1; i<shapeSize; i+=2){
                                  inline_as3(
                                            "var x:Number = %0;\n"
                                            "var y:Number = %1;\n"
                                            "var p:Point = new Point(x,y);\n"
                                            "shape.push(p);\n"
                                            : : "r"(shapeBuffer[i-1]), "r"(shapeBuffer[i])
              // Clean up C memory
              inline_as3(
                        "CModule.free(imgPtr);\n"
              delete shapeBuffer;
        // return the result (using an AS3 return rather than a C/C++ return)
        AS3_Return(result);
    int main(){
        // We still need a main function for the SWC. this function must be called
        // so that all the static init code is executed before any library functions
        // are used.
        // The main function for a library must throw an exception so that it does
        // not return normally. Returning normally would cause the static
        // destructors to be executed leaving the library in an unuseable state.
        AS3_GoAsync();

    I never did get to the bottom of it. I got this response from Alex Mac:
    It's hard to give good advice at the C++ level because the problem is more
    of  a code generation issue. When a function ends up requiring too many
    registers to be live at once the resulting AS3 code can in some cases cause
    the verifier to take a long time to run. Exception handling and
    setjmp/longjmp can contribute to this, but so can things beyond your
    control when LLVM inlines too much into a single function and ends up
    generating unreasonable code...
    In the end I moved most of my C++ code out of flash and on to a server. To
    me flascc was a nice idea but didn't live up to the hype

  • Link a swc from flash into a swf from flascc

    Is it possible to link with a swc (from the flash app, for the assets) into a swf (from flascc)?

    After getting a reply for a similar question (http://forums.adobe.com/thread/1134928?tstart=0), I've ended up with the following pipeline:
    C++ code -> FlasCC -> code.swc
    AS3 code + 3rd party .swc's -> Flex -> as3code.swc
    Main.as (console) + code.swc + as3code.swc -> Flex -> final.swf
    Seems to be working now. So I suppose using an existing .swc on step 2 should work fine too.

  • Adobe Alchemy compiled SWC - not sure how to compile library for FlasCC

    I'm trying to get game-music-emu-flash working with FlasCC. It uses the C/C++ Game_Music_Emu library and was originally compiled with Alchemy, but I want to see if there is a performance increase with FlasCC. I'd like to use SWIG with typemaps to call the library since the current project ActionScript is not compatible with FlasCC. I'm following code from the samples. I haven't coded the typemaps yet but for now I created swig.i as
    #ifdef SWIG
    %module libgmeLibModule
    #include "gme/gme.h"
    %include "gme/gme.h"
    #else
    #include "gme/gme.h"
    #endif
    and the Makefile follows the samples closely by replacing what's needed to match. During compilation I'm getting similar errors all in the form
    libgmeLib_wrapper.cpp: In function `void _wrap_gme_ay_type_get()':
    libgmeLib_wrapper.cpp:2575: error: invalid conversion from `const void*' to `void*'
    libgmeLib_wrapper.cpp:2575: error:   initializing argument 1 of `void* memcpy(void*, const void*, size_t)'
    Compiling with
    "$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) -04 gmemain.cpp gme/*.cpp -emit-swc=sample.libgme -o libgme.swc
    in the Makefile by itself under all: compiles without errors.
    I don't know C++ that well so any help is appreciated. Also would using SWIG and typemaps be the way to go or would manually wrapping make sense? I thought SWIG would be better since gme is a decent sized library.

    Hi Matt,
    Thank you very much for taking the time to code a demo. However I can't get it to fully build. By the way I am using FlasCC on Windows 7 64-bit and therefore Cygwin. Hopefully I can attempt to build it on a Mac sometime soon. Or can I compile this on Linux?
    Anyway I modified your Makefile with Windows paths since I was getting the error
    Error: Unable to access jarfile /cygdrive/c/FlasCC_1.0.0/sdk/usr/lib/asc2.jar
    Makefile:6: recipe for target `all' failed
    make: *** [all] Error 1
    So my Makefile now looks like
    #Set these to the paths to your FlasCC and Flex installs
    flascc=/cygdrive/c/FlasCC_1.0.0/sdk
    flex=/cygdrive/c/flex_sdk_4.6
    all:
              $(flascc)/usr/bin/swig -as3 gme.i
              $(flascc)/usr/bin/genfs --type=embed testfiles testfs
              java -jar C:\\FlasCC_1.0.0\\sdk\\usr\\lib\\asc2.jar -merge -md -import \
                        C:\\FlasCC_1.0.0\\sdk\\usr\\lib\\InMemoryBackingStore.abc \
                        -import C:\\FlasCC_1.0.0\\sdk\\usr\\lib\\builtin.abc \
                        -import C:\\FlasCC_1.0.0\\sdk\\usr\\lib\\playerglobal.abc \
                        -import C:\\FlasCC_1.0.0\\sdk\\usr\\lib\\BinaryData.abc \
                        testfs*.as
              $(flascc)/usr/bin/g++ gme_wrap.c gme/*.cpp libgme.as testfs*.abc \
                        main.cpp demo/Wave_Writer.cpp -emit-swc=sample.libgme -o libgme.swc
              rm -f libgme.as
              $(flex)/bin/mxmlc -static-link-runtime-shared-libraries \
                        -compiler.omit-trace-statements=false -library-path=libgme.swc \
                        -debug=false demo.as -o demo.swf
    clean:
              rm -f libgme.swc gme_wrap.c gme_wrap.o libgme.as demo.swf testfs* \
    With this Makefile I now get the error
    Error: Failed to execute compiler: Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Failed to run '/cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/bin/avm2-as'
    Makefile:6: recipe for target `all' failed
    make: *** [all] Error 1
    I tried -jvmopt="-XX:MaxPermSize=1400M" for g++ and it seems to run a little longer but I eventually get the same error. If I set -jvmopt="-Xmx=1G" (or any other value than 1G) I get errors in the form
    cc1plus: error in backend: Failed to run /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/bin/llc with args: -jvm=C:\Windo
    ws\system32\java -filetype=obj C:\FlasCC_1.0.0\cygwin\tmp\ccXrLALC.o -o C:\FlasCC_1.0.0\cygwin\tmp\ccXrLALC.o -jvmopt -X
    mx=1G -target-player
    Error:
    LLVM ERROR: Error: Unable to launch the Java Virtual Machine.
    This usually means you have a 32bit JVM installed or have set your Java heap size too large.
    Try lowering the Java heap size by passing "-jvmopt=-Xmx1G" to gcc/g++.
    Stack dump:
    0.      Program arguments: C:\FlasCC_1.0.0\sdk\usr\bin\llc.exe -jvm=C:\Windows\system32\java -filetype=obj C:\FlasCC_1.0
    .0\cygwin\tmp\ccXrLALC.o -o C:\FlasCC_1.0.0\cygwin\tmp\ccXrLALC.o -jvmopt -Xmx=1G -target-player
    1.      Running pass 'Function Pass Manager' on module 'C:\FlasCC_1.0.0\cygwin\tmp\ccXrLALC.o'.
    The files created previous to the g++ call are gme_wrap.c, libgme.as, testfs.rules, testfs_000000.as, testfs_000001.as, and testfs_000001.abc. All the FlasCC samples on my machine build fine. I first had Java 32-bit JRE installed then installed the Java 64-bit JDK. I also have 8GB of RAM. Any help help is always appreciated.
    In the meantime I will try to update the code using as3sig since that seems to be the closest to the Alchemy code.
    I just ran g++ -v in the Makefile and got
    #include "..." search starts here:
    #include <...> search starts here:
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/avm2-unknown-freebsd8/4.2.1/include
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/avm2-unknown-freebsd8/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/backward/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include
    End of search list.
    GNU C++ version 4.2.1 for Adobe AVM2 (Based on Apple Inc. build 5658) (LLVM build) (avm2-unknown-freebsd8)
            compiled by GNU C version 4.5.3.
    GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
    Compiler executable checksum: c7f78fda8142a72c14ad9ea52e954536
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/cc1plus.exe -quiet -v -iprefix /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/
    avm2-unknown-freebsd8/4.2.1/ gme/Ym2612_Emu.cpp -o /tmp/ccNDkxvI.o -swf-version-internal=18 -jvmopt=-Xmx1500M -target-pl
    ayer -quiet -dumpbase Ym2612_Emu.cpp -auxbase Ym2612_Emu -version
    ignoring nonexistent directory "/Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/workspace/alchemy/build/win/sdkoverlay/usr/
    lib/gcc/avm2-unknown-freebsd8/4.2.1/include"
    ignoring nonexistent directory "/cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/w
    orkspace/alchemy/build/win/sdkoverlay/usr/lib/gcc/avm2-unknown-freebsd8/4.2.1/../../../../ avm2-unknown-freebsd8/include"
    #include "..." search starts here:
    #include <...> search starts here:
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/avm2-unknown-freebsd8/4.2.1/include
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/avm2-unknown-freebsd8/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/backward/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include
    End of search list.
    GNU C++ version 4.2.1 for Adobe AVM2 (Based on Apple Inc. build 5658) (LLVM build) (avm2-unknown-freebsd8)
            compiled by GNU C version 4.5.3.
    GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
    Compiler executable checksum: c7f78fda8142a72c14ad9ea52e954536
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/as.exe -o /tmp/ccuF6LPQ.o libgme.as -target-player
    Error: Failed to execute compiler: Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Failed to run '/cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/bin/avm2-as'
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/cc1plus.exe -quiet -v -iprefix /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/
    avm2-unknown-freebsd8/4.2.1/ main.cpp -o /tmp/ccgyfB8y.o -swf-version-internal=18 -jvmopt=-Xmx1500M -target-player -quie
    t -dumpbase main.cpp -auxbase main -version
    ignoring nonexistent directory "/Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/workspace/alchemy/build/win/sdkoverlay/usr/
    lib/gcc/avm2-unknown-freebsd8/4.2.1/include"
    ignoring nonexistent directory "/cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/w
    orkspace/alchemy/build/win/sdkoverlay/usr/lib/gcc/avm2-unknown-freebsd8/4.2.1/../../../../ avm2-unknown-freebsd8/include"
    #include "..." search starts here:
    #include <...> search starts here:
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/avm2-unknown-freebsd8/4.2.1/include
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/avm2-unknown-freebsd8/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include/c++/4.2.1/backward/
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/include
    End of search list.
    GNU C++ version 4.2.1 for Adobe AVM2 (Based on Apple Inc. build 5658) (LLVM build) (avm2-unknown-freebsd8)
            compiled by GNU C version 4.5.3.
    GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
    Compiler executable checksum: c7f78fda8142a72c14ad9ea52e954536
    /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/cc1plus.exe -quiet -v -iprefix /cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../usr/lib/
    avm2-unknown-freebsd8/4.2.1/ demo/Wave_Writer.cpp -o /tmp/ccm2vW5Q.o -swf-version-internal=18 -jvmopt=-Xmx1500M -target-
    player -quiet -dumpbase Wave_Writer.cpp -auxbase Wave_Writer -version
    ignoring nonexistent directory "/Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/workspace/alchemy/build/win/sdkoverlay/usr/
    lib/gcc/avm2-unknown-freebsd8/4.2.1/include"
    ignoring nonexistent directory "/cygdrive/c/FlasCC_1.0.0/sdk/usr/bin/../../Users/Shared/Jenkins/Home/jobs/Alchemy2_OSX/w
    orkspace/alchemy/build/win/sdkoverlay/usr/lib/gcc/avm2-unknown-freebsd8/4.2.1/../../../../ avm2-unknown-freebsd8/include"
    So it gets fairly far... but who is Jenkins? I assume that's not you since it's coded into 12 files of the FlasCC SDK. Weird.
    EDIT: I just realized Jenkins is a piece of software not a user or developer who coded their paths into FlasCC.
    EDIT2: It builds on Mac! I don't see out.wav being output but code complete functions show up for the library libgme in Flash Builder. I'll try to write some code to output audio to the Flash sound buffer.
    EDIT3: I was able to save out.wav with a ByteArray, a FileReference save dialog and a wav format header function. I forgot Flash doesn't really allow for writing files directly to a local disk. I was also able to playback sound within the swf much like game-music-emu-flash. Still no luck with getting it to build on Cygwin though.

  • Notes on migrating from Alchemy to FlasCC (compile the SWC)

    I just ported Ralph Hauwert's Alchemy lookup-table effects example to FlasCC.
    The source code:
    https://flaswf.googlecode.com/svn/trunk/flaswfblog/Tutorials/FlasCC_SWC
    Here you can find my notes for the port:
    http://bruce-lab.blogspot.com/2012/12/migrating-from-alchemy-to-flascc.html
    Hope these can help those who are migrating from Alchemy to FlasCC.

    Yeah, nice tutorial, thanks!

  • Is there a limit to the amount of SWCS I can use in my Flash Builder app?

    I have 3 swc folders in my flash builder project that includes about 40 swcs total. Each swc is a simple flash animation with a size of about 500 kb each. When I include and complile about 20 of them in my project, things work fine.
    When I try to include all my swcs, the app compiles, but when i make changes in my code and save those changes, each time the compile becomes slower and eventually my flash builder freezes at about 52%, gives me a "java heap error" message, and then crashes. After restarting FB, when I take out most of the swcs from the build, FB acts normal again. Attached is a screen shot of my error.
    Is there a limit in size or amount of swcs that I can use in my FB application?

    There are no limits. But there is a known memory leak (which is being fixed for a later release).
    Would it be possible to attach a sample SWC so that we can confirm whether this is a known leak or not? I'll take care of filing this in bugs.adobe.com.
    Meanwhile, in your Flash Builder installation directory, you can edit FlashBuilder.ini to bump up max heap size by editing:
    -Xmx512m
    to
    -Xmx800m

  • How to include a SWC using custom Console?

    Currently, it appears as if it is not possible to include an external SWC for use in a custom Console implementation.
    For instance, assume that I have a SWC: Foo.swc that contains the class
    com.test::Foo
    I also have a custom com.adobe.flascc.Console implementation which imports and uses com.test.Foo from the Foo.swc library.
    I've managed to get my SWF to compile without a problem, but I get the following run-time error:
    VerifyError: Error #1014: Class com.test::Foo could not be found.
    Here's how I've setup the compile:
    CCC:=$(FLASCC)/usr/bin/g++
    Console.abc:
              $(ASC) -merge -md -abcfuture -AS3 -optimize -strict \
                        -import $(call nativepath,$(FLASCC)/usr/lib/builtin.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/playerglobal.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/BinaryData.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/ISpecialFile.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/IBackingStore.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/IVFS.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/InMemoryBackingStore.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/PlayerKernel.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/CModule.abc) \
                        -import $(call nativepath,$(FLASCC)/usr/lib/C_Run.abc) \
                        -li $(call nativepath,./aslibs/Foo.swc) \
                        -le $(call nativepath,./aslibs/framework.swc) \
                            Console.as -outdir . -out Console
    test.swf: Console.abc
              $(CCC) -jvmopt=$(JVMARGS) -Wall -g -O0 -fno-exceptions -o test.swf \
                        main.cpp \
                        -lAS3++ \
                        -fllvm-llc-opt=-ascopt=-li \
                        -fllvm-llc-opt=-ascopt=$(call nativepath,./aslibs/Foo.swc) \
                        -fllvm-llc-opt=-ascopt=-le \
                        -fllvm-llc-opt=-ascopt=$(call nativepath,./aslibs/framework.swc) \
                        -symbol-abc=Console.abc \
                        -emit-swf \
                        -swf-size=800x600
    I've also attempted adding -no-swf-preloader assuming that the problem was linkage in the first frame, but this did not work either.
    If I only use asc2.jar to generate a SWF (using the -li and -le options), it works, but I need access to the libraries via flascc Console.
    Any ideas?
    Regards,
    Matt Bolt

    Thanks for the response and the suggested work-around! This solution worked exactly as you described and was precisely the result I was looking for.
    --- Some Follow Up Ranting and Questions ---
    Was the behavior I mentioned in my previous post a bug? It seems like the issue may be due to the following:
    * Compiling .as to .abc referencing a swc will simply refer to the contents of the swc to resolve external references and there's nothing in the abc itself referring to the external library (Could be way off here).
    * Compiling .as to .swf will resolve fully.
    * Because we compile Console to abc first, we lose the ability to resolve external references before going to SWF.
    If the above statements are correct, then -li and -le behave identically when compiling to .abc, and the behavior mentioned in my previous post would make sense.
    What is strange to me is that the ASC provides a way to compile to .abc but no way to link .abc and output a swf. Perhaps it's because of the loss of data that occurs (full resolution tracks dependencies in memory).
    I'm not sure that what I'm claiming is even remotely close to the truth, but it seems accurate based on my observations. If anyone knows for sure, please feel free to set me straight.

  • Bandwidth Video Freeze and Switching Subscribers

    Hi,
    How much upload speed to you need to have to ensure a smooth video playback.
    We also have a Multi Subscriber setup. So sometimes we want a user to be in the big cam. But then switc them to one of the samller subscribers (3 subscribers in all) This seems to cause the app to freeze.
    Could it be a memory issue because of flushing out the webcam subscribers (setting them to NULL then adding userIDs)
    Could it be bandwith?
    is switching users between subscribers just a bad idea?
    Thanks.
    ...russ

    Hi Russ,
    Regarding the SWC version, you should be able to see it in your Flash Builder's Console (towards the top) when running your application.
    I got this when running one of my applications:
    Wed Mar 30 11:05:45 GMT-0700 2011    LCCS SDK Version : 1.3.7.1    Player Version : WIN 10,1,53,64
    Cheers,
    Julien
    LCCS Quality Engineering

  • ANE Native extension freezes app when debug=false and using non-interpreted IOS build

    There’s a problem with Adobe Air iOS that is somewhat known, and that problem has an unknown variant that’s very tricky.
    The problem is with linking optimized flash and ANEs. If the linker treats the ANE as an included SWC, calls to the library will hang the app. But it will work in the ADB simulator, and it will work in debug builds and in interpreted builds. It only manifests when a release build is attempted.
    The known remedy for this problem is to specify the ANE code as extern to the app, usually via external-library-path argument instead of library-path option.
    What I’ve learned is that even with correct linkage specified, our apps show this problem anyway. And the reason is that the calls between the app and the ANE happen in a non-first frame. A simple test case of a preloader on frame #1 and all the content on second frame will “intern” the symbols of the ANE, breaking the application; but only in non debug, non-interpreted builds, like ipa-test and ipa-ad-hoc.
    Adobe, please detect and report this condition so others won’t all the problems to deal with that I’ve encountered. Thanks.

    I seem to be running into freezes with my ANE's and it has been hard to troubleshoot and came across your post.  I am using Flash CS6 so not sure how to apply your remedy.  The options in CS6 for library path ANE's are 'Merged into Code' and 'Runtime Shared Library'.  Currently it is merged, not sure if this is the same issue or not but I am trying everything here...

Maybe you are looking for

  • Illustrator and Bridge CS6 don't launch in Mac 10.8.5

    Recently, when I try to run Illustrator and Bridge CS6, my mac doesn't let me do while initializing (it shows a splash) and gives me "Adobe Illustrator CS6 quit unexpectedly". I can run Acrobat, InDesign, and Photoshop (package of CS6 design standard

  • Using a BitSet object

    Hello ! I would like to store into MySQL a BitSet object. I am able to only use a string to do that :BitSet subBS = new BitSet(); String strSubSet = ""; subBS = Fingerprinter.getFingerprint(mol, 2048, 6); strSubSet = subBS.toString();This string coul

  • How to propogate the error message on the layout screen

    Hi, I have a FM call in the OnAction of a button, if that FM returns an exception, the system throws an exception raise exception type cx_wd_no_handler         exporting           textid        = cx_wd_no_handler=>kind_old           old_exception = `

  • Buying an iPhone at upgrade pricing, then selling it?

    Hey everyone, Currently I have an iPhone 4 and I have an available upgrade. I don't really need an iPhone 5 for any real reason other than it's a "new" phone. I was wondering if it's possible to simply buy the iPhone 5 at a discounted price then sell

  • How to schedule a service to run before network goes down

    Hi I wrote a new smf service and added it to the repository. When running with "stop" (when the system goes down) it sends an alert to another machine. My question is : How can I schedule that service to run just before network services go down? anot