You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: /Users/runner/work/puerts/puerts/unity/test/Src/Cases/AccessControlTest.cs(39,23): error NUnit1032: The field DefaultDontBindingEnv should be Disposed in a method annotated with [OneTimeTearDownAttribute]
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.InvalidOperationException: JsEnv has been disposed!
at Puerts.JsEnv.CheckLiveness() in D:\a\puerts\puerts\unity\Assets\core\upm\Runtime\Src\Default\JsEnv.cs:line 829
at Puerts.GenericDelegate.CheckLiveness(Boolean shouldThrow) in D:\a\puerts\puerts\unity\Assets\core\upm\Runtime\Src\Default\JSType\GenericDelegate.cs:line 362
at Puerts.GenericDelegate.Finalize() in D:\a\puerts\puerts\unity\Assets\core\upm\Runtime\Src\Default\JSType\GenericDelegate.cs:line 369
detail | 详细描述
首先(新版)nunit要求在OneTimeTearDown方法中对JsEnv变量Dispose
https://github.com/Tencent/puerts/actions/runs/8358232240/job/22879060265
Error: /Users/runner/work/puerts/puerts/unity/test/Src/Cases/AccessControlTest.cs(39,23): error NUnit1032: The field DefaultDontBindingEnv should be Disposed in a method annotated with [OneTimeTearDownAttribute]
加上后,会报如下错误:
https://github.com/Tencent/puerts/actions/runs/8368563099/job/22912863909
Dispose前加上强制gc问题解决
不过感觉GenericDelegate的析构检查到jsenv被dispose,不必抛异常,由于gc的不可控GenericDelegate的释放可能比较后,属于正常现象。
The text was updated successfully, but these errors were encountered: