public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* "Uncaught translation error" when transforming Kawa-compiled classes with dex
@ 2017-08-29 17:10 Kay Zheng
  2017-08-29 17:13 ` Sonny To
  2017-08-29 18:02 ` Per Bothner
  0 siblings, 2 replies; 8+ messages in thread
From: Kay Zheng @ 2017-08-29 17:10 UTC (permalink / raw)
  To: Per Bothner, Kawa mailing list

Hi Per,

I tried building a simple skeleton Android app against the master
branch, targeting Android API level 21 (Android 5.0). The compilation
went well, but there's this ambiguous error when classes are being
transformed to dex files:

    Uncaught translation error: com.android.dx.cf.code.SimException:
local variable type mismatch: attempt to set or access a value of type
int using a local variable of type gnu.mapping.CallContext. This is
symptomatic of .class transformation tools that ignore local variable
information.

I don't really understand this error message, but since
gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
mailing list.

The source code for the skeleton app is on
https://github.com/l04m33/KawaAndroidTemplate

And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
8 instead, thus the explicit JAVACFLAGS):

    $ cat rebuild-kawa-latest-android.sh
    #!/bin/sh

    cd ./Kawa-latest-android

    if [ -f 'Makefile' ]; then
        make clean
        make distclean
    fi

    git checkout -- .
    git apply ../kawa-javacflags.patch

    ./autogen.sh
    export JAVACFLAGS="-g -source 1.6 -target 1.6"
    ./configure
--with-android=/home/user/android_sdk/platforms/android-21/android.jar
\
                --disable-xquery \
                --disable-jemacs \
                --with-java-source=6
    make

And the content of kawa-javacflags.patch:

    $ cat kawa-javacflags.patch
    diff --git a/Makefile.am b/Makefile.am
    index da9e490..a0df1a3 100644
    --- a/Makefile.am
    +++ b/Makefile.am
    @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
          | sed -e 's|./||' | sort > $@

     kawa/Version.class: kawa/Version.java
    -   $(JAVAC) -d . $^
    +   $(JAVAC) -d . $(JAVACFLAGS) $^

     gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
    -   $(JAVAC) -d . $^
    +   $(JAVAC) -d . $(JAVACFLAGS) $^

     JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
