You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by doug777 <do...@gmail.com> on 2018/03/16 02:07:03 UTC

How Can I Find Root Cause of Internal Error?

In Moonshine selecting Build As JavaScript I get the following error. The
bin/js-debug folder contains 11 compiled files (about 10% of the total).

How can I find out what it is in my code that is causing this error?

Internal error: java.lang.StringIndexOutOfBoundsException: String index out
of range: 0 java.lang.String.charAt(String.java:658)
org.apache.royale.compiler.internal.codegen.js.jx.LiteralEmitter.emit(LiteralEmitter.java:159)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitLiteral(JSRoyaleEmitter.java:850)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitLiteral(ASBlockWalker.java:466)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:373)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.as.ASEmitter.stringifyNode(ASEmitter.java:1574)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.outputBindingInfoAsData(MXMLRoyaleEmitter.java:1244)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitBindingData(MXMLRoyaleEmitter.java:1196)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitDocument(MXMLRoyaleEmitter.java:637)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWalker.visitDocument(MXMLRoyaleBlockWalker.java:69)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:84)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWalker.visitFile(MXMLRoyaleBlockWalker.java:61)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:90)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitCompilationUnit(MXMLBlockWalker.java:168)
org.apache.royale.compiler.internal.codegen.mxml.MXMLWriter.writeTo(MXMLWriter.java:71)
org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.java:374)
org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:240)
org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:197)
org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:345)
org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:281)
org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:240)
org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:222)

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
OK thanks very much,

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
A BinaryOperator is most expressions with the
expression-operator-expression pattern.

1 + 2
obj.prop (which is also a MemberAccessExpression)

HTH,
-Alex

On 3/16/18, 2:26 AM, "doug777" <do...@gmail.com> wrote:

>Hi Piotr,
>
>Problem for me is I don't know where to look and there are still about 80
>files not built. So the problem is somewhere in that lot, I guess.
>
>It's probably something trivial like the other two errors, but I need some
>guidance on what sort of faulty code could cause a BinaryOperatorEmitter
>failure.
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C8a3c5
>60c05e54f4b548508d58b2013f4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36567892243975526&sdata=%2BptziM%2FDfaj9nGJV%2BL%2F%2BZv8cajiMPIo8JKbU2kl%
>2B4sM%3D&reserved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Piotr,

Problem for me is I don't know where to look and there are still about 80
files not built. So the problem is somewhere in that lot, I guess.

It's probably something trivial like the other two errors, but I need some
guidance on what sort of faulty code could cause a BinaryOperatorEmitter
failure.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Alex,

Before doing the first Build JavaScript, I ensured that there were no errors
or warnings from the Flex compiler.  All the things the js compiler is
finding were passed by the Flex compiler.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Can you attach the two files to a GitHub issue?  In theory then nightly
build server has file encoding set to UTF8.  I want to see where/why it is
going bad.

You can try to build your own SWC or maybe see if there are converters
from your windows code-page to UTF8.

HTH,
-Alex

On 3/18/18, 7:35 PM, "doug777" <do...@gmail.com> wrote:

>I think I'm using Nightly Build 0.9.3 #489.
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C9c772
>55e6250478ce6ef08d58d421b1f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36570237415019891&sdata=8eZwEM6y7gjOg0bjB1vk7aVY%2F%2B1q7ybi%2BzucAOLHkAI%
>3D&reserved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
I think I'm using Nightly Build 0.9.3 #489.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Yes that solved the problem.

No errors now but a few more warnings which I will take a look at now.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
That should be good.  Actually, first delete the bad files and recompile
and then if you get the error, attach the to a Github issue.

Thanks,
-Alex

On 3/18/18, 7:42 PM, "doug777" <do...@gmail.com> wrote:

