I just got a similar error report, ArrayIndexOutOfBoundsException within
StringBuilder.
Weird error, it is either a bug in StringBuilder or a VM/hardware glitch.
StringBuffer is appending "itemNotReady" to an empty StringBuffer, 4.1.1
(phone is samsung.GT-I9300.m0). It's all local variables, can't be
threading:
16:07:06.493 WTF: error: Exception "GLThread 3714":
java.lang.ArrayIndexOutOfBoundsException: src.length=12 srcPos=0
dst.length=9999999 dstPos=0 length=9999999
com.lootworks.swords.exception.SwExceptionHandler
at java.lang.System.arraycopy(Native Method)
at java.lang.String._getChars(String.java:913)
at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:147)
at java.lang.StringBuilder.append(StringBuilder.java:216)
at com.lootworks.swords.util.SwLog.concatVarargs(SourceFile:420)
at com.lootworks.swords.util.SwLog.debug(SourceFile:214)
at
com.lootworks.swords.threeD.renderer.SwCombatRenderer$6.itemNotReady(SourceFile:1009)
/** Concatenate a varargs list of parameters, but skipping any element that
matches ignore (unless ignore is null, then everything is shown) */
private String concatVarargs(Object[] args, Object ignore) {
StringBuilder s = new StringBuilder(100);
for (Object o : args) {
if ((ignore == null) || (o != ignore)) {
s.append((o != null ? o.toString() : "null")); <== error occurs
in s.append()
}
}
return s.toString();
}
I have the exact call in my log, it is concatVarags(["itemNotReady"],
null). Pretty simple
On Tuesday, November 6, 2012 10:38:38 AM UTC-8, RichardC wrote:
>
> We need more of the trace especially the "caused by" line.
>
> On Sunday, November 4, 2012 3:50:45 PM UTC, Nadav Smilansky wrote:
>>
>> Hi,
>>
>> I got an exception report from a client. In this report
>> StringBuilder.append(
>> double ) throws an ArrayIndexOutOfBoundsException.
>>
>> There is no thread issue involved, because that code simply looks as
>> follows:
>>
>> StringBuilder sb = new StringBuilder( "" );
>> sb.append( degrees ); // This is the line that throws an exception
>> (degrees is of type double)
>>
>> The stack trace of the exception is:
>>
>> at java.lang.RealToString.longDigitGenerator(RealToString.java:274)
>> at java.lang.RealToString.convertDouble(RealToString.java:111)
>> at java.lang.RealToString.appendDouble(RealToString.java:63)
>> at java.lang.StringBuilder.append(StringBuilder.java:185)
>> at my code
>>
>> The code runs on an Android telephone LG-C660h.
>> Android version: 2.3.4
>> Android API: 10
>>
>> Any ideas? Could this be a bug in the VM?
>>
>> Thanks in advance.
>>
>
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en