Hi Harbs,

Having a look at that part of the code:

            ASScope pkgScope = scope;
            while (!(pkgScope instanceof PackageScope))
                pkgScope = pkgScope.getContainingScope();      <!—This is where 
it goes BOOM
            String[] imports = pkgScope.getImports();

It seems the scope is null (unfortunately if pkgScope is null it is not of type 
PackageScope and satisfies the loop condition. Inside the loop everything goes 
BOOM then.

Unfortunately, these NPEs make it very difficult to see what’s the real 
problem. In these cases, I usually set a NullPointerException breakpoint and 
have a look at what’s happening in the moment it explodes. 
When building with Maven it’s simple (I just click the “debug” button of my 
maven build). No Idea how to do that with Ant though.

Chris




Am 06.03.17, 15:01 schrieb "Harbs" <[email protected]>:

    Anyone have an idea what this error might be?
    
       [compc] 
/Users/harbs/Documents/git/PrintUI/printui-flexjs/text_engine/frameworks/tlf/src/org/apache/flex/textLayout/container/TextContainerManager.as
 Error: Internal error in ABC generator subsystem, when generating code for: 
/Users/harbs/Documents/git/PrintUI/printui-flexjs/text_engine/frameworks/tlf/src/org/apache/flex/textLayout/container/TextContainerManager.as:
 java.lang.NullPointerException
        [compc]         at 
org.apache.flex.compiler.internal.projects.FlexProject.doubleCheckAmbiguousDefinition(FlexProject.java:2152)
        [compc]         at 
org.apache.flex.compiler.internal.scopes.ASScopeCache.findProperty(ASScopeCache.java:173)
        [compc]         at 
org.apache.flex.compiler.internal.scopes.ASScope.findProperty(ASScope.java:1428)
        [compc]         at 
org.apache.flex.compiler.internal.definitions.references.LexicalReference.resolve(LexicalReference.java:71)
        [compc]         at 
org.apache.flex.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:1054)
        [compc]         at 
org.apache.flex.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:1094)
        [compc]         at 
org.apache.flex.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:876)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.ClassDirectiveProcessor.declareVariable(ClassDirectiveProcessor.java:1166)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:226)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:188)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass(GlobalDirectiveProcessor.java:429)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:206)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:188)
        [compc]         at 
org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:122)
        [compc]         at 
org.apache.flex.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest(ASCompilationUnit.java:389)
        [compc]         at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(CompilationUnitBase.java:873)
        [compc]         at 
org.apache.flex.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBase.java:108)
        [compc]         at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:310)
        [compc]         at 
org.apache.flex.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase.java:306)
        [compc]         at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:228)
        [compc]         at 
org.apache.flex.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:222)
        [compc]         at 
java.util.concurrent.FutureTask.run(FutureTask.java:266)
        [compc]         at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        [compc]         at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        [compc]         at java.lang.Thread.run(Thread.java:745)
    
    If I would have to guess, it would be coming from this code:
            public override function dispatchEvent(event:Event):Boolean
            {
                if (event.type == DamageEvent.DAMAGE)
                {
                    _textDamaged = true;
                    if (_composeState == COMPOSE_FACTORY)
                        _damaged = true;
                }
                else if (event.type == FlowOperationEvent.FLOW_OPERATION_BEGIN)
                {
                    //TODO fix mouseChildren
    //              if (_container.mouseChildren == false)
    //                  _container.mouseChildren = true;
                }
                var result:Boolean = super.dispatchEvent(event);
                if (!result)
                    event.preventDefault();
                return result;
            }
    
    
    

Reply via email to