From 75dd5448fc19caa4de32cb224afb89c53139f090 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 7 Feb 2017 15:29:28 -0700 Subject: [PATCH 1/3] Turn on NUNIT exit code --- ci/appveyor_run_tests.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/appveyor_run_tests.ps1 b/ci/appveyor_run_tests.ps1 index 78bae50b9..3bfaf216d 100644 --- a/ci/appveyor_run_tests.ps1 +++ b/ci/appveyor_run_tests.ps1 @@ -26,8 +26,7 @@ if ($NUNIT_STATUS -ne 0) { } # Embedded tests failing due to open issues, pass/fail only on Python exit code -# if ($PYTHON_STATUS -ne 0 -or $NUNIT_STATUS -ne 0) { -if ($PYTHON_STATUS -ne 0) { +if ($PYTHON_STATUS -ne 0 -or $NUNIT_STATUS -ne 0) { Write-Host "Tests failed" -ForegroundColor "Red" $host.SetShouldExit(1) } From c69297e1da11ea09f5f6576578028420771cb3e8 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 7 Feb 2017 18:18:25 -0700 Subject: [PATCH 2/3] Fix GC on PyObject during Finalizing Similar to how `PythonDerivedType` finalizes. Closes #364 Possibly related to #245 --- src/runtime/pyobject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/pyobject.cs b/src/runtime/pyobject.cs index 4527e145f..3296d81f8 100644 --- a/src/runtime/pyobject.cs +++ b/src/runtime/pyobject.cs @@ -113,7 +113,7 @@ protected virtual void Dispose(bool disposing) { if (!disposed) { - if (Runtime.Py_IsInitialized() > 0) + if (Runtime.Py_IsInitialized() > 0 && !Runtime.IsFinalizing) { IntPtr gs = PythonEngine.AcquireLock(); Runtime.XDecref(obj); From c954442c3f2ae594ca318f298ebd4607ea7fab3d Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 7 Feb 2017 19:11:49 -0700 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b8126ce..0dcf33d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. - Code Coverage (#345) - Added `pysetargv` (#347) - Added XML Documentation (#349) +- Added Embedded tests on Appveyor (#353) - Added PY3 settings to configuration-manager (#346) ### Changed @@ -21,11 +22,11 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. - Completed refactor of Build Directives on `Runtime.cs` (#339) - Refactor python unittests (#329) - Unfroze Mono version on Travis (#345) -- Enabled Embedded tests on Appveyor (#353) ### Fixed -- Fixed crash during Shutdown (#343) +- Fixed crash during Initialization (#343) +- Fixed crash during Shutdown (#365) ### Removed