Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18244

Android: MapView crashes within Fragments

    Details

    • Story Points:
      8
    • Sprint:
      2015 Sprint 06 SDK, 2015 Sprint 07 SDK

      Description

      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:

      Ti.UI.createAlertDialog({
          androidView: require('ti.map').createView()
      }).show();
      

      App crashes with this:

      [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 	at android.content.res.Resources.getResourceName(Resources.java:2026)
      [ERROR] :  TiApplication 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:939)
      [ERROR] :  TiApplication 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
      [ERROR] :  TiApplication 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
      [ERROR] :  TiApplication 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
      [ERROR] :  TiApplication 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454)
      [ERROR] :  TiApplication 	at android.os.Handler.handleCallback(Handler.java:739)
      [ERROR] :  TiApplication 	at android.os.Handler.dispatchMessage(Handler.java:95)
      [ERROR] :  TiApplication 	at android.os.Looper.loop(Looper.java:135)
      [ERROR] :  TiApplication 	at android.app.ActivityThread.main(ActivityThread.java:5221)
      [ERROR] :  TiApplication 	at java.lang.reflect.Method.invoke(Native Method)
      [ERROR] :  TiApplication 	at java.lang.reflect.Method.invoke(Method.java:372)
      [ERROR] :  TiApplication 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
      [ERROR] :  TiApplication 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
      

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

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              manuellehner Manuel Lehner
              Reviewer:
              Jon Alter
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19490
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code