virteman / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

DeodexUtil StackOverflowError when deodex Google maps odex file #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. following the instruction to de-
odex /system/framework/com.google.android.maps.odex from a Sapphire/ADP2 
phone

What is the expected output? What do you see instead?

It shoud have no errors to deodex, but it got the errors as they are shown 
below in the additional info section.

What version of the product are you using? On what operating system?

Android ADP2/Sapphire phone, host is Windows Vista 32bit.

Please provide any additional information below.

I am trying to deodex 
ADP2/Sapphire's /system/framework/com.google.android.maps.odex, but got 
the error below when I ran this command:

"java -Xss1m -Xmx512M -jar baksmali.jar -x :1234 
com.google.android.maps.odex"

I have also tried the following commands, but the errors are the same:

"java -Xss1m -Xmx512M"

"java -Xss10m -Xmx512M"

"java -Xss16m -Xmx512M"

"java -Xss64m -Xmx512M"

"java -Xss32m -Xmx1024M"

"java -Xss64m -Xmx1024M"

Errors: 

---------------------------------------------------------------------------
-----
UNEXPECTED TOP-LEVEL ERROR: java.lang.StackOverflowError? 
at java.util.LinkedList?.listIterator(Unknown Source) at 
java.util.AbstractList?.listIterator(Unknown Source) at 
java.util.AbstractSequentialList?.iterator(Unknown Source) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1396) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at 
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) 
.................

However, "/system/framework/com.google.android.gtalkservice.odex" has no 
problem with "java -Xss1m -Xmx512M", and worked.
Just that "/system/framework/com.google.android.maps.odex" had probelms at 
point when 2/3 of work is done. 

This is from a Sapphire/ADP2 phone. I am running the smali from Windows 
Vista 32bit.

Original issue reported on code.google.com by me95...@gmail.com on 31 Dec 2009 at 4:32

GoogleCodeExporter commented 9 years ago
Hmm. I can't seem to reproduce this. What does "java -version" print out? The 
format
of the class names in stack trace looks a bit different than what I'm used to.

Also, is the rom available for download anywhere?

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 7:04

GoogleCodeExporter commented 9 years ago
Here is the java version:

C:\Java>java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)

The ROM is "signed-google_ion-img-14721.zip", and downloaded from here -> 
http://developer.htc.com/google-io-device.html

Original comment by me95...@gmail.com on 31 Dec 2009 at 7:47

GoogleCodeExporter commented 9 years ago
Per http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp, it looks 
like the
correct option to set the stack size for your version of java would be 
-XX:ThreadStackSize=1024

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 7:56

GoogleCodeExporter commented 9 years ago
Here is the what the console shows:

C:\android-sdk_r04\smali>java -Xss1m -Xmx512M -jar baksmali.jar -x :1234 
com.google.android.maps.odex

UNEXPECTED TOP-LEVEL ERROR:
java.lang.StackOverflowError
        at java.util.LinkedList.listIterator(Unknown Source)
        at java.util.AbstractList.listIterator(Unknown Source)
        at java.util.AbstractSequentialList.iterator(Unknown Source)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1396)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
......................
...............

Original comment by me95...@gmail.com on 31 Dec 2009 at 7:59

GoogleCodeExporter commented 9 years ago
Right. Try it with -XX:ThreadStackSize=1024 instead of -Xss1m. I don't know if 
it
will help or not, but it's worth a shot.

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 8:02

GoogleCodeExporter commented 9 years ago
Also, one other thing, when you try it with 1m and with, say 10m, does the 
number of
"propagateRegisters" entries that are shown change? If the stack size isn't 
being set
for whatever reason, then I would expect there to be the same number of
propagateRegister lines shown, but if it's being set, there should be quite a 
few
more when you run with 10m.

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 8:04

GoogleCodeExporter commented 9 years ago
Sorry, it was 
C:\android-sdk_r04\recovery\smali>java -XX:ThreadStackSize=1024 -Xmx1024M -jar 
baksmali.jar
 -x :1234 com.google.android.maps.odex

UNEXPECTED TOP-LEVEL ERROR:
java.lang.StackOverflowError
        at java.util.LinkedList.listIterator(Unknown Source)
        at java.util.AbstractList.listIterator(Unknown Source)
        at java.util.AbstractSequentialList.iterator(Unknown Source)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1396)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
        at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)

Original comment by me95...@gmail.com on 31 Dec 2009 at 8:05

GoogleCodeExporter commented 9 years ago
It does not make a difference in terms of how many lines coming out with the 
following params:

java -Xss100m -Xmx1024M -XX:ThreadStackSize=102400 -jar baksmali.jar -x :1234 
com.google.android.maps.odex

Original comment by me95...@gmail.com on 31 Dec 2009 at 8:16

GoogleCodeExporter commented 9 years ago
What version of java should work? Maybe, I should uninstall version "1.5.0_22", 
and 
install a different one that works.
Thanks!

Original comment by me95...@gmail.com on 31 Dec 2009 at 8:25

GoogleCodeExporter commented 9 years ago
I don't know what to tell you, other than try a different version of java. I 
grabbed
that rom and setup a chroot with the ion apps and framework, on the 1.6 
emulator, and
was able to deodex it without any issues.

It sounds to me like the stack size isn't being set correctly, but I have no 
idea
why, or how to fix it.

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 8:26

GoogleCodeExporter commented 9 years ago
Maybe try version 1.6 instead?

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 8:26

GoogleCodeExporter commented 9 years ago
I thought that Android SDK does not support ver. 1.6.
Thanks!

Original comment by me95...@gmail.com on 31 Dec 2009 at 8:36

GoogleCodeExporter commented 9 years ago
Hi JF,

I am now trying to get the Google Maps to run on open source "donut-plus-aosp" 
build. But, so far, I have no success. I thought that de-odexing the Google 
maps' 
odex file is the first step. Would you have some advice on this topic?
Thank you!
John

Original comment by me95...@gmail.com on 31 Dec 2009 at 8:59

GoogleCodeExporter commented 9 years ago
Well, it certainly needs to be deodexed before you can use it in another build. 
But
without more details than "it doesn't work", I can't really help :)

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 4:14

GoogleCodeExporter commented 9 years ago
Just to confirm, you were able to get it working with a different version of 
java,
correct?

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 10:09

GoogleCodeExporter commented 9 years ago
Hi JF,
Thanks! Yes. It works with JDK 1.6 with this command:
java -Xss1m -jar baksmali.jar -x :1234 com.google.android.maps.odex in a 
different 
console Window.
John

Original comment by me95...@gmail.com on 31 Dec 2009 at 10:17

GoogleCodeExporter commented 9 years ago

Original comment by JesusFre...@gmail.com on 31 Dec 2009 at 10:30