airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

'ABC generator An internal error occurred in the subsystem' with AIRSDK 33.1.1.889 #1974

Open wmtj opened 2 years ago

wmtj commented 2 years ago

When I replace AIRSDK 33.1.1.856 with 33.1.1.889, a lot of compiler errors show up (FlashBuilder 4.7), like this :

在为以下对象生成代码时,ABC generator 子系统中发生内部错误: E:\work\Projects\xxx\src\asfiles\BarGraph.as: java.lang.AbstractMethodError: com.adobe.flexbuilder.multisdk.compiler.internal.ApplicationTargetSettings.omitTraceStatements()Z at com.adobe.flash.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_functionCall_common(ABCGeneratingReducer.java:4082) at com.adobe.flash.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_functionCallExpr_to_expression(ABCGeneratingReducer.java:4018) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.action_329(CmcEmitter.java:5357) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:8616) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39704) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39723) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39723) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39732) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39732) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39723) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39732) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39732) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39723) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39703) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681) at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.burm(CmcEmitter.java:39983) at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateInstructions(ABCGenerator.java:232) at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:397) at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:351) at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateFunction(ABCGenerator.java:266) at com.adobe.flash.compiler.internal.as.codegen.ClassDirectiveProcessor.declareFunction(ClassDirectiveProcessor.java:647) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:215) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:189) at com.adobe.flash.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass(GlobalDirectiveProcessor.java:423) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:207) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:189) at com.adobe.flash.compiler.internal.as.codegen.GlobalDirectiveProcessor.declarePackage(GlobalDirectiveProcessor.java:449) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:224) at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:189) at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:126) at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest(ASCompilationUnit.java:374) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:870) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBase.java:107) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:309) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:305) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2038) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at com.adobe.flash.compiler.internal.units.requests.RequestMaker.getRequest(RequestMaker.java:188) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.getABCBytesRequest(CompilationUnitBase.java:614) at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleOutgoingDependenciesRequest(ASCompilationUnit.java:456) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRequest(CompilationUnitBase.java:886) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBase.java:107) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:378) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:374) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2038) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at com.adobe.flash.compiler.internal.units.requests.RequestMaker.getRequest(RequestMaker.java:188) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.getOutgoingDependenciesRequest(CompilationUnitBase.java:626) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.startBuildAsync(CompilationUnitBase.java:1067) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.startParsingImports(CompilationUnitBase.java:924) at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleOutgoingDependenciesRequest(ASCompilationUnit.java:450) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRequest(CompilationUnitBase.java:886) at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBase.java:107) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:378) at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase.java:374) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228) at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) BarGraph.as /xxx/[source path] xxx-src/asfiles 第 0 行 Flex 问题

@ajwfrost Is it a configuration error? How can I fix it ?

ajwfrost commented 2 years ago

Hi

So this sounds like the Flash Builder compiler has classes that implement interfaces that are defined in the AIR SDK compiler:

com.adobe.flexbuilder.multisdk.compiler.internal.ApplicationTargetSettings.omitTraceStatements

means that this ApplicationTargetSettings class is implementing an interface (ITargetSettings) in the new AS3 compiler where we just added a new method, omitTraceStatements.

Given that Flash Builder is not supported and will likely have an increasing numbers of issues due to its earlier tight linkage with the AIR tools, I would say we have a number of options:

  1. Can you move away from Flash Builder?!
  2. Could you use the "AIR SDK for Flex Developers" which doesn't have the new compiler in it?
  3. Sticking with the older compiler (you can just copy from a previous AIR SDK, lib/compiler.jar)
  4. If we moved up to using Java 1.8, we could have default interface implementations... but not sure whether that would cause knock-on issues with people still using 1.7...

For now my suggestion would be that, if you can't go with the "AIR for Flex" version, then just grab an older compiler.jar file...

thanks

wmtj commented 2 years ago
  1. I will try another IDE.
  2. My project is an 'ActionScript Mobile Project', not a Flex Project. The error mesaages show 'Flex' keyword is strange ...
sjabberwocky commented 2 years ago

@ajwfrost I have the same issue with Flash Builder. Our project is pretty old and it does not look fine to change IDE at the moment.

Is it possible to revert this changes and keep Flash Builder compatibility further?

raresn commented 2 years ago

@ajwfrost i think it would be smart for you guys to create a tool that changes FB projects to InteliJ. Would save both us and you a lot of back and forth movement.

ajwfrost commented 2 years ago

Hi @wmtj @sjabberwocky - below is a compiler.jar file (zipped up) that you can put into the "lib" folder and that has changed how we do this, leaving the ITargetSettings interface alone which should mean that the Flash Builder classes are no longer causing errors here... would be grateful if you can check that this does work for you!

@raresn yes we've wondered about it, I was also thinking it could be a useful feature for the Moonshine developers to implement.. part of the challenge of course is that we don't know exactly what Flash Builder is actually doing. We can look at the settings within the .actionScriptProperties file and try to work it out.. actually I may see whether Adobe has any old documentation on this format!

thanks compiler.zip

sjabberwocky commented 2 years ago

@ajwfrost Thanks for fixed compiler, it works fine.