Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17562] iOS: YQL crashing app on query

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-09-02T22:31:16.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsiOS
LabelssupportTeam
ReporterMarco Cota
AssigneeIngo Muschenetz
Created2014-08-26T18:28:00.000+0000
Updated2017-03-14T19:50:01.000+0000

Description

Issue

When calling a query to get location using YQL the app crashes with Titanium SDK 3.3.0 while using SDK 3.2.3 is working fine, im attaching the Crash log (crash.txt) we obtain from device Exception Type: EXC_CRASH (SIGABRT), when we run the test case in the iOS Simulator we receive this:
[ERROR] :  Assertion failed: (self.method != nil), function -[APSHTTPRequest send], file /Users/vduggal/ForkedRepos/APSHTTPClient/APSHTTPClient/APSHTTPRequest.m, line 66.

Steps to repro

1. Run the test case Expected Results: An alert with the results from the YQL query will prompt Actual Results: The app crashes during the query

Test case

var win = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win.add(label1);
	
Ti.Geolocation.purpose = "test";
Titanium.Geolocation.addEventListener('location', locationCallback);	

function locationCallback(evtLocation){
		Titanium.Geolocation.removeEventListener('location', locationCallback);
		var mylongitude = evtLocation.coords.longitude;
		Ti.API.info("mylongitude "+mylongitude);
		var mylatitude = evtLocation.coords.latitude;
		Ti.API.info("mylatitude "+mylatitude);
		
		var query = 'select * from yahoo.maps.findLocation where q="' + mylatitude + ',' + mylongitude + '" and gflags="R"';

		Ti.Yahoo.yql(query, function(e) {
				alert(e);
			});
	
}

win.open();

Attachments

FileDateSize
crash.txt2014-08-26T18:28:00.000+000050498

Comments

  1. Eric Merriman 2014-09-03

    [~ssekhri] Please see if you can reproduce with 3.3.0 SDK and 3.4.0 SDK.
  2. Satyam Sekhri 2014-09-03

    Following are the observation while testing using the test case mentioned in the description above and following environment: SDK: 3.4.0.v20140829184521, 3.3.0.GA, 3.2.3.GA Studio: 3.4.0.201408291834 CLI: 3.4.0-dev Xcode: Xcode 6 Beta7, Xcode5.1.1 Devices: iPhone4 (v7.1), iPad Gen4 (v8.0 beta5) For SDK 3.2.3.GA, the app runs successfully on both the devices and an alert is given. For SDK 3.3.0.GA, the app crashed on both the devices. The crash logs are similar to the one mentioned above. For SDK 3.4.0.v20140829184521: On iPhone 4 (v7.1) the app runs successfully. On iPad Gen4 (v8.0 beta5), the app does not crash but no alert is shown. There is also no alert for allow/deny to authorise the app to use location services (which comes in all other scenarios that ran successfully). The console log shows a message like: ": ERROR: com.appc.test17562 is depending on legacy on-demand authorization, which is not supported for new apps"
  3. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source