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();
[~ssekhri] Please see if you can reproduce with 3.3.0 SDK and 3.4.0 SDK.
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: "
Closing ticket as fixed.