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

Android: getActionBar() throws "CalledFromWrongThreadException" exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: None
    • Story Points:
      1
    • Sprint:
      2018 Sprint 15 SDK

      Description

      [WARN]  W/System.err: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
      [WARN]  W/System.err:   at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6816)
      [WARN]  W/System.err:   at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:975)
      [WARN]  W/System.err:   at android.view.ViewGroup.invalidateChild(ViewGroup.java:5125)
      [WARN]  W/System.err:   at android.view.View.invalidateInternal(View.java:12774)
      [WARN]  W/System.err:   at android.view.View.invalidate(View.java:12738)
      [WARN]  W/System.err:   at android.view.View.invalidate(View.java:12722)
      [WARN]  W/System.err:   at android.widget.ImageView.invalidateDrawable(ImageView.java:246)
      [WARN]  W/System.err:   at android.graphics.drawable.Drawable.invalidateSelf(Drawable.java:385)
      [WARN]  W/System.err:   at android.graphics.drawable.Drawable.setVisible(Drawable.java:764)
      [WARN]  W/System.err:   at android.widget.ImageView.onDetachedFromWindow(ImageView.java:1515)
      [WARN]  W/System.err:   at android.view.View.dispatchDetachedFromWindow(View.java:14616)
      [WARN]  W/System.err:   at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4647)
      [WARN]  W/System.err:   at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4620)
      [WARN]  W/System.err:   at android.view.ViewGroup.removeView(ViewGroup.java:4551)
      [WARN]  W/System.err:   at android.support.v7.widget.Toolbar.setNavigationIcon(Toolbar.java:962)
      [WARN]  W/System.err:   at android.support.v7.widget.ToolbarWidgetWrapper.updateNavigationIcon(ToolbarWidgetWrapper.java:613)
      [WARN]  W/System.err:   at android.support.v7.widget.ToolbarWidgetWrapper.setDisplayOptions(ToolbarWidgetWrapper.java:392)
      [WARN]  W/System.err:   at android.support.v7.app.ToolbarActionBar.setDisplayOptions(ToolbarActionBar.java:260)
      [WARN]  W/System.err:   at android.support.v7.app.ToolbarActionBar.setDisplayOptions(ToolbarActionBar.java:254)
      [WARN]  W/System.err:   at org.appcelerator.titanium.proxy.ActionBarProxy.<init>(ActionBarProxy.java:58)
      [WARN]  W/System.err:   at org.appcelerator.titanium.proxy.ActivityProxy.getActionBar(ActivityProxy.java:258)
      [WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      [WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
      [WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
      [WARN]  W/System.err:   at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:147)
      [WARN]  W/System.err:   at android.os.Handler.handleCallback(Handler.java:739)
      [WARN]  W/System.err:   at android.os.Handler.dispatchMessage(Handler.java:95)
      [WARN]  W/System.err:   at android.os.Looper.loop(Looper.java:148)
      [WARN]  W/System.err:   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)
      

      Patch with fix is in attachment.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              s.volkov Sergey Volkov
              Reviewer:
              Gary Mathews
              Tester:
              Samir Mohammed
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code