>Maybe that's not right, I'm just downloading from
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheroya
>leci.westus2.cloudapp.azure.com%3A8080%2Fjob%2Froyale-asjs_jsonly%2FlastSu
>ccessfulBuild%2Fartifact%2Fout%2Fapache-royale-0.9.3-bin-js.zip&data=02%7C
>01%7Caharui%40adobe.com%7Ce325172ee16048fca67608d58d430bba%7Cfa7b1b5a7b344
>38794aed2c178decee1%7C0%7C0%7C636570241456124717&sdata=jpMzMtw%2FCXS2%2BtJ
>PuH1ZjRFPPJbNXR7ON6IHbFT8bhg%3D&reserved=0
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ce3251
>72ee16048fca67608d58d430bba%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36570241456124717&sdata=k1mFuUpxls2cxYmG8kW7S%2FDd7TuFi25W2dDq5RsIZoI%3D&r
>eserved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Maybe that's not right, I'm just downloading from
http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/lastSuccessfulBuild/artifact/out/apache-royale-0.9.3-bin-js.zip 

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Hi Doug,

What SDK are you using?  Nightly?  Something you built from the repos?

-Alex

On 3/18/18, 6:39 PM, "doug777" <do...@gmail.com> wrote:

>Hi Alex,
>
>Adding this environment variable gets rid of one of the errors, but leaves
>the two from the sdk:
>
>: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
>println
>: SEVERE: ERROR - Cannot read file
>.../bin/js-debug/org/apache/royale/textLayout/elements/ListElement.js:
>Failed to read:
>...\bin\js-debug\org\apache\royale\textLayout\elements\ListElement.js, is
>this input UTF-8 encoded?
>: 
>: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
>println
>: SEVERE: ERROR - Cannot read file
>.../bin/js-debug/org/apache/royale/textLayout/factory/StringTextLineFactor
>y.js:
>Failed to read:
>...\bin\js-debug\org\apache\royale\textLayout\factory\StringTextLineFactor
>y.js,
>is this input UTF-8 encoded?
>: 
>: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
>printSummary
>: WARNING: 2 error(s), 0 warning(s)
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C55419
>754988744bf5f5108d58d3a3e17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36570203677972042&sdata=Tmz6rQkYQVdQ2PQhBWLUBzDxhlkrq1TsLVs0eLwEQsg%3D&res
>erved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Alex,

Adding this environment variable gets rid of one of the errors, but leaves
the two from the sdk:

: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
println
: SEVERE: ERROR - Cannot read file
.../bin/js-debug/org/apache/royale/textLayout/elements/ListElement.js:
Failed to read:
...\bin\js-debug\org\apache\royale\textLayout\elements\ListElement.js, is
this input UTF-8 encoded?
: 
: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
println
: SEVERE: ERROR - Cannot read file
.../bin/js-debug/org/apache/royale/textLayout/factory/StringTextLineFactory.js:
Failed to read:
...\bin\js-debug\org\apache\royale\textLayout\factory\StringTextLineFactory.js,
is this input UTF-8 encoded?
: 
: Mar 19, 2018 9:30:23 AM com.google.javascript.jscomp.LoggerErrorManager
printSummary
: WARNING: 2 error(s), 0 warning(s)

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Warnings shouldn't stop the compiler from producing output you can try to
run.  Public var warnings are hinting that some code may not survive JS
optimization.  It depends on if those public vars represent external data.
 If they are for internal data structures it has a better chance of
working.

On 3/18/18, 6:53 PM, "doug777" <do...@gmail.com> wrote:

>Just noticed this confirmation after all the public var warnings :
>
>: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
>: The project '...' has been successfully compiled and optimized.
>: 19.505789942 seconds
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cfe0d8
>1411252401787af08d58d3c3297%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36570212058457961&sdata=%2Bp8%2Bl6YmfkoH5V2l%2Fi2UyWx42BAp%2BuntSIRcIwR%2B
>Qkc%3D&reserved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Just noticed this confirmation after all the public var warnings :

: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
: The project '...' has been successfully compiled and optimized.
: 19.505789942 seconds

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Hi Doug,

You can probably ignore the "public var" warning unless you want to run
the js-release version.

Try setting the environment variable:

  JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8



I don't think it is the input side of the MXML.  Two of the files are
pre-compiled JS files from a SWC.  If you built those yourself, you might
need to rebuild after setting the environment variable.

HTH.  I think I'm done for tonight.
-Alex

On 3/17/18, 11:41 PM, "doug777" <do...@gmail.com> wrote:

