Open KitchenSink.
Go to Base UI > Views > Web Views > Local URL.
Then cause the app to close. NOT by force-stopping it from Settings > Applications[1], but by opening enough other applications to use up memory.
Now reopen KitchenSink. It will crash.
The output from logcat includes multiple entries such as:
E/TiBaseActivity(10988): java.lang.RuntimeException: Can't marshal non-Parcelable objects across processes.
E/TiUncaughtHandler(10988): (main) [26,9530] Sending event: exception on thread: main msg:android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@40514928 is not valid; is your activity running?; Titanium 1.7.0,2011/03/31 12:08,6cae16
E/TiUncaughtHandler(10988): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@40514928 is not valid; is your activity running?
The result is that any Android webview-based app will crash on reopen (whether it was closed by the system, a crash, etc.) every single time.
For more detail/discussion, see Q&A at: [Android webview crashes](
http://developer.appcelerator.com/question/120635/android-webview-crashes----theyre-not-your-fault)
I can reliably reproduce the problem, with or without the [alwaysRetainTaskState](http://wiki.appcelerator.org/display/guides/Maintaining+a+Custom+AndroidManifest.xml#MaintainingaCustomAndroidManifest.xml-EnsuringAndroidshutsdownappscleanly) setting applied, by doing the following: * start the KS and navigating to the "Local URL" demo. Wait to finish loading. Press Home * start default apps: Alarm Clock, API Demos, Browser (navigate to [http://rgmwatches.com]), and Maps. Wait until one is fully loaded before pressing the Home button and opening the next * return to the KS webview demo. Observe "Sorry!...application has stopped unexpectedly" error Environment: * tested on emulator only * Ubuntu 10.04 * Titanium Studio, build: 1.0.0.201106071155 Build date: 07 June 2011, 11:57:46 Titanium SDK version: 1.7.0 (06/02/11 11:34 c951553...) * Android SDK 2.2 There is a video of the issue occurring [here](http://dl.dropbox.com/u/14392713/KT-KS-crash-demo.ogv), although I am not sure if there is anything further to be gleaned from it Also, logcat output is [here](http://pastebin.com/w1UkakMg)
Associated HD ticket
Customer is relying on this, so I've increased priority, http://appc.me/c/APP-828783Any update on this?
Any updates on this ticket> It affects a majority of the users on 2.3.X and about 30% of users are on it. Results in a lot of crashes due to this making the app unusable. Please bump up the priority. Thanks!
Clearly reproducable on device (Motorola Milestone, Android 2.3.4). Current Kitchen Sink application built with Titanium SDK Version: Titanium 1.7.2 (2011/07/21 09:36 97c3689) Any updates on this?
Folks its been a month since we requested information on this. Can you guys squeeze this in for 1.7.3. Its really impacting a lot of users. Pls revert.
I am not able to reproduce the behavior where you get an error message of "Sorry!...application has stopped unexpectedly". When I switch back to the KS demo, it restarts, but it doesn't show any pop-up error message. Are there any steps that I may be missing to trigger this behavior?
Allen, If you would like to IM us pls reach out to us. We are online now. pls email us at support@taazza.com and we can help you reproduce it right away. Thannks!
The reproduction sequence should be public along with the ticket. Is there a problem adding it here?
We have seen this crash happen when our app opens an external app - the email app, SMS app, dialer, Google Maps app or the browser. Our app goes to the background, but gets displayed again once we close the external app. In between these actions, this crash happens. And when we reopen our app, it seems to think it is being woken up & crashes again throwing up the "Sorry..." dialog. This behaviour can be easily observed on *2.3.X* both on the emulator and on a device. The code which consistently causes this crash for us uses *Ti.Platform.openURL* to open external apps: * Open the dialer using *Ti.Platform.openURL('tel:' +
Can you please provide an app.js that I can use to reproduce this issue? I have simple code that launches google maps, and when I go back I do not see the error message you are referring to. This is what I did: 1. Open the app, and launch google maps 2. Open a bunch of other activities, like msg, browser, gallery etc 3. Go back and reopen the app The app restarts, but I don't see any error message. Please also provide step by step instructions to reproduce this. Thanks!
Are you trying this on 2.3.4?
I am using 2.3.1 emulator
Its reproducible consistently on 2.3.4 devices by our users & as note by John Zweng above. Any way u can try it on 2.3.4?
I just tried it on a 2.3.4 device, and I can't reproduce the error you are getting. Could you please provide an app.js and step by step instructions to reproduce this?
Could you also try using Titanium SDK 1.8.0? Instructions to use the latest build are located at http://wiki.appcelerator.org/display/guides/Continuous+Builds
Will do. Did u try it on 1.7.X and 2.3.4?
No, I only tried it on 1.8.0 and 2.3.4 There may have been other changes in 1.8.0 that have already fixed this issue.
If you could try it on 1.7.X branch it would help. We will try it on the device on our end when the team is back later tonite. We would have to back port the fix to 1.7.X if we can find it.
To reproduce the issue on 1.7.X and 1.8.0:
Click on the *Open WebView* button. New window with webview containing dropdown opens up.
Close the window using the back button.
Click on the *Open WebView* button again. Webview window opens up. Now click on the dropdown. App crashes.
pull request is ready (from allen) https://github.com/appcelerator/titanium_mobile/pull/594
Awesome, thanks for working on this guys!
Tested with 1.8.0.1.v20111205164258 v8/rhino on Galaxy 10.1 (3.1) Droid 1 (2.2.2) Nexus S (2.3.6)
Open to add label
Reopening/closing to add/remove labels