Status Update
Comments
na...@google.com <na...@google.com>
na...@google.com <na...@google.com> #2
(Also see internal bug 36949180 )
re...@zoom.us <re...@zoom.us> #3
Call NewStringUTF with bytes generated by Java String.getBytes("UTF-8") for Unicode 32 characters (all iOS 5 emotion characters) always crash.
na...@google.com <na...@google.com> #4
Looks like NewStringUTF is specified to support only modified UTF and not regular UTF-8 (I.e, It supports only 1, 2 & 3 byte encodings. supplemental code points are split into surrogate pairs).
We should either do the split ourselves or use NewString(.. jchar*);
We should either do the split ourselves or use NewString(.. jchar*);
en...@google.com <en...@google.com> #5
or accelerate the switch to kxml. this is yet another reason to want to ditch the expat-based code...
na...@google.com <na...@google.com> #6
That's what I said in #2
en...@google.com <en...@google.com> #7
ah. for non-googlers and googlers like me who're too lazy to search the internal bug database, bug 36949180 is "3090550 Migrate from org.apache.harmony.xml.ExpatReader to org.xmlpull.v1.sax2.Driver".
na...@google.com <na...@google.com> #8
BTW. It might be worth improving the JNI error message here. I expect lots of code that's being ported over from iOS to run into this, given the CPs associated with the iOS emoticons.
pa...@google.com <pa...@google.com> #9
The following is really just to check my understanding.
What narayan means by "Modified UTF-8" has the following differences to UTF-8:
* The NUL character (\0) is encoded as two non-zero bytes (C0 80 - which are not valid UTF-8 as UTF-8 requires use of the shortest form possible) so that the NUL character/byte can be used as a terminator.
* It only supports the 1, 2 and 3 byte forms.
* Characters in the range U+1FFFFF - U+010000 are first split into UTF-16 surrogate pairs which are then encoded as 3 byte sequence - this is known as CESU-8.
In response to #3 that is not a bug, Modified UTF-8 and UTF-8 are not compatible in general although they are compatible for characters in the range U+0001 - U+FFFF. The iOS emoticon characters are mostly outside that range; seehttp://en.wikipedia.org/wiki/Emoji#In_the_Unicode_standard . That said it may be useful to provide a clean way to take a UTF-8 encoded byte array and convert it into a Java String - that may already exist but I couldn't find one.
The JNI error message in 4.3 does state that it is invalid "Modified UTF-8" so short of writing a small description of likely symptoms and their causes I am not sure what else can be done.
The use of NewStringUTF from ExpatAttributes is most certainly a bug. It should have been converted into Modified UTF-8 first; which is not trivial. Given that we want to switch parser I will look at what is involved in that first to see whether it is worth modifying expat - the incorrect use of NewStringUTF is wide spread throughout.
What narayan means by "Modified UTF-8" has the following differences to UTF-8:
* The NUL character (\0) is encoded as two non-zero bytes (C0 80 - which are not valid UTF-8 as UTF-8 requires use of the shortest form possible) so that the NUL character/byte can be used as a terminator.
* It only supports the 1, 2 and 3 byte forms.
* Characters in the range U+1FFFFF - U+010000 are first split into UTF-16 surrogate pairs which are then encoded as 3 byte sequence - this is known as CESU-8.
In response to #3 that is not a bug, Modified UTF-8 and UTF-8 are not compatible in general although they are compatible for characters in the range U+0001 - U+FFFF. The iOS emoticon characters are mostly outside that range; see
The JNI error message in 4.3 does state that it is invalid "Modified UTF-8" so short of writing a small description of likely symptoms and their causes I am not sure what else can be done.
The use of NewStringUTF from ExpatAttributes is most certainly a bug. It should have been converted into Modified UTF-8 first; which is not trivial. Given that we want to switch parser I will look at what is involved in that first to see whether it is worth modifying expat - the incorrect use of NewStringUTF is wide spread throughout.
na...@google.com <na...@google.com> #10
Yes, this is spot on.
It's also worth mentioning that we could also convert UTF-8 from the input to UTF-16 and call NewString instead of NewStringUTF.
It's also worth mentioning that we could also convert UTF-8 from the input to UTF-16 and call NewString instead of NewStringUTF.
en...@google.com <en...@google.com> #11
> The JNI error message in 4.3 does state that it is invalid "Modified UTF-8" so short of writing a small description of likely symptoms and their causes I am not sure what else can be done.
suggestions:
1. there are different kinds of invalid start bytes. 0xf0 is a special case in that it's a valid start byte for UTF-8 but not for MUTF8. that's something we could explicitly spell out.
2. we could link to wikipedia. it looks like just saying "modified utf-8" in the error isn't working for us, so it seems like an explanation might be helpful.
3. narayan's suggested workaround is a good one that we should probably mention. one possibility is to move all this discussion onto the "jni tips" page and have CheckJNI link there. (though as you've noticed, doing the conversion isn't entirely trivial.)
4. kill expat! :-)
suggestions:
1. there are different kinds of invalid start bytes. 0xf0 is a special case in that it's a valid start byte for UTF-8 but not for MUTF8. that's something we could explicitly spell out.
2. we could link to wikipedia. it looks like just saying "modified utf-8" in the error isn't working for us, so it seems like an explanation might be helpful.
3. narayan's suggested workaround is a good one that we should probably mention. one possibility is to move all this discussion onto the "jni tips" page and have CheckJNI link there. (though as you've noticed, doing the conversion isn't entirely trivial.)
4. kill expat! :-)
pa...@gmail.com <pa...@gmail.com> #12
Re point #2. I had no trouble working out what the error meant. A more descriptive error doesn't help the user when they are parsing XML files they didn't create.
I am not sure I agree that "we are okay with the app crashing" is an acceptable resolution to this bug :)
I am not sure I agree that "we are okay with the app crashing" is an acceptable resolution to this bug :)
na...@google.com <na...@google.com> #13
At what point do you think we said "we are okay with the app crashing" ?
pa...@gmail.com <pa...@gmail.com> #14
It, sounded on first read, like comment 11 was suggesting that improving the error message was an alternative to a real fix.
I didn't think that was likely though - hence the emoticon.
I didn't think that was likely though - hence the emoticon.
ch...@orr.me.uk <ch...@orr.me.uk> #15
Not sure if this is exactly the same, as I didn't see an XML parser explicitly mentioned in the stacktrace, but I have a similar problem when including certain Unicode codepoints in a strings.xml file.
For example:
<string-array name="word_list_good">
<item>😃</item>
<!-- ... -->
</string-array>
Stacktrace (on an Android Wear 4.4W2 emulator):
W/dalvikvm( 1934): JNI WARNING: NewStringUTF input is not valid Modified UTF-8: illegal start byte 0xf0
W/dalvikvm( 1934): string: '😭'
W/dalvikvm( 1934): in Landroid/content/res/AssetManager;.getArrayStringResource:(I)[Ljava/lang/String; (NewStringUTF)
I/dalvikvm( 1934): "main" prio=5 tid=1 NATIVE
I/dalvikvm( 1934): | group="main" sCount=0 dsCount=0 obj=0xb2ddcda0 self=0xb8db8480
I/dalvikvm( 1934): | sysTid=1934 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1216638336
I/dalvikvm( 1934): | state=R schedstat=( 0 0 0 ) utm=0 stm=0 core=0
I/dalvikvm( 1934): #00 pc 000019e5 /system/lib/libcorkscrew.so (unwind_backtrace+101)
I/dalvikvm( 1934): #01 pc 00008131 /system/lib/libbacktrace.so (CorkscrewCurrent::Unwind(unsigned int)+49)
I/dalvikvm( 1934): #02 pc 000028c9 /system/lib/libbacktrace.so (Backtrace::Unwind(unsigned int)+25)
I/dalvikvm( 1934): #03 pc 000b7c61 /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+81)
I/dalvikvm( 1934): #04 pc 000954a8 /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+1512)
I/dalvikvm( 1934): #05 pc 0009568b /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+75)
I/dalvikvm( 1934): #06 pc 0004beb3 /system/lib/libdvm.so
I/dalvikvm( 1934): #07 pc 0004dcdd /system/lib/libdvm.so (ScopedCheck::check(bool, char const*, ...)+1853)
I/dalvikvm( 1934): #08 pc 0005269a /system/lib/libdvm.so
I/dalvikvm( 1934): #09 pc 000b7fec /system/lib/libandroid_runtime.so
I/dalvikvm( 1934): #10 pc 0002b3de /system/lib/libdvm.so (dvmPlatformInvoke+82)
I/dalvikvm( 1934): at android.content.res.AssetManager.getArrayStringResource(Native Method)
I/dalvikvm( 1934): at android.content.res.AssetManager.getResourceStringArray(AssetManager.java:186)
I/dalvikvm( 1934): at android.content.res.Resources.getStringArray(Resources.java:468)
For example:
<string-array name="word_list_good">
<item>😃</item>
<!-- ... -->
</string-array>
Stacktrace (on an Android Wear 4.4W2 emulator):
W/dalvikvm( 1934): JNI WARNING: NewStringUTF input is not valid Modified UTF-8: illegal start byte 0xf0
W/dalvikvm( 1934): string: '😭'
W/dalvikvm( 1934): in Landroid/content/res/AssetManager;.getArrayStringResource:(I)[Ljava/lang/String; (NewStringUTF)
I/dalvikvm( 1934): "main" prio=5 tid=1 NATIVE
I/dalvikvm( 1934): | group="main" sCount=0 dsCount=0 obj=0xb2ddcda0 self=0xb8db8480
I/dalvikvm( 1934): | sysTid=1934 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1216638336
I/dalvikvm( 1934): | state=R schedstat=( 0 0 0 ) utm=0 stm=0 core=0
I/dalvikvm( 1934): #00 pc 000019e5 /system/lib/libcorkscrew.so (unwind_backtrace+101)
I/dalvikvm( 1934): #01 pc 00008131 /system/lib/libbacktrace.so (CorkscrewCurrent::Unwind(unsigned int)+49)
I/dalvikvm( 1934): #02 pc 000028c9 /system/lib/libbacktrace.so (Backtrace::Unwind(unsigned int)+25)
I/dalvikvm( 1934): #03 pc 000b7c61 /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+81)
I/dalvikvm( 1934): #04 pc 000954a8 /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+1512)
I/dalvikvm( 1934): #05 pc 0009568b /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+75)
I/dalvikvm( 1934): #06 pc 0004beb3 /system/lib/libdvm.so
I/dalvikvm( 1934): #07 pc 0004dcdd /system/lib/libdvm.so (ScopedCheck::check(bool, char const*, ...)+1853)
I/dalvikvm( 1934): #08 pc 0005269a /system/lib/libdvm.so
I/dalvikvm( 1934): #09 pc 000b7fec /system/lib/libandroid_runtime.so
I/dalvikvm( 1934): #10 pc 0002b3de /system/lib/libdvm.so (dvmPlatformInvoke+82)
I/dalvikvm( 1934): at android.content.res.AssetManager.getArrayStringResource(Native Method)
I/dalvikvm( 1934): at android.content.res.AssetManager.getResourceStringArray(AssetManager.java:186)
I/dalvikvm( 1934): at android.content.res.Resources.getStringArray(Resources.java:468)
na...@google.com <na...@google.com> #16
This doesn't look like the same problem. Please could you file a separate bug report and send an update with the bug number ?. I'll make sure it's looked at. Most likely an issue related to non BMP codepoints.
ch...@orr.me.uk <ch...@orr.me.uk> #17
na...@google.com <na...@google.com> #19
(Yeah agree, we hadn't decided to fix the VM at the point I which i made the comment. I guess this issue just strengthens the argument that we should fix the VM)
br...@gmail.com <br...@gmail.com> #20
Has anyone found a workaround?
ca...@gmail.com <ca...@gmail.com> #21
Does anybody worried about this? Same problem here.
ch...@orr.me.uk <ch...@orr.me.uk> #22
As you can see at the top-left, this issue was merged into another one, was subsequently fixed, and was released as part of Android 6.0.
ka...@gmail.com <ka...@gmail.com> #23
hello,
happy to know it has been fixed on android 6.0, but i must support previous version of android also and i must deal with an xdl file that contains charaters that create this issue. how can i deal with it? should i convert the xml to utf16 before parsing?
thx!?
happy to know it has been fixed on android 6.0, but i must support previous version of android also and i must deal with an xdl file that contains charaters that create this issue. how can i deal with it? should i convert the xml to utf16 before parsing?
thx!?
Description
It turns out the problem was an attribute value in the XML file that contained a four-byte UTF-8 sequence (f0 a0 92 8a).
<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar dog="𠂊" />
</foo>
When you try to read the attribute (eg. using Attributes.getValue(i) ), the following exception is thrown:
Here is the result on Android 2.2:
01-16 11:20:38.166: W/dalvikvm(303): JNI WARNING: illegal start byte 0xf0
01-16 11:20:38.166: W/dalvikvm(303): string: '𠂊'
01-16 11:20:38.166: W/dalvikvm(303): in Lorg/apache/harmony/xml/ExpatAttributes;.getValue (II)Ljava/lang/String; (NewStringUTF)
01-16 11:20:38.196: I/dalvikvm(303): "main" prio=5 tid=1 NATIVE
01-16 11:20:38.196: I/dalvikvm(303): | group="main" sCount=0 dsCount=0 s=N obj=0x4001d8e0 self=0xccb0
01-16 11:20:38.196: I/dalvikvm(303): | sysTid=303 nice=0 sched=0/0 cgrp=default handle=-1345026008
01-16 11:20:38.196: I/dalvikvm(303): | schedstat=( 97770335 388464775 44 )
01-16 11:20:38.196: I/dalvikvm(303): at org.apache.harmony.xml.ExpatAttributes.getValue(Native Method)
01-16 11:20:38.216: I/dalvikvm(303): at org.apache.harmony.xml.ExpatAttributes.getValue(ExpatAttributes.java:72)
01-16 11:20:38.216: I/dalvikvm(303): at com.example.issue29.MainActivity$Handler.startElement(MainActivity.java:33)
01-16 11:20:38.216: I/dalvikvm(303): at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:146)
01-16 11:20:38.216: I/dalvikvm(303): at org.apache.harmony.xml.ExpatParser.append(Native Method)
01-16 11:20:38.216: I/dalvikvm(303): at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:521)
01-16 11:20:38.216: I/dalvikvm(303): at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:482)
01-16 11:20:38.236: I/dalvikvm(303): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:320)
01-16 11:20:38.236: I/dalvikvm(303): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:277)
01-16 11:20:38.236: I/dalvikvm(303): at com.example.issue29.MainActivity.onCreate(MainActivity.java:58)
01-16 11:20:38.236: I/dalvikvm(303): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-16 11:20:38.236: I/dalvikvm(303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-16 11:20:38.236: I/dalvikvm(303): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-16 11:20:38.266: I/dalvikvm(303): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-16 11:20:38.266: I/dalvikvm(303): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-16 11:20:38.266: I/dalvikvm(303): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 11:20:38.266: I/dalvikvm(303): at android.os.Looper.loop(Looper.java:123)
01-16 11:20:38.266: I/dalvikvm(303): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-16 11:20:38.266: I/dalvikvm(303): at java.lang.reflect.Method.invokeNative(Native Method)
01-16 11:20:38.266: I/dalvikvm(303): at java.lang.reflect.Method.invoke(Method.java:521)
01-16 11:20:38.266: I/dalvikvm(303): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-16 11:20:38.266: I/dalvikvm(303): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-16 11:20:38.266: I/dalvikvm(303): at dalvik.system.NativeStart.main(Native Method)
01-16 11:20:38.276: E/dalvikvm(303): VM aborting
Here is the result on Android 4.3:
01-16 06:51:09.948: W/Issue29(765): Opening file
01-16 06:51:09.998: W/Issue29(765): Start element: foo numAttr=0
01-16 06:51:10.018: W/Issue29(765): Start element: bar numAttr=1
01-16 06:51:10.018: W/dalvikvm(765): JNI WARNING: input is not valid Modified UTF-8: illegal start byte 0xf0
01-16 06:51:10.018: W/dalvikvm(765): string: '𠂊'
01-16 06:51:10.018: W/dalvikvm(765): in Lorg/apache/harmony/xml/ExpatAttributes;.getValueByIndex:(JI)Ljava/lang/String; (NewStringUTF)
01-16 06:51:10.018: I/dalvikvm(765): "main" prio=5 tid=1 NATIVE
01-16 06:51:10.018: I/dalvikvm(765): | group="main" sCount=0 dsCount=0 obj=0x41466578 self=0x2a00d090
01-16 06:51:10.018: I/dalvikvm(765): | sysTid=765 nice=0 sched=0/0 cgrp=apps handle=1073811452
01-16 06:51:10.018: I/dalvikvm(765): | state=R schedstat=( 113151450 402331313 97 ) utm=3 stm=8 core=0
01-16 06:51:10.120: I/dalvikvm(765): #00 pc 000012fe /system/lib/libcorkscrew.so (unwind_backtrace_thread+29)
01-16 06:51:10.178: I/dalvikvm(765): #01 pc 0005fd92 /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+33)
01-16 06:51:10.178: I/dalvikvm(765): #02 pc 00053e28 /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+395)
01-16 06:51:10.178: I/dalvikvm(765): #03 pc 00053e96 /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
01-16 06:51:10.178: I/dalvikvm(765): #04 pc 000385c0 /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #05 pc 0003998c /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #06 pc 0003bd5e /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #07 pc 00016e3c /system/lib/libjavacore.so
01-16 06:51:10.178: I/dalvikvm(765): #08 pc 0001dc4c /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-16 06:51:10.178: I/dalvikvm(765): #09 pc 0004dcaa /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+393)
01-16 06:51:10.178: I/dalvikvm(765): #10 pc 000385e0 /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+7)
01-16 06:51:10.178: I/dalvikvm(765): #11 pc 00027060 /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #12 pc 0002b580 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
01-16 06:51:10.178: I/dalvikvm(765): #13 pc 0005fcbc /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+291)
01-16 06:51:10.178: I/dalvikvm(765): #14 pc 0004c288 /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #15 pc 0003f956 /system/lib/libdvm.so
01-16 06:51:10.178: I/dalvikvm(765): #16 pc 0001c38a /system/lib/libjavacore.so
01-16 06:51:10.178: I/dalvikvm(765): #17 pc 00024ea8 /system/lib/libjavacore.so
01-16 06:51:10.178: I/dalvikvm(765): #18 pc 00006344 /system/lib/libexpat.so
01-16 06:51:10.178: I/dalvikvm(765): #19 pc 000067f6 /system/lib/libexpat.so
01-16 06:51:10.188: I/dalvikvm(765): #20 pc 00004ed2 /system/lib/libexpat.so
01-16 06:51:10.188: I/dalvikvm(765): #21 pc 00005be6 /system/lib/libexpat.so
01-16 06:51:10.188: I/dalvikvm(765): #22 pc 00007550 /system/lib/libexpat.so (XML_ParseBuffer+91)
01-16 06:51:10.188: I/dalvikvm(765): #23 pc 000241b2 /system/lib/libjavacore.so
01-16 06:51:10.188: I/dalvikvm(765): #24 pc 00024344 /system/lib/libjavacore.so
01-16 06:51:10.188: I/dalvikvm(765): #25 pc 0001dc4c /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-16 06:51:10.188: I/dalvikvm(765): #26 pc 0004dcaa /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+393)
01-16 06:51:10.188: I/dalvikvm(765): #27 pc 000385e0 /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+7)
01-16 06:51:10.188: I/dalvikvm(765): #28 pc 00027060 /system/lib/libdvm.so
01-16 06:51:10.188: I/dalvikvm(765): #29 pc 0002b580 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
01-16 06:51:10.238: I/dalvikvm(765): #30 pc 0005ff7a /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+349)
01-16 06:51:10.238: I/dalvikvm(765): #31 pc 00067ae2 /system/lib/libdvm.so
01-16 06:51:10.238: I/dalvikvm(765): at org.apache.harmony.xml.ExpatAttributes.getValueByIndex(Native Method)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatAttributes.getValue(ExpatAttributes.java:72)
01-16 06:51:10.248: I/dalvikvm(765): at com.example.issue29.MainActivity$Handler.startElement(MainActivity.java:33)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:143)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:513)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
01-16 06:51:10.248: I/dalvikvm(765): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
01-16 06:51:10.248: I/dalvikvm(765): at com.example.issue29.MainActivity.onCreate(MainActivity.java:58)
01-16 06:51:10.248: I/dalvikvm(765): at android.app.Activity.performCreate(Activity.java:5133)
01-16 06:51:10.248: I/dalvikvm(765): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
01-16 06:51:10.248: I/dalvikvm(765): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
01-16 06:51:10.248: I/dalvikvm(765): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
01-16 06:51:10.257: I/dalvikvm(765): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-16 06:51:10.257: I/dalvikvm(765): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-16 06:51:10.257: I/dalvikvm(765): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 06:51:10.257: I/dalvikvm(765): at android.os.Looper.loop(Looper.java:137)
01-16 06:51:10.257: I/dalvikvm(765): at android.app.ActivityThread.main(ActivityThread.java:5103)
01-16 06:51:10.257: I/dalvikvm(765): at java.lang.reflect.Method.invokeNative(Native Method)
01-16 06:51:10.257: I/dalvikvm(765): at java.lang.reflect.Method.invoke(Method.java:525)
01-16 06:51:10.257: I/dalvikvm(765): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
01-16 06:51:10.308: I/dalvikvm(765): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-16 06:51:10.308: I/dalvikvm(765): at dalvik.system.NativeStart.main(Native Method)
01-16 06:51:10.308: E/dalvikvm(765): VM aborting
01-16 06:51:10.308: A/libc(765): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 765 (example.issue29)
The equivalent code works fine using the standard (desktop) Java XML parser.
I will attach the following test files:
Issue29.xml - sample XML file showing the problem
MainActivity.java - test Activity class used to test
Test.java - Standard java equivalent for comparison