Title: Memory management bug in IfcOpenShell Python · Issue #1124 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Memory management bug in IfcOpenShell Python · Issue #1124 · IfcOpenShell/IfcOpenShell
X Title: Memory management bug in IfcOpenShell Python · Issue #1124 · IfcOpenShell/IfcOpenShell
Description: Hi folks, Thanks for your work on IfcOpenShell. I've been trying it out and have run into a strange bug which I can't figure out. For any IFC file I read, for every product within the file, the first two coordinates of the first vertex a...
Open Graph Description: Hi folks, Thanks for your work on IfcOpenShell. I've been trying it out and have run into a strange bug which I can't figure out. For any IFC file I read, for every product within the file, the fir...
X Description: Hi folks, Thanks for your work on IfcOpenShell. I've been trying it out and have run into a strange bug which I can't figure out. For any IFC file I read, for every product within the file,...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/1124
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Memory management bug in IfcOpenShell Python","articleBody":"Hi folks,\r\n\r\nThanks for your work on IfcOpenShell. I've been trying it out and have run into a strange bug which I can't figure out.\r\n\r\nFor any IFC file I read, for every product within the file, the first two coordinates of the first vertex are some extremely small number. I believe they should be zero. The first few values in the faces array are invalid, but slightly differently invalid depending on the build:\r\n\r\nWhen building from GitHub: The first and third values for the first triangle face are some extremely large (clearly invalid) integer, typically on the order of 10^7.\r\nWhen using the Conda build: The first and third values in the faces array are either extremely large positive integers (10^7) or extremely large negative integers (-10^9). The second and fourth values in the faces array are a large integer (10^4) and are equal to each other.\r\n\r\nThese values are non-deterministic and change each time the Python script runs.\r\n\r\nAny idea what's going on here?\r\n\r\nHappy to help debug if you can provide instructions.\r\n\r\n### Code to reproduce\r\n\r\n```python\r\nimport ifcopenshell\r\nimport ifcopenshell.geom\r\n\r\nifc_file = ifcopenshell.open(\"some_file.ifc\")\r\nwalls = ifc_file.by_type(\"IfcWall\") # Same problem if this is changed to IfcProducts\r\nfor wall in walls:\r\n shape = ifcopenshell.geom.create_shape(settings, wall).geometry\r\n verts = shape.verts\r\n faces = shape.faces \r\n print(verts) # (1.8579311e-316, 1.61328876e-316, 0.0, ... the rest is correct)\r\n print(faces) # (41427728, 0, 32653328, ... the rest is correct)\r\n```\r\n\r\n\r\n### Environment\r\nUbuntu 20.04\r\n\r\n- Conda env (fresh environment)\r\n - Python 3.7.8\r\n - oce v0.18.3 build 3\r\n - IfcOpenShell v0.6.0 build py37h0d10d40_3\r\n- System env\r\n - Python 3.8.5\r\n - required libs installed through `apt`\r\n - built IfcOpenShell from source using the latest v0.6.0 branch","author":{"url":"https://github.com/dtip","@type":"Person","name":"dtip"},"datePublished":"2020-11-24T08:53:27Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/1124"}
| 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:ef33a1b1-93b1-fb51-5da1-f2346d614c49 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAFA:D1D86:6B760E:92D642:6B0477AC |
| html-safe-nonce | d902730c7a02b31e19ac17efbe316956d829b248a8369d62aa6c6dca52027240 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUZBOkQxRDg2OjZCNzYwRTo5MkQ2NDI6NkIwNDc3QUMiLCJ2aXNpdG9yX2lkIjoiNzY0NDc3MzM4MzI4NDIyNTk2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f4818c1e7fb879fdf649ebda5099bb46989b6133562cc4c061a52edfcf5c233 |
| hovercard-subject-tag | issue:749508146 |
| 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/1124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/09477e56d5dd32648a5e9590b7d27eb033fb92772afa19b72573ebc151d2a8fb/IfcOpenShell/IfcOpenShell/issues/1124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/09477e56d5dd32648a5e9590b7d27eb033fb92772afa19b72573ebc151d2a8fb/IfcOpenShell/IfcOpenShell/issues/1124 |
| og:image:alt | Hi folks, Thanks for your work on IfcOpenShell. I've been trying it out and have run into a strange bug which I can't figure out. For any IFC file I read, for every product within the file, the fir... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dtip |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| 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 | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| 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