>Hi Alex,
>
>Now that is fantastic!
>
>The error it was failing on was in a .as file that was unchanged from the
>old Flex project where it worked.
>
>The problem is that when a Number expression of the form
>myObj[myArr[i].name] is on the right-hand side of = or == it needs to be
>explicitly cast to Number().
>
>But now that the js compiler shows you very clearly where the problem is,
>this is just a trivial thing.
>
>Now the whole project compiles with a big bunch of warnings about changing
>public vars to getter/setters, which I am working through.
>
>Apart from this I am left only with these three errors:
>
> Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
>println
>: SEVERE: ERROR - Cannot read file .../bin/js-debug/Main.js: Failed to
>read:
>...\bin\js-debug\Main.js, is this input UTF-8 encoded?
>: 
>: Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
>println
>: SEVERE: ERROR - Cannot read file
>.../bin/js-debug/org/apache/royale/textLayout/elements/ListElement.js:
>Failed to read:
>...\bin\js-debug\org\apache\royale\textLayout\elements\ListElement.js, is
>this input UTF-8 encoded?
>: 
>: Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
>println
>: SEVERE: ERROR - Cannot read file
>.../bin/js-debug/org/apache/royale/textLayout/factory/StringTextLineFactor
>y.js:
>Failed to read:
>...\bin\js-debug\org\apache\royale\textLayout\factory\StringTextLineFactor
>y.js,
>is this input UTF-8 encoded?
>
>Since all the mxml files in the project start with the line : <?xml
>version="1.0" encoding="utf-8"?> , I'm not quite sure what this is about?
>
>Doug
>
>
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C52e70
>7a9b241416d93d308d58c9b471f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36569520917713002&sdata=9Af7mx5oZbQf3O4Gb7Qzy89I4rh0pabHXs9SAjNiyQI%3D&res
>erved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Alex,

Now that is fantastic!

The error it was failing on was in a .as file that was unchanged from the
old Flex project where it worked.

The problem is that when a Number expression of the form
myObj[myArr[i].name] is on the right-hand side of = or == it needs to be
explicitly cast to Number().

But now that the js compiler shows you very clearly where the problem is,
this is just a trivial thing.

Now the whole project compiles with a big bunch of warnings about changing
public vars to getter/setters, which I am working through.

Apart from this I am left only with these three errors:

 Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
println
: SEVERE: ERROR - Cannot read file .../bin/js-debug/Main.js: Failed to read:
...\bin\js-debug\Main.js, is this input UTF-8 encoded?
: 
: Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
println
: SEVERE: ERROR - Cannot read file
.../bin/js-debug/org/apache/royale/textLayout/elements/ListElement.js:
Failed to read:
...\bin\js-debug\org\apache\royale\textLayout\elements\ListElement.js, is
this input UTF-8 encoded?
: 
: Mar 18, 2018 1:16:00 PM com.google.javascript.jscomp.LoggerErrorManager
println
: SEVERE: ERROR - Cannot read file
.../bin/js-debug/org/apache/royale/textLayout/factory/StringTextLineFactory.js:
Failed to read:
...\bin\js-debug\org\apache\royale\textLayout\factory\StringTextLineFactory.js,
is this input UTF-8 encoded?

Since all the mxml files in the project start with the line : <?xml
version="1.0" encoding="utf-8"?> , I'm not quite sure what this is about?

Doug





--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Hi Doug,

Is that empty itemRenderer something that the Flex compiler tolerated or
was it something that happened as part of your migration?

You can grab the latest nightly build to try the compiler the reports
location on unexpected exceptions.

Thanks,
-Alex

On 3/16/18, 10:47 PM, "doug777" <do...@gmail.com> wrote:

>Hi Alex,
>
>Oh that will be a great help. The other error was something I was playing
>around with and forgot to remove.
>
><js:ButtonBar id="navbar" width="835" selectedIndex="0"
>change="navbarClickHandler(event)">
>	<js:itemRenderer>
>		
>	</js:itemRenderer>
>	<js:beads>
>		<js:DisableChildrenBead/>
>	</js:beads>
></js:ButtonBar>
>
>Removed the empty itemRenderer to solve the problem.
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C7bedc
>eadb532400acae508d58bcaa777%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36568624941541930&sdata=C%2BjlI2qN9Zj4Pv441oAx4yF4aPsODJkrYTUMjOau4Zo%3D&r
>eserved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Alex,

