multithreading - Android - How do I find what is causing StringIndexOutOfBoundsException -


i have app opens webview and, in different thread (asynctask), periodically submits gps data on http server.

i seeing following exception having difficult time pinpointing source. can help? relative newbie android here.

v/  exception handler(  206): java.lang.stringindexoutofboundsexception v/  exception handler(  206):  v/  exception handler(  206): --------- stack trace --------- v/  exception handler(  206):  v/  exception handler(  206):     java.lang.string.<init>(string.java:190) v/  exception handler(  206):     android.webkit.frameloader.populatestaticheaders(frameloader.java:372) v/  exception handler(  206):     android.webkit.frameloader.handlehttpload(frameloader.java:222) v/  exception handler(  206):     android.webkit.webviewworker.handlemessage(webviewworker.java:129) v/  exception handler(  206):     android.os.handler.dispatchmessage(handler.java:99) v/  exception handler(  206):     android.os.looper.loop(looper.java:130) v/  exception handler(  206):     android.os.handlerthread.run(handlerthread.java:60) 

the trace gives no indication of if inside code causing this. see android system code.(or may not looking right way).

having stringindexoutofboundsexception in string constructor rare enough have not encountered before. kind of data passing asynctask (which subsequently passes webkit)? string buffer or array?

usually when can't deduce cause of bug, try:

  • stepping through code find out line causes crash
  • printing debug statements

edit

when tried force stringoutofboundsexception on emulator, fatal exception, log level error, , log tag androidruntime. in case, appears exceptionhandler has caught exception , has printed stack trace verbose log level. exception handler own? or belong android framework?


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -