I've literally spent 15+ hours trying to figure out this one bug (when I should be studying for finals). Any help is greatly appreciated. The bug appears on the dev1 phone running cupcake. It was not present before the upgrade. Basically, the problem is that when a activity with a webview and 2 threads is run, the service that runs after it will always crashes the process (but it works fine when the debugger is attached). The worst part is that it crashes at arbitrarily places in the service, so I can't isolate the error.
The details: I have an activity with a WebView. The activity executes two threads, one after the other using the basic new Thread(new Runnable() {public void run()... Both threads use the same handler to report back results to the main activity. Flow works like this: when the activity starts, the first thread gets data to construct the URL that the webview will load (using DefaultHTTPClient). Then when the user navigates to a certain page, the second thread is again fired (using DefaultHTTPClient) to get some xml. This works fine. The problem happens right afterwards. Once the activity with the webview finishes (it calls finish on itself), a service is started that has a thread that using DefaultHttpClient to downloaded some xml, process it, etc. The service crashes at arbitrary points with no error messages, simply displaying a memory dump, and kills the main process with it. When I attempt to debug the process, it runs just fine w/ no crashes. I've repeated this at least 30 times, with the same result. (no crash w/ debugger, crash when installing signed apk file to device and running it). The program doesn't crash when the threads are removed from the activity with webview. So even if the webview activity runs (but all threads are removed), the service runs just fine regardless of the debugger. Here is how my threads start (both of the ones in the activity with the webview, and the main thread in the service that is launched afterwards): Thread t = new Thread( new Runnable() { public void run() { try { final HttpParams params1 = new BasicHttpParams(); HttpProtocolParams.setVersion(params1, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params1, "UTF-8"); final SchemeRegistry registry = new SchemeRegistry(); registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); final ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(params1, registry); DefaultHttpClient client = new DefaultHttpClient(manager, params1); ................. Here is what logcat displays: 05-15 05:00:03.561: INFO/DEBUG(1022): Build fingerprint: 'android- devphone1/dream_devphone/dream/trout:1.5/CRB21/147201:userdebug/ adp,test-keys' 05-15 05:00:03.571: INFO/DEBUG(1022): pid: 2540, tid: 2541 >>> com.macrospecs.friendmobilizer <<< 05-15 05:00:03.571: INFO/DEBUG(1022): signal 11 (SIGSEGV), fault addr 00000140 05-15 05:00:03.571: INFO/DEBUG(1022): r0 00000007 r1 00000001 r2 411989b4 r3 00000140 05-15 05:00:03.571: INFO/DEBUG(1022): r4 411989b4 r5 000f7418 r6 00000000 r7 0016e170 05-15 05:00:03.571: INFO/DEBUG(1022): r8 100ffd00 r9 4100aef0 10 4100aedc fp 00000001 05-15 05:00:03.582: INFO/DEBUG(1022): ip 00000011 sp 100ffc48 lr ad046ca5 pc ad03ed9a cpsr 00000030 05-15 05:00:03.681: INFO/DEBUG(1022): #00 pc 0003ed9a / system/lib/libdvm.so 05-15 05:00:03.691: INFO/DEBUG(1022): #01 pc 0026d0ce / system/lib/libwebcore.so 05-15 05:00:03.691: INFO/DEBUG(1022): #02 pc 0026d250 / system/lib/libwebcore.so 05-15 05:00:03.701: INFO/DEBUG(1022): #03 pc 0000e3b4 / system/lib/libdvm.so 05-15 05:00:03.711: INFO/DEBUG(1022): #04 pc 00040a8a / system/lib/libdvm.so 05-15 05:00:03.711: INFO/DEBUG(1022): #05 pc 00013118 / system/lib/libdvm.so 05-15 05:00:03.711: INFO/DEBUG(1022): #06 pc 00017b1c / system/lib/libdvm.so 05-15 05:00:03.721: INFO/DEBUG(1022): #07 pc 00017560 / system/lib/libdvm.so 05-15 05:00:03.721: INFO/DEBUG(1022): #08 pc 000520ec / system/lib/libdvm.so 05-15 05:00:03.731: INFO/DEBUG(1022): #09 pc 0005210a / system/lib/libdvm.so 05-15 05:00:03.731: INFO/DEBUG(1022): #10 pc 000494c4 / system/lib/libdvm.so 05-15 05:00:03.741: INFO/DEBUG(1022): #11 pc 0004954c / system/lib/libdvm.so 05-15 05:00:03.741: INFO/DEBUG(1022): #12 pc 00049896 / system/lib/libdvm.so 05-15 05:00:03.751: INFO/DEBUG(1022): #13 pc 00046f6a / system/lib/libdvm.so 05-15 05:00:03.751: INFO/DEBUG(1022): #14 pc 0000f880 / system/lib/libc.so 05-15 05:00:03.761: INFO/DEBUG(1022): #15 pc 0000f3f4 / system/lib/libc.so --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---