Title: SVG serializer aborts with Standard_NoSuchObject in a fully static build · Issue #9398 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: SVG serializer aborts with Standard_NoSuchObject in a fully static build · Issue #9398 · IfcOpenShell/IfcOpenShell
X Title: SVG serializer aborts with Standard_NoSuchObject in a fully static build · Issue #9398 · IfcOpenShell/IfcOpenShell
Description: Summary A build produced by the documented Docker developer workflow (docker/README.md -> ./ifcos_env build) yields an IfcConvert whose SVG serializer aborts on almost every element: Creating geometry... terminate called after throwing a...
Open Graph Description: Summary A build produced by the documented Docker developer workflow (docker/README.md -> ./ifcos_env build) yields an IfcConvert whose SVG serializer aborts on almost every element: Creating geome...
X Description: Summary A build produced by the documented Docker developer workflow (docker/README.md -> ./ifcos_env build) yields an IfcConvert whose SVG serializer aborts on almost every element: Creating ge...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9398
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SVG serializer aborts with Standard_NoSuchObject in a fully static build","articleBody":"### Summary\n\nA build produced by the documented Docker developer workflow (`docker/README.md` -> `./ifcos_env build`) yields an `IfcConvert` whose SVG serializer aborts on almost every element:\n\n```\nCreating geometry...\nterminate called after throwing an instance of 'Standard_NoSuchObject'\n```\n\nIt reproduces on any model with solids, including `test/input` files and the Duplex sample, so it is not model specific. OBJ and GLB output from the same binary are fine, which makes it look like an SVG bug rather than a build problem.\n\n### Cause\n\n`nix/build-all.py` defaults to static IfcOpenShell libraries and static OCCT. Each serializer plugin therefore statically links its **own** copy of OCCT, compiled `-fvisibility=hidden` so the copies are not interposable. Shapes created inside `ifcopenshell_geometry_kernel_opencascade.so` then fail handle downcasts against the SVG plugin's separate OCCT instance: `BRep_Tool::Surface` returns a surface that is not loaded, and the deep-copying transform in `svg_serializer::write` throws.\n\nBacktrace, from a build with debug info added to the SVG plugin:\n\n```\nStandard_NoSuchObject\n GeomAdaptor_Surface::UContinuity\n Approx_CurveOnSurface::Perform\n ProjLib_ProjectedCurve::Perform\n BRep_Tool::CurveOnPlane\n BRep_Tool::CurveOnSurface\n BRepTools_TrsfModification::NewCurve2d\n BRepTools_Modifier::Rebuild\n BRepTools_Modifier::Perform\n BRepBuilderAPI_ModifyShape::DoModif\n BRepBuilderAPI_Transform::Perform\n BRepBuilderAPI_Transform::BRepBuilderAPI_Transform \u003c- svg_serializer.cpp, BRepBuilderAPI_Transform(..., true)\n```\n\nThe exception is not caught, so one bad element ends the whole conversion.\n\nThis also explains a secondary symptom: the duplicated IfcOpenShell libraries give each plugin its own `Logger` singleton, so messages logged from inside a serializer never reach `IfcConvert`'s output.\n\n### Why OBJ and GLB are unaffected\n\nThey consume triangulated output rather than `TopoDS_Shape`, so they never cross the OCCT instance boundary. Converting the same model to `.obj` succeeding while `.svg` aborts is a reliable way to recognise this.\n\n### How to check a build\n\n```\nreadelf -d \u003cinstall>/lib64/ifcopenshell_geometry_svg.so | grep -c \"NEEDED.*libTK\"\n```\n\n`0` means the plugin carries its own static OCCT and will exhibit this. A correct build reports 48. Size is the same tell: the plugin is around 41 MB when broken and around 0.5 MB when linked against shared OCCT.\n\n### Fix\n\nBuild with `--ifcopenshell-shared`, which is what CI already does:\n\n- `.github/workflows/build_rocky.yml` -> `build-all.py -v --diskcleanup --ifcopenshell-shared`\n- `.github/workflows/build_osx.yml` -> same\n\nbut `docker/ifcos_env` does not:\n\n```\nuv run ./nix/build-all.py -v ${PY_TGT:+-$PY_TGT} --diskcleanup ${BUILD_TARGET}\n```\n\nSo the configuration CI builds and ships is not the configuration the documented developer workflow produces, and the difference is not visible until a BRep-consuming serializer is used. Anyone following `docker/README.md` and then testing SVG output hits this.\n\nI have opened a one line PR against `docker/ifcos_env` to align it with CI. If the intent is instead that a fully static build should work, then this is a genuine defect in that configuration rather than a documentation gap, and the PR can be closed in favour of fixing the static case.\n\n### Environment\n\nIfcOpenShell 0.9.0alpha0, OCCT 7.8.1, Rocky Linux 9 container, linux/amd64, gcc, `BUILD_CFG=Release`.\n\n---\n\nThis report was produced with the assistance of an AI coding tool.\n","author":{"url":"https://github.com/P4A-KLFSBK","@type":"Person","name":"P4A-KLFSBK"},"datePublished":"2026-08-30T19:11:04Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9398"}
| 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:ca37911d-bc18-a31e-5b0c-3f17a749820a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4DE:3C90A4:65467F:8E51BD:6B04781B |
| html-safe-nonce | 1addab0b683ecf6e513ca11e253010a17f6114184815746af23a737b25eba1b1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNERFOjNDOTBBNDo2NTQ2N0Y6OEU1MUJEOjZCMDQ3ODFCIiwidmlzaXRvcl9pZCI6IjYzNTI2NzEwMjcxODMyNjgxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fc0c62fb69d99824a83b89327ff055060946b35a232141f6e8da86bcab4586b8 |
| hovercard-subject-tag | issue:5293873550 |
| 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/9398/issue_layout |
| twitter:image | https://opengraph.githubassets.com/73e4774e6b9cad0fdabb2b20d0dbb9ae40522285daf4a6031fc1bb1ff3431657/IfcOpenShell/IfcOpenShell/issues/9398 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/73e4774e6b9cad0fdabb2b20d0dbb9ae40522285daf4a6031fc1bb1ff3431657/IfcOpenShell/IfcOpenShell/issues/9398 |
| og:image:alt | Summary A build produced by the documented Docker developer workflow (docker/README.md -> ./ifcos_env build) yields an IfcConvert whose SVG serializer aborts on almost every element: Creating geome... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | P4A-KLFSBK |
| 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