Project: titanium
Issue TIMOB-18244: Android: MapView crashes within Fragments
The issue title may be a little general but I'm not able to be more specific because this happens whenever the parent view of the mapview is a Fragment. You can easily reproduce this bug with this test code: {code:javascript} Ti.UI.createAlertDialog({ androidView: require('ti.map').createView() }).show(); {code} App crashes with this: {code} [ERROR] : TiApplication (main) [712,712] Sending event: exception on thread: main msg:android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8; Titanium 3.6.0,2014/12/11 14:51,7bde3b5 [ERROR] : TiApplication android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8 [ERROR] : TiApplication android.content.res.Resources.getResourceName(Resources.java:2026) [ERROR] : TiApplication android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:939) [ERROR] : TiApplication android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126) [ERROR] : TiApplication android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739) [ERROR] : TiApplication android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489) [ERROR] : TiApplication android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454) [ERROR] : TiApplication android.os.Handler.handleCallback(Handler.java:739) [ERROR] : TiApplication android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication android.os.Looper.loop(Looper.java:135) [ERROR] : TiApplication android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] : TiApplication java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] : TiApplication com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code} This not just happening with AlertDialogs, I've seen this error since a while here: https://github.com/manumaticx/Ti.DrawerLayout/issues/4 I think the cause for this is somewhere in [TiUIFragment|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java] as the FragmentManager fails to resolve the containers resource id. I've tested this with several Titanium versions (3.3.0 to 3.6.0).
Story points: 8