Troubleshooting Error #1065

This post explains why you might see error #1065 when creating a SWF or SWC in FlasCC.

The full text of the runtime error is:

Error #1065: Variable avm2.intrinsics.memory::casi32 is not defined.

Typically this error is experienced when you have built a FlasCC SWF that uses multi-threading, but the version of the Flash Player that is running the SWF does not support multi-threading. Multi-threading in FlasCC requires at least Flash Player 11.5.

To fix this error you will need to upgrade your Flash Player to at least version 11.5.

If your application does not use any multi-threading features, but you are still experiencing this error check to make sure that you aren’t compiling with the -pthread flag. When you compile with -pthread you link in some thread-safe variants of parts of the standard library that require threading to actually be supported.

Note that multi-threaded code is not yet supported by Flash Player in Google Chrome (PPAPI). Google
and Adobe are working to provide support in a future version of Chrome.

Learn more about multi-threading in FlasCC by reading the concurrency section of the reference guide.