Title: New test class causes crash on x86 with `PythonEngine.Initialize` · Issue #946 · pythonnet/pythonnet · GitHub
Open Graph Title: New test class causes crash on x86 with `PythonEngine.Initialize` · Issue #946 · pythonnet/pythonnet
X Title: New test class causes crash on x86 with `PythonEngine.Initialize` · Issue #946 · pythonnet/pythonnet
Description: See the new test class in #901 AccessViolationException gets thrown in the line PyImport_ImportModule("platform") in Runtime.InitializePlatformData when a release build is tested using NUnit console runner. nunit3-console.exe --x86 src\e...
Open Graph Description: See the new test class in #901 AccessViolationException gets thrown in the line PyImport_ImportModule("platform") in Runtime.InitializePlatformData when a release build is tested using NUnit consol...
X Description: See the new test class in #901 AccessViolationException gets thrown in the line PyImport_ImportModule("platform") in Runtime.InitializePlatformData when a release build is tested using NU...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/946
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New test class causes crash on x86 with `PythonEngine.Initialize`","articleBody":"See the new test class in #901\r\n\r\n`AccessViolationException` gets thrown in the line `PyImport_ImportModule(\"platform\")` in `Runtime.InitializePlatformData` when a release build is tested using NUnit console runner.\r\n\r\n`nunit3-console.exe --x86 src\\embed_tests\\bin\\publish\\Python.EmbeddingTest.dll`\r\n\r\nRemoval of initialization code makes tests succeed:\r\n\r\n```csharp\r\n[OneTimeSetUp]\r\npublic void SetUp() {\r\n PythonEngine.Initialize();\r\n}\r\n\r\n[OneTimeTearDown]\r\npublic void Dispose() {\r\n PythonEngine.Shutdown();\r\n}\r\n```\r\n\r\nThe initialization code on its own may not be the cause, as there are other classes, that use the same pattern. Must be something in conjunction with the actual tests.\r\n\r\nNote, that disabling feature implemented by #901 by commenting out code in `TypeManager` does not resolve the problem, e.g. it crashes anyway.","author":{"url":"https://github.com/lostmsu","@type":"Person","name":"lostmsu"},"datePublished":"2019-08-23T20:26:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/946/pythonnet/issues/946"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b397cff7-f301-cf9e-ad52-5ed6eae093da |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC54:DE603:52BB66:6E7E44:6971996E |
| html-safe-nonce | 9266865bf1a9235715eed09761234bdf6d9c86e8f4ad63d4e666775715e5c3ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzU0OkRFNjAzOjUyQkI2Njo2RTdFNDQ6Njk3MTk5NkUiLCJ2aXNpdG9yX2lkIjoiNjMxODc2NTk2NzkzMjQ5NjIzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c56347e5f49bae16a33ef2623cd4b4ac459a6231817e9f2dcfe28f91afb132a0 |
| hovercard-subject-tag | issue:484698221 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/946/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2fca55fd054bae64813c29706707620577572400cc197d7ec505660334823d4f/pythonnet/pythonnet/issues/946 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2fca55fd054bae64813c29706707620577572400cc197d7ec505660334823d4f/pythonnet/pythonnet/issues/946 |
| og:image:alt | See the new test class in #901 AccessViolationException gets thrown in the line PyImport_ImportModule("platform") in Runtime.InitializePlatformData when a release build is tested using NUnit consol... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lostmsu |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdfdce9cd4f6ab85dca2b0d11264270829297c962dd5a79df449062d7822258f |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51c736e60b302bd039c9d5164573d176ceb24bb2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width