wei zhang created CB-8916:
-----------------------------
Summary: Huge memory consumption in iOS 8 with compass plugin when
filter parameter is not specified
Key: CB-8916
URL: https://issues.apache.org/jira/browse/CB-8916
Project: Apache Cordova
Issue Type: Bug
Components: iOS
Affects Versions: 3.7.0
Environment: Cordova iOS 3.7.0
JQuery Mobile 1.3.2
iOS 8
Reporter: wei zhang
Hi, I found a bug that occurs if the filter parameter is not specified. It
triggers a large memory consumption in the app and ultimately the app will not
respond to user input.
My function tracks the direction for a list of places, and updates the heading
in real time (one for each place). The code below is my function. When I tested
my app(built against iOS 8 SDK) on both iOS(iPhone5 iOS8) emulator and iPhone
6(iOS 8.0.2), the memory consumption increased significantly when the function
was called. The app failed to respond after about 1 minute 40 seconds, and the
memory usage was around 270 mb(I was monitoring in XCode). The console log
Compass Count indicates that the app usually dies when count reaches around
960.
The issue occurs when the app is built against iOS SDK 8.1. However the same
code runs fine in the app when it is built against iOS 7 SDK (there is no
noticeable increase in memory consumption).
Could you please look into this? Thanks
function activateCompass(frequency, callback){
var frequency = frequency || 100;
console.log("frequency is " + frequency);
var options = { frequency: frequency};
compassHeading = navigator.compass.watchHeading(
function compassSuccess(heading) {
console.log('Compass Count: ' +
compassCounter++);
callback(heading.magneticHeading);
},
function compassError(compassError){
console.log('Compass error: ' +
compassError.code + ' Counter is ' + compassCounter++);
},
options
);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]