Title: `IfcConvert` fails (exit 1, "Type held ... is Blank and not string") when an `IfcElementQuantity` has a blank `GlobalId` · Issue #9600 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: `IfcConvert` fails (exit 1, "Type held ... is Blank and not string") when an `IfcElementQuantity` has a blank `GlobalId` · Issue #9600 · IfcOpenShell/IfcOpenShell
X Title: `IfcConvert` fails (exit 1, "Type held ... is Blank and not string") when an `IfcElementQuantity` has a blank `GlobalId` · Issue #9600 · IfcOpenShell/IfcOpenShell
Description: Bug Description IfcConvert fails while writing JSON metadata output (--plan/--model) when the model contains an IfcElementQuantity whose GlobalId is blank ($) rather than a valid IfcGloballyUniqueId string. GlobalId is mandatory for ever...
Open Graph Description: Bug Description IfcConvert fails while writing JSON metadata output (--plan/--model) when the model contains an IfcElementQuantity whose GlobalId is blank ($) rather than a valid IfcGloballyUniqueI...
X Description: Bug Description IfcConvert fails while writing JSON metadata output (--plan/--model) when the model contains an IfcElementQuantity whose GlobalId is blank ($) rather than a valid IfcGloballyUniqueI...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9600
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`IfcConvert` fails (exit 1, \"Type held ... is Blank and not string\") when an `IfcElementQuantity` has a blank `GlobalId`","articleBody":"### Bug Description\n\n`IfcConvert` fails while writing JSON metadata output (`--plan`/`--model`) when the model contains an `IfcElementQuantity` whose `GlobalId` is blank (`$`) rather than a valid `IfcGloballyUniqueId` string. `GlobalId` is mandatory for every `IfcRoot` subtype per the schema, but real-world exporters do write it blank for auto-generated/aggregated quantity sets. Rather than warning and continuing, `IfcConvert` exits with a caught but fatal exception:\n\n```\n[Error] Type held at index 0 is Blank and not std::__cxx11::basic_string\u003cchar, std::char_traits\u003cchar>, std::allocator\u003cchar>>\n```\n\nIndex 0 is `GlobalId`, the first attribute of any `IfcRoot` instance — this is consistent with something reading it and assuming it's always a populated string.\n\nThis may be related to the general pattern already identified in #9583 (a `Blank`-not-handled defensively gap in this same area of the JSON writer), though the specific trigger here is different (`GlobalId` on `IfcElementQuantity`, not `Name` on a property set).\n\n### Impact\n\nFound while investigating a customer-reported issue with IFC models not displaying. The source file had several `IfcElementQuantity`/`IfcRelDefinesByProperties` instances with a blank `GlobalId`, apparently for auto-generated/rolled-up quantity sets (`Name: '\u003cUnbekannt>'`, i.e. \"unknown\" — likely the exporting tool's own placeholder). A blank `GlobalId` on the relationship alone is tolerated (logged, not fatal); on the `IfcElementQuantity` itself it's fatal.\n\n### Steps to reproduce\n\n```\nIfcConvert --model blank_globalid_repro.ifc out.json\n```\n\nReproduced on:\n- `IfcConvert 0.8.4-158fe92` (build from `ifcopenshell-builds` S3 bucket)\n- `IfcConvert 0.8.5-1c5b825` (latest official release, `ifcconvert-0.8.5` tag)\n\n### Minimal reproduction file\n\nAttached: `blank_globalid_repro.ifc` (~1.5 KB). Contains just:\n- `IfcProject` → `IfcSite` → `IfcBuilding` → `IfcBuildingStorey`\n- One `IfcWall`, contained in the storey\n- One `IfcElementQuantity` with `GlobalId = $` (blank), containing one `IfcQuantityArea`, assigned to the wall via `IfcRelDefinesByProperties`\n\n### Attachments\n\n[blank_globalid_repro.txt](https://github.com/user-attachments/files/32652248/blank_globalid_repro.txt)\n\n### Debug and Error Output\n\n```true\nIfcConvert --model blank_globalid_repro.ifc out.json\n\n\nOutput:\n\nIfcOpenShell IfcConvert 0.8.5-1c5b825 (OCC 7.8.1)\nScanning file...\nDone scanning file\nDone resolving references\nParsing input file took 0 seconds\nWriting JSON output...\n[Error] Type held at index 0 is Blank and not std::__cxx11::basic_string\u003c...>\n\nExit code 1 (not a segfault — a caught exception).\n\nEnvironment: Ubuntu 24.04, linux/amd64\n```","author":{"url":"https://github.com/joao-pinto-capmo","@type":"Person","name":"joao-pinto-capmo"},"datePublished":"2026-09-25T12:26:44Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9600"}
| 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:4b3e07b4-4289-dc81-0c79-38a336969e68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2BE:81334:324A14:46549C:6B047752 |
| html-safe-nonce | 324fbb84f96522b06b17079cd90d98eb3256f6cc0e82b3da52b43fb63a4276b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkJFOjgxMzM0OjMyNEExNDo0NjU0OUM6NkIwNDc3NTIiLCJ2aXNpdG9yX2lkIjoiNTc5NzU4NjE2NDkyNDA1MzMzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 57b1064ad20e4eb4fc19df09c5dac7536447ee4f6fc6c8cbdf6b9b6764c3b0fa |
| hovercard-subject-tag | issue:5582759876 |
| 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/9600/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c8052c8b343b2e4666f5c542fe87897b503294d7cc50c1cf640766fd45caaa3c/IfcOpenShell/IfcOpenShell/issues/9600 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c8052c8b343b2e4666f5c542fe87897b503294d7cc50c1cf640766fd45caaa3c/IfcOpenShell/IfcOpenShell/issues/9600 |
| og:image:alt | Bug Description IfcConvert fails while writing JSON metadata output (--plan/--model) when the model contains an IfcElementQuantity whose GlobalId is blank ($) rather than a valid IfcGloballyUniqueI... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joao-pinto-capmo |
| 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