$(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
$(PREPROCESS_AWT)

P.S.: I think this is an separate issue with hairy details, so I made
a new thread.

Regards,
Kay Z.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 17:10 "Uncaught translation error" when transforming Kawa-compiled classes with dex Kay Zheng
@ 2017-08-29 17:13 ` Sonny To
  2017-08-29 17:31   ` Kay Zheng
  2017-08-29 18:02 ` Per Bothner
  1 sibling, 1 reply; 8+ messages in thread
From: Sonny To @ 2017-08-29 17:13 UTC (permalink / raw)
  To: Kay Zheng; +Cc: Per Bothner, Kawa mailing list

try using jdk 1.7
i had strange errors too when i compiled for jdk1.8

On Tue, Aug 29, 2017 at 8:10 PM, Kay Zheng <l04m33@gmail.com> wrote:
> Hi Per,
>
> I tried building a simple skeleton Android app against the master
> branch, targeting Android API level 21 (Android 5.0). The compilation
> went well, but there's this ambiguous error when classes are being
> transformed to dex files:
>
>     Uncaught translation error: com.android.dx.cf.code.SimException:
> local variable type mismatch: attempt to set or access a value of type
> int using a local variable of type gnu.mapping.CallContext. This is
> symptomatic of .class transformation tools that ignore local variable
> information.
>
> I don't really understand this error message, but since
> gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
> mailing list.
>
> The source code for the skeleton app is on
> https://github.com/l04m33/KawaAndroidTemplate
>
> And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
> 8 instead, thus the explicit JAVACFLAGS):
>
>     $ cat rebuild-kawa-latest-android.sh
>     #!/bin/sh
>
>     cd ./Kawa-latest-android
>
>     if [ -f 'Makefile' ]; then
>         make clean
>         make distclean
>     fi
>
>     git checkout -- .
>     git apply ../kawa-javacflags.patch
>
>     ./autogen.sh
>     export JAVACFLAGS="-g -source 1.6 -target 1.6"
>     ./configure
> --with-android=/home/user/android_sdk/platforms/android-21/android.jar
> \
>                 --disable-xquery \
>                 --disable-jemacs \
>                 --with-java-source=6
>     make
>
> And the content of kawa-javacflags.patch:
>
>     $ cat kawa-javacflags.patch
>     diff --git a/Makefile.am b/Makefile.am
>     index da9e490..a0df1a3 100644
>     --- a/Makefile.am
>     +++ b/Makefile.am
>     @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
>           | sed -e 's|./||' | sort > $@
>
>      kawa/Version.class: kawa/Version.java
>     -   $(JAVAC) -d . $^
>     +   $(JAVAC) -d . $(JAVACFLAGS) $^
>
>      gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
>     -   $(JAVAC) -d . $^
>     +   $(JAVAC) -d . $(JAVACFLAGS) $^
>
>      JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
> $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
> $(PREPROCESS_AWT)
>
> P.S.: I think this is an separate issue with hairy details, so I made
> a new thread.
>
> Regards,
> Kay Z.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 17:13 ` Sonny To
@ 2017-08-29 17:31   ` Kay Zheng
  0 siblings, 0 replies; 8+ messages in thread
From: Kay Zheng @ 2017-08-29 17:31 UTC (permalink / raw)
  To: Sonny To; +Cc: Per Bothner, Kawa mailing list

Hi Sonny,

Thanks for the suggestion.

I carelessly left out an important fact, that I've compiled the same
app against the 2.4 branch this way and it worked well, so I'd suspect
it's some changes in Kawa that caused this error. Not necessarily a
bug, though.

Regards,
Kay Z.


2017-08-30 1:12 GMT+08:00 Sonny To <son.c.to@gmail.com>:
> try using jdk 1.7
> i had strange errors too when i compiled for jdk1.8
>
> On Tue, Aug 29, 2017 at 8:10 PM, Kay Zheng <l04m33@gmail.com> wrote:
>> Hi Per,
>>
>> I tried building a simple skeleton Android app against the master
>> branch, targeting Android API level 21 (Android 5.0). The compilation
>> went well, but there's this ambiguous error when classes are being
>> transformed to dex files:
>>
>>     Uncaught translation error: com.android.dx.cf.code.SimException:
>> local variable type mismatch: attempt to set or access a value of type
>> int using a local variable of type gnu.mapping.CallContext. This is
>> symptomatic of .class transformation tools that ignore local variable
>> information.
>>
>> I don't really understand this error message, but since
>> gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
>> mailing list.
>>
>> The source code for the skeleton app is on
>> https://github.com/l04m33/KawaAndroidTemplate
>>
>> And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
>> 8 instead, thus the explicit JAVACFLAGS):
>>
>>     $ cat rebuild-kawa-latest-android.sh
>>     #!/bin/sh
>>
>>     cd ./Kawa-latest-android
>>
>>     if [ -f 'Makefile' ]; then
>>         make clean
>>         make distclean
>>     fi
>>
>>     git checkout -- .
>>     git apply ../kawa-javacflags.patch
>>
>>     ./autogen.sh
>>     export JAVACFLAGS="-g -source 1.6 -target 1.6"
>>     ./configure
>> --with-android=/home/user/android_sdk/platforms/android-21/android.jar
>> \
>>                 --disable-xquery \
>>                 --disable-jemacs \
>>                 --with-java-source=6
>>     make
>>
>> And the content of kawa-javacflags.patch:
>>
>>     $ cat kawa-javacflags.patch
>>     diff --git a/Makefile.am b/Makefile.am
>>     index da9e490..a0df1a3 100644
>>     --- a/Makefile.am
>>     +++ b/Makefile.am
>>     @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
>>           | sed -e 's|./||' | sort > $@
>>
>>      kawa/Version.class: kawa/Version.java
>>     -   $(JAVAC) -d . $^
>>     +   $(JAVAC) -d . $(JAVACFLAGS) $^
>>
>>      gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
>>     -   $(JAVAC) -d . $^
>>     +   $(JAVAC) -d . $(JAVACFLAGS) $^
>>
>>      JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
>> $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
>> $(PREPROCESS_AWT)
>>
>> P.S.: I think this is an separate issue with hairy details, so I made
>> a new thread.
>>
>> Regards,
>> Kay Z.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 17:10 "Uncaught translation error" when transforming Kawa-compiled classes with dex Kay Zheng
  2017-08-29 17:13 ` Sonny To
@ 2017-08-29 18:02 ` Per Bothner
  2017-08-29 20:13   ` Kay Zheng
  1 sibling, 1 reply; 8+ messages in thread
From: Per Bothner @ 2017-08-29 18:02 UTC (permalink / raw)
  To: Kay Zheng, Kawa mailing list

On 08/29/2017 10:10 AM, Kay Zheng wrote:
> I tried building a simple skeleton Android app against the master
> branch, targeting Android API level 21 (Android 5.0). The compilation
> went well, but there's this ambiguous error when classes are being
> transformed to dex files:
> 
>      Uncaught translation error: com.android.dx.cf.code.SimException:
> local variable type mismatch: attempt to set or access a value of type
> int using a local variable of type gnu.mapping.CallContext. This is
> symptomatic of .class transformation tools that ignore local variable
> information.

Hm.  It would be helpful if the error message would say what class and
method it were complaining about.

A work-around for Java code would be to Compile with -g:lines (-g:none) to
suppress of the LocalVariableTable attribute, since that is what dex seems
to be complaining about.  Unfortunately, Kawa doesn't have a comparable option
for Scheme code. It shouldn't be hard to add.

> And the content of kawa-javacflags.patch:
> 
>      $ cat kawa-javacflags.patch
>      diff --git a/Makefile.am b/Makefile.am
>      index da9e490..a0df1a3 100644
>      --- a/Makefile.am
>      +++ b/Makefile.am
>      @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
>            | sed -e 's|./||' | sort > $@
> 
>       kawa/Version.class: kawa/Version.java
>      -   $(JAVAC) -d . $^
>      +   $(JAVAC) -d . $(JAVACFLAGS) $^
> 
>       gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
>      -   $(JAVAC) -d . $^
>      +   $(JAVAC) -d . $(JAVACFLAGS) $^
> 
>       JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
> $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
> $(PREPROCESS_AWT)

Thanks - I fixed this in my sources.  I'll check it in after I've tested it.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 18:02 ` Per Bothner
@ 2017-08-29 20:13   ` Kay Zheng
  2017-08-29 20:31     ` Per Bothner
  0 siblings, 1 reply; 8+ messages in thread
From: Kay Zheng @ 2017-08-29 20:13 UTC (permalink / raw)
  To: Per Bothner; +Cc: Kawa mailing list

Hi Per,

Indeed it had something to do with local variable info. I added the
following snippet to the android section in build.gradle based on your
assertion, and the error went away:

    dexOptions {
        additionalParameters '--no-locals'
    }

I also enabled the debug logs in the dx command, and here goes the
full error message (long lines, hopefully the text won't get messed
up):

Uncaught translation error:
com.android.dx.cf.code.SimException: local variable type mismatch:
attempt to set or access a value of type int using a local variable of
ty$
e gnu.mapping.CallContext. This is symptomatic of .class
transformation tools that ignore local variable information.
        at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:575)
        at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:584)
        at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:458)
        at com.android.dx.cf.code.Simulator.simulate(Simulator.java:94)
        at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:787)
        at com.android.dx.cf.code.Ropper.doit(Ropper.java:742)
        at com.android.dx.cf.code.Ropper.convert(Ropper.java:349)
        at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:285)
        at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:141)
        at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:95)
        at com.android.dx.command.dexer.Main.translateClass(Main.java:799)
        at com.android.dx.command.dexer.Main.access$2800(Main.java:88)
        at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1863)
        at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1848)
        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)
...at bytecode offset 00000152
locals[0000]: Ljava/lang/Object;
locals[0001]: Lgnu/lists/LList;
locals[0002]: Ljava/lang/Object;
locals[0003]: Ljava/lang/Object;
locals[0004]: Lgnu/math/IntNum;
locals[0005]: Ljava/lang/Boolean;
locals[0006]: Ljava/lang/Object;
locals[0007]: <invalid>
locals[0008]: Ljava/lang/Object;
stack[top0]: I
...while working on block 0152
                                                             [26/1937]
...while working on method
stringConcatenateReverse$SlShared$V:(Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;
...while processing stringConcatenateReverse$SlShared$V
(Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;
...while processing gnu/kawa/slib/srfi13.class
Uncaught translation error:
com.android.dx.cf.code.SimException: local variable type mismatch:
attempt to set or access a value of type int using a local variable of
typ
e gnu.mapping.CallContext. This is symptomatic of .class
transformation tools that ignore local variable information.
        at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:575)
        at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:584)
        at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:458)
        at com.android.dx.cf.code.Simulator.simulate(Simulator.java:94)
        at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:787)
        at com.android.dx.cf.code.Ropper.doit(Ropper.java:742)
        at com.android.dx.cf.code.Ropper.convert(Ropper.java:349)
        at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:285)
        at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:141)
        at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:95)
        at com.android.dx.command.dexer.Main.translateClass(Main.java:799)
        at com.android.dx.command.dexer.Main.access$2800(Main.java:88)
        at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1863)
        at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1848)
        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)
...at bytecode offset 00000122
locals[0000]: Lgnu/expr/ApplyExp;
                                                              [0/1937]
locals[0001]: Lgnu/expr/InlineCalls;
locals[0002]: Lgnu/bytecode/Type;
locals[0003]: Lgnu/mapping/Procedure;
locals[0004]: <invalid>
locals[0005]: Ljava/lang/String;
locals[0006]: I
locals[0007]: Lgnu/kawa/functions/NumberCompare;
locals[0008]: I
locals[0009]: <invalid>
locals[000a]: <invalid>
locals[000b]: <invalid>
locals[000c]: <invalid>
stack[top0]: int{0x00000000 / 0}
...while working on block 011f
...while working on method
charCompareValidateApply:(Lgnu/expr/ApplyExp;Lgnu/expr/InlineCalls;Lgnu/bytecode/Type;Lgnu/mapping/Procedure;)Lgn$
/expr/Expression;
...while processing charCompareValidateApply
(Lgnu/expr/ApplyExp;Lgnu/expr/InlineCalls;Lgnu/bytecode/Type;Lgnu/mapping/Procedure;)Lgnu/expr/$
xpression;
...while processing kawa/lib/compile_misc.class
2 errors; aborting

================== the error message ends here ==================

Regards,
Kay Z.


2017-08-30 2:01 GMT+08:00 Per Bothner <per@bothner.com>:
> On 08/29/2017 10:10 AM, Kay Zheng wrote:
>>
>> I tried building a simple skeleton Android app against the master
>> branch, targeting Android API level 21 (Android 5.0). The compilation
>> went well, but there's this ambiguous error when classes are being
>> transformed to dex files:
>>
>>      Uncaught translation error: com.android.dx.cf.code.SimException:
>> local variable type mismatch: attempt to set or access a value of type
>> int using a local variable of type gnu.mapping.CallContext. This is
>> symptomatic of .class transformation tools that ignore local variable
>> information.
>
>
> Hm.  It would be helpful if the error message would say what class and
> method it were complaining about.
>
> A work-around for Java code would be to Compile with -g:lines (-g:none) to
> suppress of the LocalVariableTable attribute, since that is what dex seems
> to be complaining about.  Unfortunately, Kawa doesn't have a comparable
> option
> for Scheme code. It shouldn't be hard to add.
>
>> And the content of kawa-javacflags.patch:
>>
>>      $ cat kawa-javacflags.patch
>>      diff --git a/Makefile.am b/Makefile.am
>>      index da9e490..a0df1a3 100644
>>      --- a/Makefile.am
>>      +++ b/Makefile.am
>>      @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list:
>> $(top_srcdir)/configure
>>            | sed -e 's|./||' | sort > $@
>>
>>       kawa/Version.class: kawa/Version.java
>>      -   $(JAVAC) -d . $^
>>      +   $(JAVAC) -d . $(JAVACFLAGS) $^
>>
>>       gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
>>      -   $(JAVAC) -d . $^
>>      +   $(JAVAC) -d . $(JAVACFLAGS) $^
>>
>>       JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
>> $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
>> $(PREPROCESS_AWT)
>
>
> Thanks - I fixed this in my sources.  I'll check it in after I've tested it.
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 20:13   ` Kay Zheng
@ 2017-08-29 20:31     ` Per Bothner
  2017-08-30  0:39       ` Per Bothner
  0 siblings, 1 reply; 8+ messages in thread
From: Per Bothner @ 2017-08-29 20:31 UTC (permalink / raw)
  To: Kay Zheng; +Cc: Kawa mailing list

On 08/29/2017 01:13 PM, Kay Zheng wrote:

> Uncaught translation error:
> com.android.dx.cf.code.SimException: local variable type mismatch:
> attempt to set or access a value of type int using a local variable of
> ty$
> e gnu.mapping.CallContext. This is symptomatic of .class
> transformation tools that ignore local variable information.
>          at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:575)
>          at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:584)
>          at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:458)
>          at com.android.dx.cf.code.Simulator.simulate(Simulator.java:94)
>          at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:787)
>          at com.android.dx.cf.code.Ropper.doit(Ropper.java:742)
>          at com.android.dx.cf.code.Ropper.convert(Ropper.java:349)
>          at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:285)
>          at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:141)
>          at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:95)
>          at com.android.dx.command.dexer.Main.translateClass(Main.java:799)
>          at com.android.dx.command.dexer.Main.access$2800(Main.java:88)
>          at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1863)
>          at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1848)
>          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)
> ...
> ...while working on method
> stringConcatenateReverse$SlShared$V:(Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;
> ...while processing stringConcatenateReverse$SlShared$V
> (Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;

I do see a problem.  The method stringConcatenateReverse$SlShared$V in srfi13.class has
the following:

Attribute "LocalVariableTable", length:92, count: 9
   slot#0: name: string-list, type: java.lang.Object (pc: 0 length: 662)
   slot#1: name: maybe-final+end, type: gnu.lists.LList (pc: 0 length: 662)
   slot#2: name: final, type: java.lang.Object (pc: 23 length: 639)
   slot#3: name: end, type: java.lang.Object (pc: 124 length: 538)
   slot#4: name: len, type: java.lang.Object (pc: 300 length: 247)
   slot#5: name: nzlist, type: java.lang.Object (pc: 300 length: 247)
   slot#6: name: lis, type: java.lang.Object (pc: 300 length: 247)
   slot#7: name: $ctx, type: gnu.mapping.CallContext (pc: 300 length: 247)
   slot#7: name: slen, type: int (pc: 340 length: 67)

Notice slot 7 is used for two different variables, of different types - and their
PC ranges overlap.  Hm.

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
  2017-08-29 20:31     ` Per Bothner
@ 2017-08-30  0:39       ` Per Bothner
       [not found]         ` <CAJCc8OyZ-D4=zB-u6=V108F+=_ZauWw56L2ZzZBvVy8u67qVaQ@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Per Bothner @ 2017-08-30  0:39 UTC (permalink / raw)
  To: Kay Zheng; +Cc: Kawa mailing list

On 08/29/2017 01:30 PM, Per Bothner wrote:
> I do see a problem.  The method stringConcatenateReverse$SlShared$V in srfi13.class has
> the following:
> 
> Attribute "LocalVariableTable", length:92, count: 9
>    slot#0: name: string-list, type: java.lang.Object (pc: 0 length: 662)
>    slot#1: name: maybe-final+end, type: gnu.lists.LList (pc: 0 length: 662)
>    slot#2: name: final, type: java.lang.Object (pc: 23 length: 639)
>    slot#3: name: end, type: java.lang.Object (pc: 124 length: 538)
>    slot#4: name: len, type: java.lang.Object (pc: 300 length: 247)
>    slot#5: name: nzlist, type: java.lang.Object (pc: 300 length: 247)
>    slot#6: name: lis, type: java.lang.Object (pc: 300 length: 247)
>    slot#7: name: $ctx, type: gnu.mapping.CallContext (pc: 300 length: 247)
>    slot#7: name: slen, type: int (pc: 340 length: 67)
> 
> Notice slot 7 is used for two different variables, of different types - and their
> PC ranges overlap.  Hm.

I checked in a fix for this.  Please try again.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
       [not found]         ` <CAJCc8OyZ-D4=zB-u6=V108F+=_ZauWw56L2ZzZBvVy8u67qVaQ@mail.gmail.com>
@ 2017-08-30  5:34           ` Kay Zheng
  0 siblings, 0 replies; 8+ messages in thread
From: Kay Zheng @ 2017-08-30  5:34 UTC (permalink / raw)
  To: Per Bothner; +Cc: Kawa mailing list, Sonny To

Thank you! I think the fix worked, and the APK was built successfully.

The app failed to run though. A ClassNotFound exception regarding my
main activity, much like what Sonny To reported in another thread a
while ago. But this is most likely a separate issue, not necessarily
relevant to Kawa. I'll try digging around and see if I can find
anything.

2017-08-30 12:08 GMT+08:00 Kay Zheng <l04m33@gmail.com>:
> Thank you! I think the fix worked, and the APK was built successfully.
>
> The APK failed to run though. A ClassNotFound exception regarding my main
> activity, much like what Sonny To reported in another thread a while ago.
> But this is most likely a separate issue, not necessarily relevant to Kawa.
> I'll try digging around and see if I can find anything.
>
> On Aug 30, 2017 8:39 AM, "Per Bothner" <per@bothner.com> wrote:
>>
>> On 08/29/2017 01:30 PM, Per Bothner wrote:
>>>
>>> I do see a problem.  The method stringConcatenateReverse$SlShared$V in
>>> srfi13.class has
>>> the following:
>>>
>>> Attribute "LocalVariableTable", length:92, count: 9
>>>    slot#0: name: string-list, type: java.lang.Object (pc: 0 length: 662)
>>>    slot#1: name: maybe-final+end, type: gnu.lists.LList (pc: 0 length:
>>> 662)
>>>    slot#2: name: final, type: java.lang.Object (pc: 23 length: 639)
>>>    slot#3: name: end, type: java.lang.Object (pc: 124 length: 538)
>>>    slot#4: name: len, type: java.lang.Object (pc: 300 length: 247)
>>>    slot#5: name: nzlist, type: java.lang.Object (pc: 300 length: 247)
>>>    slot#6: name: lis, type: java.lang.Object (pc: 300 length: 247)
>>>    slot#7: name: $ctx, type: gnu.mapping.CallContext (pc: 300 length:
>>> 247)
>>>    slot#7: name: slen, type: int (pc: 340 length: 67)
>>>
>>> Notice slot 7 is used for two different variables, of different types -
>>> and their
>>> PC ranges overlap.  Hm.
>>
>>
>> I checked in a fix for this.  Please try again.
>> --
>>         --Per Bothner
>> per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-30  5:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 17:10 "Uncaught translation error" when transforming Kawa-compiled classes with dex Kay Zheng
2017-08-29 17:13 ` Sonny To
2017-08-29 17:31   ` Kay Zheng
2017-08-29 18:02 ` Per Bothner
2017-08-29 20:13   ` Kay Zheng
2017-08-29 20:31     ` Per Bothner
2017-08-30  0:39       ` Per Bothner
     [not found]         ` <CAJCc8OyZ-D4=zB-u6=V108F+=_ZauWw56L2ZzZBvVy8u67qVaQ@mail.gmail.com>
2017-08-30  5:34           ` Kay Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).