[AC-2388] Java Exception Error : Titanium.Platform.displayCaps.platformWidth
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-19T23:32:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | triage |
Reporter | mutturaj |
Assignee | Mauro Parra-Miranda |
Created | 2012-10-04T06:54:48.000+0000 |
Updated | 2016-03-08T07:41:25.000+0000 |
Description
We have designed custom Dashboard view for android, we are using platformwidth and height property to get the screen width and height.
But we are encountering Uncaught Java Exception : Titanium.Platform.displayCaps.platformWidth when we change android device orientation. Kindly check ASAP.
Attachments
Hi mutturaj, Is it possible for you to provide a reproducible test case in the form of an app.js? I also need you to add the Titanium Mobile SDK version you are building against, and the Android OS version. Thanks.
I've set this to resolved so that the issue can now be edited to provide more info. We appreciate your time in helping to improve our platform. Thanks, Daniel
I can confirm this problem. For me it just randomly shows this message when accessing the property, but it not always fails. Lets say 1 in 100 times this error occurs *. Just run this a thousand times to test: alert(Titanium.Platform.displayCaps.platformWidth); It for sure happens in SDK: 3.0.2.GA Maybe it is fixed in the new SDK 3.1.0, It's not easy to test, because in my case there is no noticeable reason.
Hi Michael, I tried this code with 3.1 GA... It never seems to fail for me. Please try with 3.1 GA and let me know how it goes.
Thanks.
I get this error randomly, but most of the time. function tabWidth() { return Ti.Platform.displayCaps.platformWidth / 2; }
Did you try my test case? Which Ti SDK version?
The error occurs when the application is initialized from a uri with a intent filter, here is the code: https://github.com/appcelerator-titans/App/blob/master/Community/Resources/android/ui/TabStripView.js SDK Version: 3.1.0.GA
We are also facing the similar issue and it is very random. We have got it once twice till now in 1.5 month. But we are unable to create a reproducible test case for this. But this is existing and extremely rare. Gilberto, Can you please explain as to what did you mean by application initialized URI.