Oh that will be a great help. The other error was something I was playing
around with and forgot to remove.

<js:ButtonBar id="navbar" width="835" selectedIndex="0"
change="navbarClickHandler(event)">
	<js:itemRenderer>
		
	</js:itemRenderer>
	<js:beads>
		<js:DisableChildrenBead/>
	</js:beads>
</js:ButtonBar>

Removed the empty itemRenderer to solve the problem.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Hi Doug,

I pushed the changes that should report better file and line number info
for these exceptions.  If you can post the code that was blowing up the
classFactory that would be great.

Thanks,
-Alex

On 3/16/18, 9:17 AM, "Alex Harui" <ah...@adobe.com> wrote:

>Yes.  In fact, that's the first fix I'm making before actually fixing the
>code that throws the exception.
>
>-Alex
>
>On 3/16/18, 2:36 AM, "doug777" <do...@gmail.com> wrote:
>
>>It would help so much if the compiler could output the line in the user's
>>code that it was working on at the time of or just prior to the error
>>occurring.
>>
>>Doug
>>
>>
>>
>>--
>>Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>y
>>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C0a85
>>2
>>31b9f0445810b2408d58b2168e4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>6
>>36567897971186345&sdata=BoFiP10p0hT6WgGilHiiLDd9dT36G8spQgmE9OqsvBk%3D&re
>>s
>>erved=0
>


Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Yes.  In fact, that's the first fix I'm making before actually fixing the
code that throws the exception.

-Alex

On 3/16/18, 2:36 AM, "doug777" <do...@gmail.com> wrote:

>It would help so much if the compiler could output the line in the user's
>code that it was working on at the time of or just prior to the error
>occurring.
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C0a852
>31b9f0445810b2408d58b2168e4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36567897971186345&sdata=BoFiP10p0hT6WgGilHiiLDd9dT36G8spQgmE9OqsvBk%3D&res
>erved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
It would help so much if the compiler could output the line in the user's
code that it was working on at the time of or just prior to the error
occurring.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Piotr Zarzycki <pi...@gmail.com>.
Doug,

Just curious how does your code look like ? Do you see where it could
happen ?

Thanks, Piotr

2018-03-16 10:04 GMT+01:00 doug777 <do...@gmail.com>:

