René's URL Explorer Experiment


Title: v0.8.0 - segfault initializing iterator with IfcRectangleProfileDef · Issue #4605 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: v0.8.0 - segfault initializing iterator with IfcRectangleProfileDef · Issue #4605 · IfcOpenShell/IfcOpenShell

X Title: v0.8.0 - segfault initializing iterator with IfcRectangleProfileDef · Issue #4605 · IfcOpenShell/IfcOpenShell

Description: Mentioned in #4565 by @piotr-smolira this file https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt fails to load in v0.8.0 due segfault during ifcopenshell.geom.iterator.initalize(). Ping @aothms I was try...

Open Graph Description: Mentioned in #4565 by @piotr-smolira this file https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt fails to load in v0.8.0 due segfault during ifcopenshell.geom.iter...

X Description: Mentioned in #4565 by @piotr-smolira this file https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt fails to load in v0.8.0 due segfault during ifcopenshell.geom.iter...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/4605

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"v0.8.0 - segfault initializing iterator with IfcRectangleProfileDef","articleBody":"Mentioned in #4565 by @piotr-smolira this file https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt fails to load in v0.8.0 due segfault during `ifcopenshell.geom.iterator.initalize()`. Ping @aothms \r\n\r\nI was trying to narrow it down and it seems it segfaults when representation is using IfcRectangleProfileDef.\r\n\r\nHere's example code that doesn't require the original file. It adds two elements - both use some extrusion for the repersentation, one is using IfcArbitraryClosedProfileDef and another using IfcRectangleProfileDef (second one segfaults).\r\n```python\r\nimport ifcopenshell\r\nimport ifcopenshell.geom\r\nimport multiprocessing\r\nimport ifcopenshell.util.representation\r\nimport ifcopenshell.api\r\nfrom ifcopenshell.util.shape_builder import ShapeBuilder, V\r\n\r\nifc_file = ifcopenshell.file(schema=\"IFC4x3_ADD1\")\r\nbuilder = ShapeBuilder(ifc_file)\r\nproject = ifcopenshell.api.run(\"root.create_entity\", ifc_file, ifc_class=\"IfcProject\", name=\"project\")\r\nmodel = ifcopenshell.api.run(\"context.add_context\", ifc_file, context_type=\"Model\")\r\ncontext = ifcopenshell.api.run(\r\n    \"context.add_context\",\r\n    ifc_file,\r\n    context_type=\"Model\",\r\n    context_identifier=\"Body\",\r\n    target_view=\"MODEL_VIEW\",\r\n    parent=model,\r\n)\r\nunit = ifcopenshell.api.run(\"unit.add_si_unit\", ifc_file, unit_type=\"LENGTHUNIT\", prefix=\"MILLI\")\r\nifcopenshell.api.run(\"unit.assign_unit\", ifc_file, units=[unit])\r\n\r\n\r\nproducts = []\r\n\r\n# arbitrary profile entity\r\narbitrary_profile_entity = ifcopenshell.api.run(\"root.create_entity\", ifc_file, ifc_class=\"IfcWall\")\r\nrectangle = builder.rectangle(size=V(1000.0, 1000.0))\r\nrep = builder.get_representation(context, [builder.extrude(rectangle, 1000.0)])\r\nifcopenshell.api.run(\"geometry.assign_representation\", ifc_file, product=arbitrary_profile_entity, representation=rep)\r\nproducts.append(arbitrary_profile_entity.id())\r\n\r\n# rectangle profile entity\r\nentity_rectangle_profile = ifcopenshell.api.run(\"root.create_entity\", ifc_file, ifc_class=\"IfcWall\")\r\nrectangle = ifc_file.create_entity(\r\n    \"IfcRectangleProfileDef\", ProfileName=\"New Profile\", ProfileType=\"AREA\", XDim=1000.0, YDim=1000.0\r\n)\r\nrep = builder.get_representation(context, [builder.extrude(rectangle, 1000.0)])\r\nifcopenshell.api.run(\"geometry.assign_representation\", ifc_file, product=entity_rectangle_profile, representation=rep)\r\nproducts.append(entity_rectangle_profile.id())\r\n\r\nfor i, product_id in enumerate(products, 1):\r\n    product = ifc_file.by_id(product_id)\r\n    print(f\"{i}/{len(products)}\", product)\r\n    settings = ifcopenshell.geom.settings()\r\n    settings.set(\"mesher-linear-deflection\", 0.001)\r\n    settings.set(\"mesher-angular-deflection\", 0.5)\r\n    # settings.set(settings.STRICT_TOLERANCE, True)\r\n    settings.set(\"dimensionality\", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)\r\n    settings.set(\"context-ids\", [context.id()])\r\n    iterator = ifcopenshell.geom.iterator(settings, ifc_file, multiprocessing.cpu_count(), include=[product])\r\n    valid_file = iterator.initialize()\r\n    print(\"never printed because in case of segfault\")\r\n```\r\n\r\nHere's another example using original file, there is a list failing elements in `skip` list and their types in `skipped_types`. Those elements cause a segfault, they all have a basic extrusion based representation that uses IfcRectangleProfileDef and replacing SweptArea with IfcArbitraryClosedProfileDef solves the issue.\r\n```python\r\nimport ifcopenshell\r\nimport ifcopenshell.geom\r\nimport multiprocessing\r\nimport ifcopenshell.util.representation\r\n\r\n# fmt: off\r\nproducts = [ 566499, 567016, 565898, 565524, 566369, 565240, 563367, 564529, 563488, 568931, 46429, 564650, 567969, 404964, 336304, 567907, 568741, 309393, 565026, 565092, 566298, 565158, 415231, 565948, 9585, 562988, 565413, 202056, 565479, 362948, 564077, 337384, 568646, 567473, 566227, 563630, 563412, 564574, 363216, 567737, 568221, 363143, 363242, 568586, 566440, 563865, 564226, 563931, 564292, 564358, 4949, 562967, 363189, 568161, 363017, 567615, 363171, 363250, 363193, 566884, 269350, 363228, 567544, 568343, 144590, 567269, 567447, 219014, 566813, 564443, 568464, 568836, 563043, 373444, 563109, 563175, 565600, 363113, 564143, 1369, 244580, 566727, 563696, 567198, 565347, 337463, 363205, 363238, 566641, 564735, 87088, 564801, 564867, 565690, 563322, 9600, 9688, 563509, 563564, 363130, 363185, 568111, 567138, 562912, 566966, 566570,\r\n]\r\n# fmt: on\r\n\r\npath = r\"LBD-ready-v.0.1.ifc\"\r\nskip = [9585, 562988, 568586, 568161, 564443, 1369, 9600, 563509, 567138, 562912]\r\nskipped_types = [364215, 364335, 364330, 364340]\r\nproducts = [p for p in products if p not in skip]\r\nifc_file = ifcopenshell.open(path)\r\ncontext = ifc_file.by_id(19)\r\nprint(context)\r\n\r\n\r\nfor i, product_id in enumerate(products, 1):\r\n    product = ifc_file.by_id(product_id)\r\n    print(f\"{i}/{len(products)}\", product)\r\n    settings = ifcopenshell.geom.settings()\r\n    settings.set(\"mesher-linear-deflection\", 0.001)\r\n    settings.set(\"mesher-angular-deflection\", 0.5)\r\n    # settings.set(settings.STRICT_TOLERANCE, True)\r\n    settings.set(\"dimensionality\", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)\r\n    settings.set(\"context-ids\", [context.id()])\r\n    iterator = ifcopenshell.geom.iterator(settings, ifc_file, multiprocessing.cpu_count(), include=[product])\r\n    valid_file = iterator.initialize()\r\n    print(\"never printed because in case of segfault\")\r\n```","author":{"url":"https://github.com/Andrej730","@type":"Person","name":"Andrej730"},"datePublished":"2024-05-03T07:46:22Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/4605"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:56dd03d8-e638-485a-eda0-0898841d8d76
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD1BA:C8FAB:77EAB6:A455ED:6B0479EA
html-safe-nonce5d88da0a4969bed13aeb188e4da7e80e367eb6be7535daa303fa4ec3cef130f1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUJBOkM4RkFCOjc3RUFCNjpBNDU1RUQ6NkIwNDc5RUEiLCJ2aXNpdG9yX2lkIjoiODc5ODA5ODE2ODE0MDI5ODczMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac76d8755418d4244a8e348e0da9a84596cb3cb91636df54a8b025eecca6f4d2e7
hovercard-subject-tagissue:2277125282
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/4605/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a46d9fd033df8ad874f42f100d7cda76b7dbae116d253cf119d94b4bde523520/IfcOpenShell/IfcOpenShell/issues/4605
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a46d9fd033df8ad874f42f100d7cda76b7dbae116d253cf119d94b4bde523520/IfcOpenShell/IfcOpenShell/issues/4605
og:image:altMentioned in #4565 by @piotr-smolira this file https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt fails to load in v0.8.0 due segfault during ifcopenshell.geom.iter...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndrej730
hostnamegithub.com
expected-hostnamegithub.com
None9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecf73f57448d52b3a7b619195e182b33d3b3454ca
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/4605#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F4605
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F4605
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/4605
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/4605
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/4605
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/4605
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/4605
v0.8.0 - segfault initializing iterator with IfcRectangleProfileDefhttps://github.com/IfcOpenShell/IfcOpenShell/issues/4605#top
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
https://github.com/Andrej730
Andrej730https://github.com/Andrej730
on May 3, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#issue-2277125282
#4565https://github.com/IfcOpenShell/IfcOpenShell/issues/4565
https://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txthttps://github.com/IfcOpenShell/IfcOpenShell/files/15160550/LBD-ready-v.0.1.ifc.txt
@aothmshttps://github.com/aothms
Andrej730https://github.com/Andrej730
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
on May 3, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#event-12693043898
aothmshttps://github.com/aothms
on May 6, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#event-12712695985
#4605 fix segfault in absence of profile placementhttps://github.com/IfcOpenShell/IfcOpenShell/commit/9de173dd3bad1707d6c273cc94dd34758addab44
#4605https://github.com/IfcOpenShell/IfcOpenShell/issues/4605
9de173dhttps://github.com/IfcOpenShell/IfcOpenShell/commit/9de173dd3bad1707d6c273cc94dd34758addab44
https://github.com/aothms
aothmshttps://github.com/aothms
on May 6, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#issuecomment-2095611545
@Andrej730https://github.com/Andrej730
https://github.com/Moult
Moulthttps://github.com/Moult
on May 6, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#issuecomment-2096012980
https://github.com/Andrej730
Andrej730https://github.com/Andrej730
on May 7, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#issuecomment-2098269800
Andrej730https://github.com/Andrej730
completedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 7, 2024https://github.com/IfcOpenShell/IfcOpenShell/issues/4605#event-12728646702
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/4605
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/4605
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.