AS3Common Bytecode + ASC2 - actionscript-3

I'm using the as3common bytecode library to inspect swf files. But for some reason it doesn't work with swf files created with the asc2 compiler. Does somebody has a solution for this?
The line ByteCodeType.fromByteArray(loaderInfo.bytes); throws this error:
Exception fault: RangeError: Error #1125: The index 129 is out of range 127.
at org.as3commons.bytecode.io::AbstractAbcDeserializer/deserializeConstantPool()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/org/as3commons/bytecode/io/AbstractAbcDeserializer.as:248]
at org.as3commons.bytecode.io::AbcDeserializer/deserialize()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/org/as3commons/bytecode/io/AbcDeserializer.as:122]
at org.as3commons.bytecode.tags.serialization::DoABCSerializer/read()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/org/as3commons/bytecode/tags/serialization/DoABCSerializer.as:63]
at org.as3commons.bytecode.swf::SWFWeaverFileIO/readTag()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/org/as3commons/bytecode/swf/SWFWeaverFileIO.as:158]
at org.as3commons.bytecode.swf::SWFWeaverFileIO/read()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/org/as3commons/bytecode/swf/SWFWeaverFileIO.as:120]
at WorkerFromClass/initTests()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/WorkerFromClass.as:31]
at WorkerFromClass()[/Users/smorales/Documents/Data/dev/workspaces/educalabs/WorkerFromClass/src/WorkerFromClass.as:22]
I already tried to find more infos about the usage but it seems so that the official site is down: http://www.as3commons.org.
Thank you very much

Related

Identifier "cusparseXXX" is undefined on cuda11

I'm building a package tested for CUDA 9,10 from source, trying to compile it for CUDA11.
I've already changed gencode=arch=compute_70 (was set on 30), and added
target_link_libraries(tsnecuda ${CUDA_cusparse_LIBRARY})
Unfortunately, I still get
tsne-cuda/src/util/math_utils.cu(153): error: identifier "cusparseScsr2csc" is undefined
tsne-cuda/src/util/math_utils.cu(165): error: identifier "cusparseXcsrgeamNnz" is undefined
tsne-cuda/src/util/math_utils.cu(195): error: identifier "cusparseScsrgeam" is undefined
3 errors detected in the compilation of "tsne-cuda/src/util/math_utils.cu".
CMake Error at tsnecuda_generated_math_utils.cu.o.cmake:276 (message):
Error generating file
tsne-cuda/build/CMakeFiles/tsnecuda.dir/src/util/./tsnecuda_generated_math_utils.cu.o
Is there a chance the build process somehow ignores my target_link_libraries? Should I add something else?
Undefined identifier is a compilation issue, not a linking issue.
At least part of the problem here is that CUDA deprecated and removed some functionality from cusparse, including cusparse<t>csr2csc(). The code would need to be rewritten to compile correctly under the latest versions of CUDA 11.x.
For example, for csr2csc, the call to cusparseScsr2csc might be refactored to use this function instead.
One example of deprecation/removal notice for cusparse<t>csr2csc is given here.

Access violation, NotEnemy is 0xBF800000

I use cocos2d-x to do the game. After running my program for a while, the variable "NotEnemy" will always report the "access violation" error. NotEnemy is the variable I set in EventListenerPhysicsContact, always using cocos2d-x There will be errors like the title, all I want to know when there is such a mistake, is there any solution, I hope someone can tell me, right, NotEnemy I am assigned this way, auto NotEnemy=contact.getShapeB( )->getBody()->getNode();
I tried setting it to nullptr after using NotEnemy, but it didn't work. Now it generates a new error "Exception at 0x76EE35D2 (located in TankBattle.exe): Microsoft C++ Exception: std::exception, in memory Location 0x00C5F548.
There is an unhandled exception at 0x7640E6EB (ucrtbase.dll) (in TankBattle.exe): A critical program exit has been requested. ", used to be an error about access permissions conflicts, but they are all problems with NotEnemy, and they all appear in the "NotEnemy->SetPosition(Vec2(166,14))" statement.

WindowsError: exception: access violation reading 0x00007FFC00000000

I am running a program that uses Trace32 and when I run the program I error at the tapAccessShiftRaw method in trace32.py (this comes in the trace32 install) and get the error above. I have been looking around at some different posts related to this issues and tried things that are mentioned in posts such as this: Python: WindowsError: exception: access violation reading 0x00000000
or
"WindowsError: exception: access violation..." - ctypes question
But unfortunately none of these solutions seem to help. I'm running this on Windows 10. Any advice on how I can debug this issue would be really appreciated.

flashdevelop error while loading initial content

I have been struggling with this stupid error from couple of hours. Have tried everything but it still persists. I'm unable to run any Flash Mobile AS3 project in FlashDevelop.
This is what it says in Output panel:
Debugger startup error. For troubleshooting see: http://www.flashdevelop.org/wikidocs/index.php?title=F.A.Q
Error details: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
at net.sf.jni4net.jni.JNI.Init()
at net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
at net.sf.jni4net.Bridge.CreateJVM()
at net.sf.jni4net.Bridge.CreateJVM(BridgeSetup setup)
at FlashDebugger.DebuggerManager.Start(Boolean alwaysStart)
[Capturing traces with FDB]
and this is what it shows in the console/command prompt:
error while loading initial content
Please if anyone had seen this error and solved it successfully, I would really appreciate any help. Screenshot attached below.
Thanks!
Looks like you are using wrong Java SDK version 64 bit rather than 32 bit which FlashDevelop requires

Flash Builder debugging with line numbers on exception

Is is possible to debug actionscript via Flash Builder to see line number where exception happened? Currently i only see error code and description of error.
Any good articles are welcome.
Thanks.
If you catch an error you can trace the result of the
getStackTrace()
method. look here: as3 reference
In the compiler options panel of your run configuration, set -debug=true. This should enable the output of line numbers for all stack traces, including those of uncaught errors.