[TIMOB-20258] Android: If you run a mobile project on Android < 5.0, then WindowProxy errors will appear in logcat
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Do |
Resolution Date | 2018-11-14T19:28:33.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | qe-5.2.0, regression |
Reporter | Wilson Luu |
Assignee | Joshua Quick |
Created | 2016-01-20T21:42:51.000+0000 |
Updated | 2018-11-14T19:28:36.000+0000 |
Description
*Details:* If you run a mobile project on Android < 5.0, then WindowProxy errors will appear in logcat.
*Notes:*
* This is a *regression* from SDK 5.1.2.GA.
* *However*, the errors appear to be benign on Android < 5.0 i.e. default app does not throw any runtime errors or does not crash.
*Steps to reproduce:*
Create a default Alloy app
Run app on Android device/emulator less than 5.0
Wait app to be launched
Check logcat
*Actual:* WindowProxy errors will appear in logcat:
[ERROR] dalvikvm: Could not find class 'android.transition.Explode', referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve new-instance 1762 (Landroid/transition/Explode;) in Lti/modules/titanium/ui/WindowProxy;
[DEBUG] dalvikvm: VFY: replacing opcode 0x22 at 0x0011
[INFO] dalvikvm: Could not find method android.transition.Slide.<init>, referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve direct method 14150: Landroid/transition/Slide;.<init> (I)V
[DEBUG] dalvikvm: VFY: replacing opcode 0x70 at 0x0029
[INFO] dalvikvm: Could not find method android.transition.Slide.<init>, referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve direct method 14150: Landroid/transition/Slide;.<init> (I)V
[DEBUG] dalvikvm: VFY: replacing opcode 0x70 at 0x0030
[INFO] dalvikvm: Could not find method android.transition.Slide.<init>, referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve direct method 14150: Landroid/transition/Slide;.<init> (I)V
[DEBUG] dalvikvm: VFY: replacing opcode 0x70 at 0x0038
[INFO] dalvikvm: Could not find method android.transition.Slide.<init>, referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve direct method 14150: Landroid/transition/Slide;.<init> (I)V
[DEBUG] dalvikvm: VFY: replacing opcode 0x70 at 0x003f
[ERROR] dalvikvm: Could not find class 'android.transition.ChangeClipBounds', referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve new-instance 1759 (Landroid/transition/ChangeClipBounds;) in Lti/modules/titanium/ui/WindowProxy;
[DEBUG] dalvikvm: VFY: replacing opcode 0x22 at 0x0049
[ERROR] dalvikvm: Could not find class 'android.transition.ChangeTransform', referenced from method ti.modules.titanium.ui.WindowProxy.createTransition
[WARN] dalvikvm: VFY: unable to resolve new-instance 1761 (Landroid/transition/ChangeTransform;) in Lti/modules/titanium/ui/WindowProxy;
[DEBUG] dalvikvm: VFY: replacing opcode 0x22 at 0x004f
[ERROR] dalvikvm: Could not find class 'android.transition.ChangeImageTransform', referenced from method ti.modules.titanium.ui.WindowProxy.createTrans
*Expected:* No errors should appear regarding the WindowProxy.
I confirm and i can reproduce this easily with and Android 4.3
Has anyone found a solution? I'm having this problem in my slide menu and my app crashes always on Android.
[~amurcia] Can you post your crash log. Because these are warnings when your app is targetted < 5.0. Ideally this should not crash.
This is my log: TiApplication: (main) [1298,1298] Sending event: exception on thread: main msg:java.lang.NumberFormatException: Unable to convert null; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] : TiApplication: java.lang.NumberFormatException: Unable to convert null [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:412) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView.
[~amurcia] crash is with this line
This has nothing to do with the runtime warnings.
I have noticed crashes around this issue too (dalvikvm - "android.transition....") The error log provided in the ticket shows the same issue I'm seeing my console. TiSDK: 5.2.0.GA Appc: 5.2.0 Alloy: 1.7.35 Node: 4.2.6 This issue is being seen on a Samsung Galaxy Ace (4.2.2) and Vodafone Smart First 6 (4.4.2)
[~lmcjt] Could you include the crash logs when this happen from the logcat? (adb logcat)
Sorry for the delay in response. As I said, it's virtually the same log, but maybe you'll gleam something from this.
[~amurcia] This might be a lil late but is your slide menu still crashing? And if so, do you have the code to illustrate the crash?
Yes it's still crashing, with the sample code here [https://github.com/mcongrove/com.mcongrove.slideMenu]
I have the same problem. Did you find any solution? Tx
The problem is this line: https://github.com/mcongrove/com.mcongrove.slideMenu/blob/master/styles/widget.tss#L11 Since Android also supports SeparatorStyle since 5.2.0, it doesn't recognize the iOS constant, therefore crashes. There should be a check for unknown constants and the app shouldn't crash though.
Set default separatorStyle for tableview: https://github.com/appcelerator/titanium_mobile/pull/8020 Test code:
App should not crash when running on Android
[~amurcia] Created the ticket TIMOB-23441 to handle the issue that you are facing and will be resolving it there. Reason being that the initial issue that this ticket is facing is a separate issue and is not be solved yet but the PR here will solve your issue. Please follow TIMOB-23441 instead. It's being resolved there.
Leaving this ticket open.
In my case the app crashes and I didn't find any workaround. I tried also the separator style, but it didn't work
Hello, I am not able to reproduce this issue with following code. The app does not crashes on launch. But some error log is produced which given below. *app.js:*
*Error Log:*
*Environment*: *Device info:* HTC One (Android 4.4.3) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.3.0.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.6 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
In my case the app crashes either on Android 4.2.2 or 4.4.2. I find this trace on console: [DEBUG] : AndroidRuntime: Shutting down VM. How can I manage this issue until the fix? Any advice? tks. I think that the priority of this bug is higher than medium.
I see this with Ti SDK 5.2.1+. In this case, I'm running Android 5.1.1 and the app crashes.
Can't reproduce error. Tried with latest SDK, 5.5.0.GA, and 5.1.0.GA as well as Android 6 and 4.4.
The exception posted by Jay Splaine is not related to the logged "opcode" warnings highlighted by this bug report. That said, the exception posted have been fixed in 2016 by the following 2 commits... https://github.com/appcelerator/titanium_mobile/commit/49bd2af63543460e3a3dbdf60f24bd67f3024531 https://github.com/appcelerator/titanium_mobile/commit/0ebdcc75f846e3b65f9c6a56e3eece70c2061f31 The "opcode" warnings are still an open issue and can be solved the techniques shown by Google on the following blog post. This is the same technique Google uses in their Android "Support" libraries. https://android-developers.googleblog.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html
Hello all, If your Android app crashes, please write a ticket in JIRA and we can address them as they come in. These runtime errors are not as far as we can tell related to your crashes. Looking at the scope of this issue and the updates we need to make to the SDK to avoid the opcode warnings, we need to move this out of release 6.1.0 and start methodically addressing the many places that relate to the warnings. If you do write a JIRA ticket about a crash, remember to add some sample code demonstrating the crash and include any logs. That way we can help get your issues resolved much faster.
Here's a list of references that need to be "hidden" from Dalvik:
Google's support libraries cause these warning as well. This issue is unresolvable on Android 4.x and we have to live with it. Closing.