Title: Python.exe crashes if __pycache__ directories exist (garbage collection trashed) · Issue #481 · pythonnet/pythonnet · GitHub
Open Graph Title: Python.exe crashes if __pycache__ directories exist (garbage collection trashed) · Issue #481 · pythonnet/pythonnet
X Title: Python.exe crashes if __pycache__ directories exist (garbage collection trashed) · Issue #481 · pythonnet/pythonnet
Description: Environment Pythonnet version: 2.3.0 Python version: 3.5 64-bit Operating System: Windows 7 Pro 64-bit SP1 Details Describe what you were trying to get done. I am trying to import .NET assemblies and use them together. Unfortunately, pyt...
Open Graph Description: Environment Pythonnet version: 2.3.0 Python version: 3.5 64-bit Operating System: Windows 7 Pro 64-bit SP1 Details Describe what you were trying to get done. I am trying to import .NET assemblies a...
X Description: Environment Pythonnet version: 2.3.0 Python version: 3.5 64-bit Operating System: Windows 7 Pro 64-bit SP1 Details Describe what you were trying to get done. I am trying to import .NET assemblies a...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/481
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python.exe crashes if __pycache__ directories exist (garbage collection trashed)","articleBody":"### Environment\r\n\r\n- Pythonnet version: 2.3.0\r\n- Python version: 3.5 64-bit\r\n- Operating System: Windows 7 Pro 64-bit SP1\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\nI am trying to import .NET assemblies and use them together. Unfortunately, python interpreter always crashes if .py files are already precompiled and lay inside __pycache__ directories. I tried breifly python 3.6 and newer pythonnet, but it still crashes. However it doesn't crash with old python 2.7.13 64-bit (need to recompile pythonnet for 2.7).\r\n\r\nI used Debugger and see that python garbage collection is trashed. Mostly object-\u003etp_is_gc field is invalid not showing to real function.\r\n\r\nDeleteing __pycache__ directories allow test.py to run once.\r\n\r\nPlease, help in identify the issue and in making the fix.\r\n\r\n- What commands did you run to trigger this issue? \r\n\r\n[pythonGCCrash.zip](https://github.com/pythonnet/pythonnet/files/1041604/pythonGCCrash.zip)\r\n1. Unpack zip, open Visual Studio 2015 Update 3 Command Prompt in this directory\r\n2. Need to compile pythonnet for python 3.5 64-bit windows. Copy clr.pyd and Python.Runtime.dll to the directory of run.bat\r\n3. start run.bat\r\n4. python.exe crashes after printing \"0\"\r\n\r\n- If there was a crash, please include the traceback here.\r\nThe crash happens mostly inside visit_decref() function in PyObject_IS_GC(op) macro. It shows either \"op\" is 0 or \"op-\u003etp_is_gc\" has a wrong address.\r\n","author":{"url":"https://github.com/testrunner123","@type":"Person","name":"testrunner123"},"datePublished":"2017-05-31T13:25:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/481/pythonnet/issues/481"}
| 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:53db5bbc-7e7f-d70e-2e1b-b385f4e371ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACEE:83DE7:738663B:94F1BC0:6975ABC8 |
| html-safe-nonce | f03d92ba856f2023db01d12c1f173df625797e9b82bba225067a055f2d40f811 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0VFOjgzREU3OjczODY2M0I6OTRGMUJDMDo2OTc1QUJDOCIsInZpc2l0b3JfaWQiOiI1MTQzMzIzNTE4ODQxNDk4NTY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ce4b8a6ff59e5ddd44133a463074e438198ffd1f4731e17a34bf3e4cdbf4ee80 |
| hovercard-subject-tag | issue:232564856 |
| 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/481/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eb31c5a931cc566848184e96af9deb6736600388bbe9175445e9f0d28b967033/pythonnet/pythonnet/issues/481 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eb31c5a931cc566848184e96af9deb6736600388bbe9175445e9f0d28b967033/pythonnet/pythonnet/issues/481 |
| og:image:alt | Environment Pythonnet version: 2.3.0 Python version: 3.5 64-bit Operating System: Windows 7 Pro 64-bit SP1 Details Describe what you were trying to get done. I am trying to import .NET assemblies a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | testrunner123 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width