[
https://issues.apache.org/jira/browse/CB-8002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309379#comment-14309379
]
Kim Hansen commented on CB-8002:
--------------------------------
Putting in a plug for getting this fix out sooner than later. The memory growth
doesn't trigger iOS memory warnings so a dev may be unaware it's happening. It
does not appear as a leak in Instruments, but that's expected since it's not
really a leak. In our app, it seems like the OS puts us in bad-app jail and
queues up native calls.
Symptomatically, Xcode console output stops and calls through the dialogs
plugin don't result in a dialog presentation--nothing at all happens. Non
system events proceed normally so until there's a failed system level call a
user will think the app is ok. As soon as the home button is pressed, Xcode
console will barf out all of the queued console.log messages and when the app
is relaunched (without force quit), the queued dialogs appear. All of them, one
at a time.
For the benefit of google, Instruments shows unabated growth of the memory
allocated to VM: JS garbage collector. My simple test method is to use
setInterval to fire off a console.log message indicating the current time, and
then watch the console either in Xcode itself or via the devices window in
Xcode. At some point in time with 3.7.0, the console messages will stop
arriving.
I have tested the fix on the following devices, watching both for the above
symptoms and for the linear memory usage expansion signature (we make routine
system calls in our app) in both Instruments and Xcode. I am satisfied (enough)
that the fix is production worthy, we'll be shipping to Apple later today.
* iPhone 4S on 7.0.6
* iPhone 5, 5S and 6 on 8.1.3
> Creating a new div for every Js -> Native exec() call
> -----------------------------------------------------
>
> Key: CB-8002
> URL: https://issues.apache.org/jira/browse/CB-8002
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 3.7.0
> Environment: Tested on multiple iOS 8.1 devices, simulators
> Reporter: Serdar Onal
> Assignee: Andrew Grieve
> Priority: Critical
> Fix For: 3.8.0
>
>
> Since the 3.7.0 update, when cordova does a Js to Native call using exec(),
> somehow the underlying cordova.js is creating a "gap://ready" iframe on every
> call. This means that if you made 1000 native calls you'll have 1000 divs on
> the DOM.
> I believe this issue is of critical priority as it incurs a huge memory leak.
> Screenshot from safari inspector
> https://drive.google.com/file/d/0B94TXiq5ycp1anp6aGpTbjhPdG8/view?usp=sharing
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]