[TIMOB-20161] Windows: Webview not cleaned up when parent window closed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2015-12-28T23:32:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Kota Iguchi |
Created | 2015-12-21T20:11:07.000+0000 |
Updated | 2017-03-29T00:55:48.000+0000 |
Description
When running the webview unit tests locally, specifically the test that loads appcelerator.com, I am seeing some troubling output. Even after the test finishes and passes, the output is spamming with:
Exception thrown at 0x76F92ED2 in NMocha.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x054FF02C.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
I'm going to guess we don't clean up the webview properly. Doesn't get triggered by the local html file, but from loading appcelerator.com. My best guess is some JS is running on a setTimeout or something like that and keeps trying to trigger on a partially GC'd webview.
I tried calling stopLoading() and removing the listeners on the destructor, but that didn't seem to help any. In fact, I placed a breakpoint in the destructor and it was never called! I think we may have some issues where when a window is closed we don't clean up after it properly.
When I switched to script only debugging, I saw the following (though not sure we'll change our homepage to fix these):
'NMocha.exe' (Script): Loaded 'Script Code (WebView/3.0)'.
Exception was thrown at line 4, column 14147 in http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 4, column 14533 in http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 30, column 191 in http://stats.g.doubleclick.net/dc.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 30, column 267 in http://stats.g.doubleclick.net/dc.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 30, column 390 in http://stats.g.doubleclick.net/dc.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 25, column 265 in http://a.adroll.com/j/roundtrip.js
0x800a138f - JavaScript runtime error: Unable to get property 'conv_value' of undefined or null reference
Exception was thrown at line 16, column 1357 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 16, column 1460 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 16, column 1609 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 16, column 1357 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 16, column 1460 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 16, column 1609 in http://www.google-analytics.com/analytics.js
0x800a1391 - JavaScript runtime error: 'ActiveXObject' is undefined
Exception was thrown at line 1, column 26216 in https://js.intercomcdn.com/intercom.0d212436.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 1, column 26609 in https://js.intercomcdn.com/intercom.0d212436.js
0x800a139e - JavaScript runtime error: SyntaxError
Looks relevant: [Crash in Native WebView control - Windows 8.1 app](https://social.msdn.microsoft.com/Forums/en-US/33bae9b0-ce48-4495-b0ad-04c2075a10a3/crash-in-native-webview-control-windows-81-app?forum=winappswithcsharp) Microsoft Escalation Engineer says "this is a known bug. I don't have a workaround at this time" on January 30, 2015. FYI this happens on Windows 10 store app too.
Closing ticket as the issue here is not our bug.