> OK found the call to non-existant ItemRenderer.
>
> Now get 31 files built and then another null pointer. What is a
> BinaryOperatorEmitter?
>
> Internal error: java.lang.NullPointerException
> org.apache.royale.compiler.internal.codegen.js.jx.
> BinaryOperatorEmitter.emit(BinaryOperatorEmitter.java:296)
> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.
> emitBinaryOperator(JSRoyaleEmitter.java:838)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.
> visitBinaryOperator(ASBlockWalker.java:525)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:348)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emitConditional(IfEmitter.java:86)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:45)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:33)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitIf(JSEmitter.java:329)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(
> ASBlockWalker.java:343)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:194)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:40)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:29)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitStatement(JSEmitter.java:323)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(
> ASBlockWalker.java:335)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:278)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emitConditional(IfEmitter.java:95)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:45)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:33)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitIf(JSEmitter.java:329)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(
> ASBlockWalker.java:343)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:194)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:40)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:29)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitStatement(JSEmitter.java:323)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(
> ASBlockWalker.java:335)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:278)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.as.
> ASBlockWalker.visitTerminal(ASBlockWalker.java:539)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:182)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emitElse(IfEmitter.java:115)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:69)
> org.apache.royale.compiler.internal.codegen.js.jx.
> IfEmitter.emit(IfEmitter.java:33)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitIf(JSEmitter.java:329)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(
> ASBlockWalker.java:343)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:194)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:40)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:29)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitStatement(JSEmitter.java:323)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(
> ASBlockWalker.java:335)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:278)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.ForLoopEmitter.emit(
> ForLoopEmitter.java:67)
> org.apache.royale.compiler.internal.codegen.js.jx.ForLoopEmitter.emit(
> ForLoopEmitter.java:31)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitForLoop(JSEmitter.java:359)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitFor(
> ASBlockWalker.java:365)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitForLoop(
> ASBlockWalker.java:351)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:175)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:40)
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(
> StatementEmitter.java:29)
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.
> emitStatement(JSEmitter.java:323)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(
> ASBlockWalker.java:335)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:278)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.as.ASEmitter.
> emitMethodScope(ASEmitter.java:867)
> org.apache.royale.compiler.internal.codegen.js.jx.MethodEmitter.emit(
> MethodEmitter.java:145)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitMethod(JSRoyaleEmitter.java:723)
> org.apache.royale.compiler.internal.codegen.js.jx.ClassEmitter.emit(
> ClassEmitter.java:176)
> org.apache.royale.compiler.internal.codegen.js.royale.
> JSRoyaleEmitter.emitClass(JSRoyaleEmitter.java:681)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitClass(
> ASBlockWalker.java:242)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:136)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitter.
> emitPackageContents(JSGoogEmitter.java:182)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitPackage(
> ASBlockWalker.java:230)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:132)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitFile(
> ASBlockWalker.java:209)
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(
> ASNodeSwitch.java:128)
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(
> ASNodeHandler.java:85)
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
> BeforeAfterStrategy.java:110)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(
> ASBlockWalker.java:157)
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.
> visitCompilationUnit(ASBlockWalker.java:174)
> org.apache.royale.compiler.internal.codegen.js.JSWriter.
> writeTo(JSWriter.java:98)
> org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(
> MXMLJSCRoyale.java:374)
> org.apache.royale.compiler.clients.MXMLJSCRoyale._
> mainNoExit(MXMLJSCRoyale.java:240)
> org.apache.royale.compiler.clients.MXMLJSCRoyale.
> mainNoExit(MXMLJSCRoyale.java:197)
> org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:345)
> org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:281)
> org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:
> 240)
> org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:222)
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
OK found the call to non-existant ItemRenderer.

Now get 31 files built and then another null pointer. What is a
BinaryOperatorEmitter?

Internal error: java.lang.NullPointerException
org.apache.royale.compiler.internal.codegen.js.jx.BinaryOperatorEmitter.emit(BinaryOperatorEmitter.java:296)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitBinaryOperator(JSRoyaleEmitter.java:838)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBinaryOperator(ASBlockWalker.java:525)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:348)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emitConditional(IfEmitter.java:86)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:45)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:33)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitIf(JSEmitter.java:329)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(ASBlockWalker.java:343)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:194)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:335)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:278)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emitConditional(IfEmitter.java:95)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:45)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:33)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitIf(JSEmitter.java:329)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(ASBlockWalker.java:343)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:194)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:335)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:278)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitTerminal(ASBlockWalker.java:539)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:182)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emitElse(IfEmitter.java:115)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:69)
org.apache.royale.compiler.internal.codegen.js.jx.IfEmitter.emit(IfEmitter.java:33)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitIf(JSEmitter.java:329)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitIf(ASBlockWalker.java:343)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:194)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:335)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:278)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.ForLoopEmitter.emit(ForLoopEmitter.java:67)
org.apache.royale.compiler.internal.codegen.js.jx.ForLoopEmitter.emit(ForLoopEmitter.java:31)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitForLoop(JSEmitter.java:359)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitFor(ASBlockWalker.java:365)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitForLoop(ASBlockWalker.java:351)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:175)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:335)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:278)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.as.ASEmitter.emitMethodScope(ASEmitter.java:867)
org.apache.royale.compiler.internal.codegen.js.jx.MethodEmitter.emit(MethodEmitter.java:145)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitMethod(JSRoyaleEmitter.java:723)
org.apache.royale.compiler.internal.codegen.js.jx.ClassEmitter.emit(ClassEmitter.java:176)
org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitClass(JSRoyaleEmitter.java:681)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitClass(ASBlockWalker.java:242)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:136)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitter.emitPackageContents(JSGoogEmitter.java:182)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitPackage(ASBlockWalker.java:230)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:132)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitFile(ASBlockWalker.java:209)
org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:128)
org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)
org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitCompilationUnit(ASBlockWalker.java:174)
org.apache.royale.compiler.internal.codegen.js.JSWriter.writeTo(JSWriter.java:98)
org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.java:374)
org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:240)
org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:197)
org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:345)
org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:281)
org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:240)
org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:222)

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Inline...

