[TIMOB-8102] iOS: Ti.UI.WebView crashes when a malformed URL has been entered
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-04T15:28:35.000+0000 |
Affected Version/s | Release 2.0.0, Release 1.8.2 |
Fix Version/s | Release 2.0.0, Sprint 2012-07 |
Components | iOS |
Labels | module_webview, qe-testadded, regression |
Reporter | Junaid Younus |
Assignee | Sabil Rahim |
Created | 2012-03-20T09:26:29.000+0000 |
Updated | 2013-11-25T08:51:18.000+0000 |
Description
*Code*
var win = Ti.UI.createWindow();
var webView = Ti.UI.createWebView({
width: '100%',
height: '100%'
});
win.add(webView);
webView.url = 'http:// google.com'; // if you remove the space, it works fine in 1.8.2
win.open();
*Expected behavior*
The app should run without crashing, just like it does when using the same code and building with version 1.7.5.
*Actual behavior*
The app crashes at runtime.
*Notes*
-I have only tested this on the iOS simulator.
-It works fine when you enter a correct URL (i.e. without any spaces), however in 1.7.5 you could have a space and it wouldn't crash.
-Current workaround: http://pastebin.com/jPkDBK5u
-HD ticket: http://support-admin.appcelerator.com/display/APP-584755
Resolved by PR 1840
Closing issue Tested with Ti Studio build 2.0.0.201203262445 Ti Mobile SDK 2.0.0.v20120326211803 hash r2730634f OSX Lion 10.7.3 iPhone 4S OS 5.0.1 App doesn't crash with a malformed url and works correctly with a valid url
Reopening/closing to add labels
Opening to edit labels.
Anvil test case added. PR link: https://github.com/appcelerator/titanium_mobile/pull/5020