Title: Crash in `ClassDerivedObject.tp_dealloc` when object is collected by cycle collector · Issue #1565 · pythonnet/pythonnet · GitHub
Open Graph Title: Crash in `ClassDerivedObject.tp_dealloc` when object is collected by cycle collector · Issue #1565 · pythonnet/pythonnet
X Title: Crash in `ClassDerivedObject.tp_dealloc` when object is collected by cycle collector · Issue #1565 · pythonnet/pythonnet
Description: Pythonnet version: 3.0.0.dev1 Repro: from Python.Test import BaseClass class Derived(BaseClass): __namespace__ = 'Test' inst = Derived() cycle = [inst] del inst cycle.append(cycle) del cycle import gc gc.collect() # crash here: in ClassD...
Open Graph Description: Pythonnet version: 3.0.0.dev1 Repro: from Python.Test import BaseClass class Derived(BaseClass): __namespace__ = 'Test' inst = Derived() cycle = [inst] del inst cycle.append(cycle) del cycle import...
X Description: Pythonnet version: 3.0.0.dev1 Repro: from Python.Test import BaseClass class Derived(BaseClass): __namespace__ = 'Test' inst = Derived() cycle = [inst] del inst cycle.append(cycle) del cycl...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1565
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash in `ClassDerivedObject.tp_dealloc` when object is collected by cycle collector","articleBody":"Pythonnet version: 3.0.0.dev1\r\nRepro:\r\n```python\r\nfrom Python.Test import BaseClass\r\n\r\nclass Derived(BaseClass):\r\n __namespace__ = 'Test'\r\n\r\ninst = Derived()\r\ncycle = [inst]\r\ndel inst\r\ncycle.append(cycle)\r\ndel cycle\r\n\r\nimport gc\r\ngc.collect() # crash here: in ClassDerivedObject.tp_dealloc because ClassBase.tp_clear nulled tpHandle\r\n```\r\n","author":{"url":"https://github.com/lostmsu","@type":"Person","name":"lostmsu"},"datePublished":"2021-09-23T02:12:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1565/pythonnet/issues/1565"}
| 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:f08e016a-06e9-2aa8-2c0c-55168aae058b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95E8:3F65C8:2E4128:3E2083:69715316 |
| html-safe-nonce | 1644b293f89240d16059da780fe94f1ca829dfc0883c02bb5ff4778d4ef0db9b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUU4OjNGNjVDODoyRTQxMjg6M0UyMDgzOjY5NzE1MzE2IiwidmlzaXRvcl9pZCI6IjU4Mzc5OTk5MzAyNTIyODQ2OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 022ff23fdc65595f97143bd624c15e264c9d92a5f66d6e3952aee0db7881ef9a |
| hovercard-subject-tag | issue:1004940343 |
| 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/1565/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d51e9bcc3975c1671913e5cf60c3a6c364ede246a03e51c821af74865b776473/pythonnet/pythonnet/issues/1565 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d51e9bcc3975c1671913e5cf60c3a6c364ede246a03e51c821af74865b776473/pythonnet/pythonnet/issues/1565 |
| og:image:alt | Pythonnet version: 3.0.0.dev1 Repro: from Python.Test import BaseClass class Derived(BaseClass): __namespace__ = 'Test' inst = Derived() cycle = [inst] del inst cycle.append(cycle) del cycle import... |
| 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 | fd5876ec68f4a61d42f4010f6d1b2764d8ae314777de44028a7708a1d7bac1b5 |
| 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 | 8f48ed2345879fb640360c3a24f1d1780c3ed3cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width