Can't help with your specific questions, but 9 times out of 10, when
StringIndexOutOfBounds is thrown from system code, the problem is a
fairly obvious one of the user supplying a string that's too short or
an index into the string that's too large (or occasionally a negative
index or zero-length string).  An especially common error is failing
to account for the very last byte and somehow implying a maximum index
that is one character too long.  And of course the ever popular
mistake of assuming 1-origin rather than 0-origin.

On Sep 7, 11:23 am, Wall-E <[email protected]> wrote:
> So in my application, I receive an SMS which contains GPS
> coordinates.  I have a receiver that handles the SMS and parsing.  I
> also have a map activity that plots those points.  In the map activity
> I create/plot a placemark of the point and I also have a balloon
> overlay that pops up when the user clicks on the placemark.  Sometimes
> when clicking on this placemark, there is a
> StringIndexOutofBoundsException being thrown.  I'm not sure how to
> view the stack trace but I've stepped through my code and cannot view
> the code where this is happening.
>
> This is what my Debug window looks like at the time of the crash:
>
> Thread [<3> main] (Suspended (exception
> StringIndexOutOfBoundsException))
>         ViewRoot.draw(boolean) line: 1378
>         ViewRoot.performTraversals() line: 1119
>         ViewRoot.handleMessage(Message) line: 1638
>         ViewRoot(Handler).dispatchMessage(Message) line: 99
>         Looper.loop() line: 130
>         ActivityThread.main(String[]) line: 4425
>         Method.invokeNative(Object, Object[], Class, Class[], Class, int,
> boolean) line: not available [native method]
>         Method.invoke(Object, Object...) line: 521
>         ZygoteInit$MethodAndArgsCaller.run() line: 860
>         ZygoteInit.main(String[]) line: 618
>         NativeStart.main(String[]) line: not available [native method]
>
> Does anybody know where ViewRoot is being called?  I have an OnTap()
> method and the overlay classes which I've stepped through and
> everything seems fine but I can only step through it to a certain
> point.
>
> Any suggestions on how to debug this is greatly appreciated.

-- 
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

Reply via email to