On 3/15/18, 11:43 PM, "doug777" <do...@gmail.com> wrote:

>Yes found the bad line.
>
><svg:Text text="{}"/>
>
>When correct variable added, build continues until 20 files are built.

Good to know.  Can you file a bug at
https://github.com/apache/royale-compiler/issues?  You should get credit
for reporting it.
>
>Then I get a new internal error.
>
>Internal error: java.lang.NullPointerException
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.
>emitFactoryMXMLRoyaleEmitter.java:2537)
>
>Any clue as to what this might be?

Factories are emitted for itemRenderer properties and other assignments of
a class that should have multiple instances created.  Maybe the class is
not found.

HTH,
-Alex


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Yes found the bad line.

<svg:Text text="{}"/>

When correct variable added, build continues until 20 files are built.

Then I get a new internal error. 

Internal error: java.lang.NullPointerException 
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitFactoryMXMLRoyaleEmitter.java:2537)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitFactory(MXMLBlockWalker.java:346)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:126)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitPropertySpecifier(MXMLRoyaleEmitter.java:2394)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitPropertySpecifier(MXMLBlockWalker.java:254)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:105)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitInstance(MXMLRoyaleEmitter.java:1886)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitInstance(MXMLBlockWalker.java:246)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:96)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitArray(MXMLRoyaleEmitter.java:2478)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitArray(MXMLBlockWalker.java:286)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:72)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitPropertySpecifier(MXMLRoyaleEmitter.java:2394)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitPropertySpecifier(MXMLBlockWalker.java:254)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:105)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.emitDocument(MXMLRoyaleEmitter.java:606)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWalker.visitDocument(MXMLRoyaleBlockWalker.java:69)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:84)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWalker.visitFile(MXMLRoyaleBlockWalker.java:61)
org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXMLNodeSwitch.java:90)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXMLBlockWalker.java:149)
org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitCompilationUnit(MXMLBlockWalker.java:168)
org.apache.royale.compiler.internal.codegen.mxml.MXMLWriter.writeTo(MXMLWriter.java:71)
org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.java:374)
org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:240)
org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:197)
org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:345)
org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:281)
org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:240)
org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:222)

Any clue as to what this might be?

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
I found one way to reproduce it:  Binding to an empty expression as in:

<label text="{}" />

Do you have anything like that?  Is the compiler supposed to generate at
Object instead of a binding?

HTH,
-Alex

On 3/15/18, 10:21 PM, "Alex Harui" <ah...@adobe.com> wrote:

>It may not be a binding to "" but some more complex expression like "Foo
>{Bar}" or something like that.  Let us know when you find it, I still
>can't reproduce it.
>
>On 3/15/18, 9:39 PM, "Alex Harui" <ah...@adobe.com> wrote:
>
>>If you find the offending line, please post it.  I am not easily able to
>>get the compiler to try to emit an empty string there.
>>
>>Thanks,
>>-Alex
>>
>>On 3/15/18, 9:11 PM, "doug777" <do...@gmail.com> wrote:
>>
>>>Hi Alex,
>>>
>>>OK understood, many thanks.
>>>
>>>Doug
>>>
>>>
>>>
>>>--
>>>Sent from: 
>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-r
>>>o
>>>y
>>>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cea0
>>>9
>>>6
>>>0ec0faa4631efa508d58af40fb1%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7
>>>C
>>>6
>>>36567703212831303&sdata=aRqGl8JLnEfYgDuyRJOYyunvjnvsHy0t5bphLy3oGa4%3D&r
>>>e
>>>s
>>>erved=0
>>
>


Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
It may not be a binding to "" but some more complex expression like "Foo
{Bar}" or something like that.  Let us know when you find it, I still
can't reproduce it.

On 3/15/18, 9:39 PM, "Alex Harui" <ah...@adobe.com> wrote:

