Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8102] iOS: Ti.UI.WebView crashes when a malformed URL has been entered

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-04-04T15:28:35.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.2
Fix Version/sRelease 2.0.0, Sprint 2012-07
ComponentsiOS
Labelsmodule_webview, qe-testadded, regression
ReporterJunaid Younus
AssigneeSabil Rahim
Created2012-03-20T09:26:29.000+0000
Updated2013-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

Comments

  1. Vishal Duggal 2012-03-26

    Resolved by PR 1840
  2. Michael Pettiford 2012-03-27

    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
  3. Michael Pettiford 2012-03-27

    Reopening/closing to add labels
  4. Dustin Hyde 2012-04-04

    Opening to edit labels.
  5. jithinpv 2013-11-25

    Anvil test case added. PR link: https://github.com/appcelerator/titanium_mobile/pull/5020

JSON Source