[TIMOB-18516] Android: TiUIWebView.isHTCSenseDevice()
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-06-02T06:48:42.000+0000 |
Affected Version/s | Release 3.5.0 |
Fix Version/s | Release 4.1.0 |
Components | Android |
Labels | isHTCSenseDevice |
Reporter | Shuo Liang |
Assignee | Ashraf Abu |
Created | 2015-02-05T07:48:21.000+0000 |
Updated | 2015-06-30T20:51:38.000+0000 |
Description
Hi,
One of enterprise customer requested a code review for TiUIWebView.isHTCSenseDevice(). As there is error happened in their production app, but really can't reproduce in dev as the problem only happened serval times in specific device which they do no have.
So for now, They are suck there and ask for a simple code review for TiUIWebView.isHTCSenseDevice().
Attached error log from newRelic. See if there is something we can do.
Attachments
Should be a very simple fix: https://github.com/appcelerator/titanium_mobile/pull/6621/files
Hello, Why has this change still not been Closed/Resolved. We had a custom build for 3.5.0, and we didn't see any crashes. After upgrading to 3.5.1, we see this happening again, annoying.
The App is crashing on a non-HTC device. Please look into this ASAP
Do we have a device in-house that reproduces the issue?
No. But this is the detail about the device from which we have a crash dump: GI-I9500_TMMARS (GI-I9500_TMMARS) Android 4.1.1 (eng.mars.20141126.142007) 55 MB used RAM 1 GB free disk The PR submitted is a simple one: https://github.com/appcelerator/titanium_mobile/pull/6621/files
received another crash from another SAMSUNG Galaxy S4 device
@Ingo Muschenetz, why hasn't the PR still been merged, and why is there no fix version? Just received the below crash dump today via Appcelerator Dashboard. The crash seems to happen only on the device model GI-I9500_TMMARS, while the webview is loaded, and the code to load my webview is: var htmlFile = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory(), 'ui/webview/map.html'); var mapWebView = Ti.UI.createWebView({ top: 35, borderRadius: 1, width: Ti.UI.FILL, height: Ti.UI.FILL, url: htmlFile.nativePath, willHandleTouches: false, loading: true }); if (app.isAndroid) { mapWebView.pluginState = Ti.UI.Android.WEBVIEW_PLUGINS_OFF; mapWebView.cacheMode = Ti.UI.Android.WEBVIEW_LOAD_NO_CACHE; } Stack Trace _________________________________ 0 java.lang.RuntimeException: Unable to start activity ComponentInfo{spacious.home/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException 1 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2060) 2 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2085) 3 at android.app.ActivityThread.access$600(ActivityThread.java:131) 4 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 5 at android.os.Handler.dispatchMessage(Handler.java:99) 6 at android.os.Looper.loop(Looper.java:137) 7 at android.app.ActivityThread.main(ActivityThread.java:4754) 8 at java.lang.reflect.Method.invokeNative(Native Method) 9 at java.lang.reflect.Method.invoke(Method.java:511) 10 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 11 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 12 at dalvik.system.NativeStart.main(Native Method) 13 Caused by: java.lang.NullPointerException 14 at ti.modules.titanium.ui.widget.webview.TiUIWebView.isHTCSenseDevice(TiUIWebView.java:165) 15 at ti.modules.titanium.ui.widget.webview.TiUIWebView.
Code to use to test (app.js):
[~fahad86] PR: https://github.com/appcelerator/titanium_mobile/pull/6621 Code reviewed and tested. Approved and merged. Thank you.
Verified fixed, using: MacOS 10.11 Studio 4.1.0.201506261427 Ti SDK 4.1.0.v20150626084425 Appc NPM 4.1.0-1 Appc CLI 4.1.0-4 Ti CLI 4.0.1 Alloy 1.6.2 Node v0.10.37 Java 1.7.0_45 Do not witness any errors using TiUIWebView with above code/similar devices.