>If you find the offending line, please post it.  I am not easily able to
>get the compiler to try to emit an empty string there.
>
>Thanks,
>-Alex
>
>On 3/15/18, 9:11 PM, "doug777" <do...@gmail.com> wrote:
>
>>Hi Alex,
>>
>>OK understood, many thanks.
>>
>>Doug
>>
>>
>>
>>--
>>Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ro
>>y
>>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cea09
>>6
>>0ec0faa4631efa508d58af40fb1%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>>6
>>36567703212831303&sdata=aRqGl8JLnEfYgDuyRJOYyunvjnvsHy0t5bphLy3oGa4%3D&re
>>s
>>erved=0
>


Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
If you find the offending line, please post it.  I am not easily able to
get the compiler to try to emit an empty string there.

Thanks,
-Alex

On 3/15/18, 9:11 PM, "doug777" <do...@gmail.com> wrote:

>Hi Alex,
>
>OK understood, many thanks.
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cea096
>0ec0faa4631efa508d58af40fb1%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36567703212831303&sdata=aRqGl8JLnEfYgDuyRJOYyunvjnvsHy0t5bphLy3oGa4%3D&res
>erved=0


Re: How Can I Find Root Cause of Internal Error?

Posted by doug777 <do...@gmail.com>.
Hi Alex,

OK understood, many thanks.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: How Can I Find Root Cause of Internal Error?

Posted by Alex Harui <ah...@adobe.com>.
Hi Doug,

Looks like we might need to beef up our error handling in the compiler.

I looked at the code and it looks like we have a bug handling empty
string.  I will try to verify that shortly.

I can also see from the stack trace that this is in the data binding
output.  So see if you have bindings to "" and try to workaround it until
we can fix this issue.

Thanks,
-Alex

On 3/15/18, 7:07 PM, "doug777" <do...@gmail.com> wrote:

>In Moonshine selecting Build As JavaScript I get the following error. The
>bin/js-debug folder contains 11 compiled files (about 10% of the total).
>
>How can I find out what it is in my code that is causing this error?
>
>Internal error: java.lang.StringIndexOutOfBoundsException: String index
>out
>of range: 0 java.lang.String.charAt(String.java:658)
>org.apache.royale.compiler.internal.codegen.js.jx.LiteralEmitter.emit(Lite
>ralEmitter.java:159)
>org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emit
>Literal(JSRoyaleEmitter.java:850)
>org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitLiteral(
>ASBlockWalker.java:466)
>org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeS
>witch.java:373)
>org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNode
>Handler.java:85)
>org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(
>BeforeAfterStrategy.java:110)
>org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockW
>alker.java:157)
>org.apache.royale.compiler.internal.codegen.as.ASEmitter.stringifyNode(ASE
>mitter.java:1574)
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.
>outputBindingInfoAsData(MXMLRoyaleEmitter.java:1244)
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.
>emitBindingData(MXMLRoyaleEmitter.java:1196)
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleEmitter.
>emitDocument(MXMLRoyaleEmitter.java:637)
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWal
>ker.visitDocument(MXMLRoyaleBlockWalker.java:69)
>org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXM
>LNodeSwitch.java:84)
>org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXML
>BlockWalker.java:149)
>org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyaleBlockWal
>ker.visitFile(MXMLRoyaleBlockWalker.java:61)
>org.apache.royale.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(MXM
>LNodeSwitch.java:90)
>org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(MXML
>BlockWalker.java:149)
>org.apache.royale.compiler.internal.codegen.mxml.MXMLBlockWalker.visitComp
>ilationUnit(MXMLBlockWalker.java:168)
>org.apache.royale.compiler.internal.codegen.mxml.MXMLWriter.writeTo(MXMLWr
>iter.java:71)
>org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.jav
>a:374)
>org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale
>.java:240)
>org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.
>java:197)
>org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:345)
>org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:281)
>org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:2
>40)
>org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:222)
>
>Doug
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-roy
>ale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cf8da3
>6545301434fb70108d58ae29ebf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36567628297923442&sdata=Zm8ZFR3mrrFd%2BqoLb7EFtzgmyTUw0I%2BxFH%2Bj4Ls5kdw%
>3D&reserved=0