[TIMOB-26141] Android: Accessing Titanium.App.Android.R logs GC errors
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-10-29T22:22:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | alloy, android |
Reporter | David van de Meer |
Assignee | Gary Mathews |
Created | 2018-06-06T03:54:59.000+0000 |
Updated | 2018-10-29T22:22:09.000+0000 |
Description
When building an Alloy app with Ti SDK 7.1.1 accessing
Titanium.App.Android.R
causes the logs to trow errors:
[ERROR] JavaObject: !!! OH NO! We tried to grab a Java Object back out of the reference table, but it must have been GC'd, because it's null! Key: 0
[ERROR] JavaObject: !!! OH NO! We tried to grab a Java Object back out of the reference table, but it must have been GC'd, because it's null! Key: 0
How to reproduce:
1. Create new Alloy app
2. Add the following code below in alloy.js:
3. Build
4. See errors in logs.
Ti.API.info("Hyper Hello");
Ti.API.info(Titanium.App.Android.R);
Logs:
[INFO] Hyper Hello
[ERROR] JavaObject: !!! OH NO! We tried to grab a Java Object back out of the reference table, but it must have been GC'd, because it's null! Key: 0
[ERROR] JavaObject: !!! OH NO! We tried to grab a Java Object back out of the reference table, but it must have been GC'd, because it's null! Key: 0
[INFO] [object R]
Hello, we can reproduce the issue, At the moment, we don't know why it's happening but seems harmless at the moment. It doesn't break the app or cause a crash. Thanks.
Why would you mark this as resolved? Yes its not causing issues but its not "Resolved"
This is indeed a valid issue and should be looked into. It may be an issue with our V8 binding (cc [~cwilliams], [~gmathews]) and also happens for random Hyperloop examples (using the hyperloop-examples app) on SDK 7+ only.
master: https://github.com/appcelerator/titanium_mobile/pull/10129
*Closing ticket*, Verified fix in SDK Version:
7.4.0.v20180718223310
*FR Passed (Test Steps):*Created a titanium application with the following code
Ran the program
Application no longer showed a GC error
*Test Environment*