You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Kimmo Puputti (JIRA)" <ji...@apache.org> on 2012/06/21 09:59:43 UTC
[jira] [Created] (CB-945) Leaking resources if network access
disabled
Kimmo Puputti created CB-945:
--------------------------------
Summary: Leaking resources if network access disabled
Key: CB-945
URL: https://issues.apache.org/jira/browse/CB-945
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 1.8.0
Reporter: Kimmo Puputti
Assignee: Joe Bowser
If network access is disabled for the DroidGap.appView (super.appView.getSettings().setBlockNetworkLoads(true)) then CallbackServer.run() is blocked at waitSocket.accept() and the CallbackServer’s thread never ends. New blocked thread is left each time an instance of DroidGap is opened and closed. An application can crash because of native resource leaks.
This can be fixed by changing the local variable waitSocket in the CallbackServer.run() into the member variable. Also following lines have to be added to the stopServer():
try {
waitSocket.close();
} catch (IOException ignore) {}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-945) Leaking resources if network access
disabled
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-945:
--------------------------
Priority: Minor (was: Major)
I'll fix it, but if you disable network access, you disable access to localhost too, which is required for the callback server. This is FAIL :(
> Leaking resources if network access disabled
> --------------------------------------------
>
> Key: CB-945
> URL: https://issues.apache.org/jira/browse/CB-945
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.7.0
> Reporter: Kimmo Puputti
> Assignee: Joe Bowser
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> If network access is disabled for the DroidGap.appView (super.appView.getSettings().setBlockNetworkLoads(true)) then CallbackServer.run() is blocked at waitSocket.accept() and the CallbackServer’s thread never ends. New blocked thread is left each time an instance of DroidGap is opened and closed. An application can crash because of native resource leaks.
> This can be fixed by changing the local variable waitSocket in the CallbackServer.run() into the member variable. Also following lines have to be added to the stopServer():
> try {
> waitSocket.close();
> } catch (IOException ignore) {}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-945) Leaking resources if network access
disabled
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser resolved CB-945.
---------------------------
Resolution: Fixed
This should now close the waitSocket on close instead of relying on the Garbage Collector.
> Leaking resources if network access disabled
> --------------------------------------------
>
> Key: CB-945
> URL: https://issues.apache.org/jira/browse/CB-945
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.7.0
> Reporter: Kimmo Puputti
> Assignee: Joe Bowser
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> If network access is disabled for the DroidGap.appView (super.appView.getSettings().setBlockNetworkLoads(true)) then CallbackServer.run() is blocked at waitSocket.accept() and the CallbackServer’s thread never ends. New blocked thread is left each time an instance of DroidGap is opened and closed. An application can crash because of native resource leaks.
> This can be fixed by changing the local variable waitSocket in the CallbackServer.run() into the member variable. Also following lines have to be added to the stopServer():
> try {
> waitSocket.close();
> } catch (IOException ignore) {}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-945) Leaking resources if network access
disabled
Posted by "Kimmo Puputti (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kimmo Puputti updated CB-945:
-----------------------------
Affects Version/s: (was: 1.8.0)
1.7.0
> Leaking resources if network access disabled
> --------------------------------------------
>
> Key: CB-945
> URL: https://issues.apache.org/jira/browse/CB-945
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.7.0
> Reporter: Kimmo Puputti
> Assignee: Joe Bowser
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> If network access is disabled for the DroidGap.appView (super.appView.getSettings().setBlockNetworkLoads(true)) then CallbackServer.run() is blocked at waitSocket.accept() and the CallbackServer’s thread never ends. New blocked thread is left each time an instance of DroidGap is opened and closed. An application can crash because of native resource leaks.
> This can be fixed by changing the local variable waitSocket in the CallbackServer.run() into the member variable. Also following lines have to be added to the stopServer():
> try {
> waitSocket.close();
> } catch (IOException ignore) {}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira