Title: IfcOpenShell Python segfaults when accessing context HasSubContexts after removal · Issue #1224 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: IfcOpenShell Python segfaults when accessing context HasSubContexts after removal · Issue #1224 · IfcOpenShell/IfcOpenShell
X Title: IfcOpenShell Python segfaults when accessing context HasSubContexts after removal · Issue #1224 · IfcOpenShell/IfcOpenShell
Description: I don't really understand this, but I get a crash. Example code: import ifcopenshell f = ifcopenshell.file() c = f.createIfcGeometricRepresentationContext() print("1", c.HasSubContexts) sc = f.create_entity("IfcGeometricRepresentationSub...
Open Graph Description: I don't really understand this, but I get a crash. Example code: import ifcopenshell f = ifcopenshell.file() c = f.createIfcGeometricRepresentationContext() print("1", c.HasSubContexts) sc = f.crea...
X Description: I don't really understand this, but I get a crash. Example code: import ifcopenshell f = ifcopenshell.file() c = f.createIfcGeometricRepresentationContext() print("1", c.HasSubContext...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/1224
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IfcOpenShell Python segfaults when accessing context HasSubContexts after removal","articleBody":"I don't really understand this, but I get a crash. Example code:\r\n\r\n```\r\nimport ifcopenshell\r\nf = ifcopenshell.file()\r\nc = f.createIfcGeometricRepresentationContext()\r\nprint(\"1\", c.HasSubContexts)\r\nsc = f.create_entity(\"IfcGeometricRepresentationSubContext\", **{\"ParentContext\": c})\r\nprint(\"2\", c.HasSubContexts)\r\nsc2 = f.create_entity(\"IfcGeometricRepresentationSubContext\", **{\"ParentContext\": c})\r\nprint(\"3\", c.HasSubContexts) # If I comment this line out, no segfault\r\nf.remove(sc)\r\nf.remove(sc2)\r\nprint(\"4\", c.HasSubContexts)\r\n```\r\n\r\nThis results in:\r\n\r\n```\r\n1 ()\r\n2 (#2=IfcGeometricRepresentationSubContext($,$,*,*,*,*,#1,$,$,$),)\r\n3 (#2=IfcGeometricRepresentationSubContext($,$,*,*,*,*,#1,$,$,$), #3=IfcGeometricRepresentationSubContext($,$,*,*,*,*,#1,$,$,$))\r\n[1] 4518 segmentation fault python test.py\r\n```\r\n\r\nIf I comment out `print(\"3\", c.HasSubContexts)`, no segfault occurs:\r\n\r\n```\r\n1 ()\r\n2 (#2=IfcGeometricRepresentationSubContext($,$,*,*,*,*,#1,$,$,$),)\r\n4 ()\r\n```","author":{"url":"https://github.com/Moult","@type":"Person","name":"Moult"},"datePublished":"2021-01-03T00:43:16Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/1224"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:8be53f54-64a0-777f-e7e6-26bcb5863845 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2FE:91084:50844D:6E4387:6B047266 |
| html-safe-nonce | b0147d1cd63d03e98dd581f3ec8e756e880523d17331e030a88666193fc66deb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkZFOjkxMDg0OjUwODQ0RDo2RTQzODc6NkIwNDcyNjYiLCJ2aXNpdG9yX2lkIjoiMzgyMzk1OTMxNDE0MjYyMjMxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 97967b59f7961ab9ca24a0c22bcda678e6bb15b7de2e1d9c89ee75a58222231e |
| hovercard-subject-tag | issue:777549834 |
| 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/IfcOpenShell/IfcOpenShell/1224/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a59411f246840b96bbcac4df9e70432b0a909f6350d82d2f366328df5a3b4f1d/IfcOpenShell/IfcOpenShell/issues/1224 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a59411f246840b96bbcac4df9e70432b0a909f6350d82d2f366328df5a3b4f1d/IfcOpenShell/IfcOpenShell/issues/1224 |
| og:image:alt | I don't really understand this, but I get a crash. Example code: import ifcopenshell f = ifcopenshell.file() c = f.createIfcGeometricRepresentationContext() print("1", c.HasSubContexts) sc = f.crea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Moult |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| 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 | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width