Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26982] Android: java.lang.ClassCastException: ti.modules.titanium.ui.widget.TiUILabel$1 cannot be cast to android.view.ViewGroup;

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2019-04-12T01:09:26.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterFelipe Mathies
AssigneeJoshua Quick
Created2019-01-09T11:43:23.000+0000
Updated2019-04-12T01:09:26.000+0000

Description

Comments

  1. Sharif AbuDarda 2019-01-09

    Hello, Was this an app built on the previous SDK, CLI and now having the issue with the latest SDK? Please share your environment details with "appc info" command log. Thanks.
  2. Rafael Pedrini 2019-01-11

    Hello Sharif, I work with Felipe, our App was created using earlier SDK versions, some years ago, then since last month we are updating to most recent SDK version, the last SDK we used was 7.1.1. Officially now we are using SDK 7.5.0.GA, but we already test some nightly builds of 7.5.1, without success to solve this problem. appc info result: {noformat} Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit # CPUs = 4 Memory = 8.0GB Node.js Node.js Version = 8.11.3 npm Version = 6.4.0 Appcelerator CLI Installer = 4.2.13 Core Package = 7.0.6 Titanium CLI CLI Version = 5.1.1 node-appc Version = 0.2.44 {noformat}
  3. Sharif AbuDarda 2019-01-11

    Hello, Try with the latest CLI 7.0.9. Run "appc setup" to install the latest CLI. Thanks.
  4. Rafael Pedrini 2019-01-12

  5. Michael Gangolf 2019-01-12

    Yes, very hard to reproduce but it happens even in the latest SDK. Have that in some apps, too. But can't reproduce it in examples.
  6. Michael Gangolf 2019-01-13

    [~sdarda] btw: I gave Yordan a full app of mine that suffers from this bug, too.
       [ERROR] TiExceptionHandler: (main) [156856,156856] Unable to start activity ComponentInfo{com.miga.app/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: ti.modules.titanium.ui.widget.TiUILabel$1 cannot be cast to android.view.ViewGroup
       [ERROR] TiExceptionHandler:
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentTransition.configureTransitionsOrdered(FragmentTransition.java:310)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:134)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2380)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3248)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3200)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:195)
       [ERROR] TiExceptionHandler:     android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:597)
       [ERROR] TiExceptionHandler:     android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
       [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1504)
       [ERROR] TiExceptionHandler:     android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1299)
       [ERROR] TiExceptionHandler:     android.app.Activity.performStart(Activity.java:6690)
       [ERROR] TiExceptionHandler:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2688)
       [ERROR] TiExceptionHandler:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2786)
       [ERROR] TiExceptionHandler:     android.app.ActivityThread.-wrap12(ActivityThread.java)
       [ERROR] TiExceptionHandler:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1501)
       [ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:102)
       [ERROR] TiExceptionHandler:     android.os.Looper.loop(Looper.java:173)
       [ERROR] TiExceptionHandler:     android.app.ActivityThread.main(ActivityThread.java:6459)
       [ERROR] TiExceptionHandler:     java.lang.reflect.Method.invoke(Native Method)
       [ERROR] TiExceptionHandler:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
       [ERROR] TiExceptionHandler:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
       
    SDK 7.5.1.v20181210141225 So he might be able to run some internal tests
  7. Rafael Pedrini 2019-01-13

    Michael, I found another App (that was not made with Titanium) with this crash: https://github.com/wordpress-mobile/WordPress-Android/issues/7973 The stacktrace is almost the same. I already removed all my labels from screen to test (desperate test), crash still happens... Everybody that uses SDK 7.5.0.GA or later are experiencing this problem?
  8. Michael Gangolf 2019-01-13

    not everybody has that error and it was in earlier SDKs too (see the old ticket mentioned in the description). The last line that is mentioned in the error is pointing to: https://android.googlesource.com/platform/frameworks/support/+/oreo-release/fragment/java/android/support/v4/app/FragmentTransition.java#293 The interesting part for me is: why does it work most of the time (is it not trying to run the transition on the elements or do they work?) and what is causing the problem that it can't convert them.
  9. Rafael Pedrini 2019-01-13

    Is there any way that we can recompile this source to debug and use it? Maybe a try catch to show us the name of component that is causing the exception... Our App have at least 20 different screens, this crash occur only in 4 or 5 screens and its completely random, I already built a version then I repeated the same operation more than 300 times and had no crashs, then 10 minutes later the crash occured in third action.
  10. Rafael Pedrini 2019-01-14

    Michael, are you using Ti.Map in your project? I think that Ti.Map can be related with this crashs in my scenario...
  11. Michael Gangolf 2019-01-14

    Yes, [~ybanev] was investigating in that direction too. I had a Label placed on the Map, removing that was promising at first but after a few tests the error still appeared.
  12. Sharif AbuDarda 2019-01-31

    Hello [~michael], Can you please follow up here? Whats the current status of your issue?
  13. Michael Gangolf 2019-02-01

    I don't have any updates regarding the investigations on your side. The error still appears in my app (which Yordan has a copy of) and I'm not sure what he found out. So at the moment I'm waiting for his feedback :)
  14. Joshua Quick 2019-04-12

    I was able to reproduce this issue with [~michael]'s project. The fix for [TIMOB-17089] resolves this issue. Closing as duplicate.

JSON Source