[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033878#comment-14033878 ] Staci Cooper commented on CB-6924: -- I've looked into this with Visual Studio's memory profiler and saw that the leak was an issue with the CordovaView. I thought that I had it isolated to the CordovaBrowser_Navigated handler, which injects scripts for the BrowserDecorators. I narrowed it down to ConsoleHelper, and suspected that the issue was related to the OnServiceClosing handler preventing garbage collection of the entire Main Page. Commenting out that section cleaned the leak. But after playing around with it for awhile and coming back to the code I wasn't able to recreate it. I must have been doing something else as well. I noticed that the CordovaView has an 'IsBrowserInitialized' bool to prevent data clearing during page transitions. It is evaluated during the CordovaBrowser_Loaded handler, which returns if it is true and then sets it to true before continuing. Is the purpose of this to prevent the CordovaView from being reconstructed every time MainPage is loaded? (Which is currently the case). Or is this expected behavior? Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Jesse MacFadyen Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033985#comment-14033985 ] Staci Cooper commented on CB-6924: -- I did find the source of the leak. It's the event handlers added to the PhoneApplicationService.Current in both CordovaView.xaml.cs and in ConsoleHelper.cs. To fix it I want to unwire those event handlers in the unloaded event for CordovaView. My question is, does that fit in with the intended behavior of MainPage? Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Staci Cooper Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034102#comment-14034102 ] ASF GitHub Bot commented on CB-6924: Github user stacic commented on the pull request: https://github.com/apache/cordova-wp8/pull/41#issuecomment-46341089 I built mobile-spec with these changes and didn't see any new tests failing. Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Staci Cooper Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034101#comment-14034101 ] ASF GitHub Bot commented on CB-6924: GitHub user stacic opened a pull request: https://github.com/apache/cordova-wp8/pull/41 CB-6924 Fixed memory leak in WP page navigation Occurred when navigating back and forth from native to hybrid page. You can merge this pull request into a Git repository by running: $ git pull https://github.com/stacic/cordova-wp8 CB-6924 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-wp8/pull/41.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #41 commit 0c5f0e393db026633afd89fec0684c0021d19df6 Author: Staci Cooper smcoo...@us.ibm.com Date: 2014-06-17T17:43:54Z CB-6924 Fixed memory leak in WP page navigation Occurred when navigating back and forth from native to hybrid page. Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Staci Cooper Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034141#comment-14034141 ] ASF subversion and git services commented on CB-6924: - Commit 0c5f0e393db026633afd89fec0684c0021d19df6 in cordova-wp8's branch refs/heads/master from [~stacic] [ https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;h=0c5f0e3 ] CB-6924 Fixed memory leak in WP page navigation Occurred when navigating back and forth from native to hybrid page. Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Staci Cooper Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP
[ https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034142#comment-14034142 ] ASF GitHub Bot commented on CB-6924: Github user asfgit closed the pull request at: https://github.com/apache/cordova-wp8/pull/41 Memory leak navigating between native and hybrid pages in WP Key: CB-6924 URL: https://issues.apache.org/jira/browse/CB-6924 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: Master Reporter: Staci Cooper Assignee: Staci Cooper Attachments: memleak.zip Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the start page. Then give it a button to navigate to the Cordova page, MainPage.xaml Launch application to opening page (native). Click button to go to Cordova page. Click hardware back button to go to opening page. Repeat 4 times. When inspecting the memory profile, you see a steady increase in memory, and 5 copies of MainPage which have not been garbage collected (even if you force garbage collection). If this is done enough times the app crashes due to surpassing memory limit. -- This message was sent by Atlassian JIRA (v6.2#6252)