Title: Random Access Violations on shutdown · Issue #1977 · pythonnet/pythonnet · GitHub
Open Graph Title: Random Access Violations on shutdown · Issue #1977 · pythonnet/pythonnet
X Title: Random Access Violations on shutdown · Issue #1977 · pythonnet/pythonnet
Description: Environment Pythonnet version: 3.0.0.post1 Python version: 3.8.10 Operating System: Windows 11 .NET Runtime: .NET Framework 472 Details Describe what you were trying to get done. I am getting random access violations during shutdown in p...
Open Graph Description: Environment Pythonnet version: 3.0.0.post1 Python version: 3.8.10 Operating System: Windows 11 .NET Runtime: .NET Framework 472 Details Describe what you were trying to get done. I am getting rando...
X Description: Environment Pythonnet version: 3.0.0.post1 Python version: 3.8.10 Operating System: Windows 11 .NET Runtime: .NET Framework 472 Details Describe what you were trying to get done. I am getting rando...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1977
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Random Access Violations on shutdown","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.0.post1\r\n- Python version: 3.8.10\r\n- Operating System: Windows 11\r\n- .NET Runtime: .NET Framework 472\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\n I am getting random access violations during shutdown in pythonnet. The issue can be re-produced with a C# function as simple as\r\n\r\npublic static int Add(int a, int b) =\u003e a + b;\r\n\r\nI get the access violation; however, it is not deterministic at all. Some times, it succeeds as expected, other times I get this. Note that I am upgrading from pythonnet 2.5.2 to pythonnet 3.0.0.post1 so this code used to work. All I am doing is invoking this code from python. I am running this python code that uses pythonnet in pytest. I haven't seen this when we were using pythonnet 2.5.2.\r\n\r\n- If there was a crash, please include the traceback here.\r\n\r\n```python\r\nUnhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.\r\n at Python.Runtime.Runtime.PyObject_TYPE(BorrowedReference op)\r\n at Python.Runtime.Runtime.NullGCHandles(IEnumerable`1 objects)\r\n at Python.Runtime.Runtime.TryCollectingGarbage(Int32 runs, Boolean forceBreakLoops)\r\n at Python.Runtime.Runtime.Shutdown()\r\n at Python.Runtime.PythonEngine.Shutdown()\r\n at Python.Runtime.Loader.Shutdown(IntPtr data, Int32 size)\r\n```\r\n","author":{"url":"https://github.com/rohanjain101","@type":"Person","name":"rohanjain101"},"datePublished":"2022-10-18T00:54:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":40},"url":"https://github.com/1977/pythonnet/issues/1977"}
| 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:04ece254-07a3-3784-f65a-65c5bba09236 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B696:2D93F8:35811D:4715CD:69702DED |
| html-safe-nonce | 312b8515291ded8562289faee60d23cdfbad7ae8cdc1a80601ae249ddec24479 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjk2OjJEOTNGODozNTgxMUQ6NDcxNUNEOjY5NzAyREVEIiwidmlzaXRvcl9pZCI6IjY4NzExOTA1NDEzNTQxNTE0MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e8916c5d3ff40db458368e2451db7a78901c457d8db0fe3f8a42df13fed6192 |
| hovercard-subject-tag | issue:1412418837 |
| 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/1977/issue_layout |
| twitter:image | https://opengraph.githubassets.com/539c910eaba3eeb0f743f8f439ada0894c3cad493ff4d83bb17948444bacba71/pythonnet/pythonnet/issues/1977 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/539c910eaba3eeb0f743f8f439ada0894c3cad493ff4d83bb17948444bacba71/pythonnet/pythonnet/issues/1977 |
| og:image:alt | Environment Pythonnet version: 3.0.0.post1 Python version: 3.8.10 Operating System: Windows 11 .NET Runtime: .NET Framework 472 Details Describe what you were trying to get done. I am getting rando... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rohanjain101 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01fa379f5de85ef8e791d09724e69709ce9eb9595278316e0a921312dc88e0bc |
| 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 | dda91974c069382b0dfa47b2da7e28bd061c8331 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width