Title: Segfault on empty IFC file · Issue #238 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Segfault on empty IFC file · Issue #238 · IfcOpenShell/IfcOpenShell
X Title: Segfault on empty IFC file · Issue #238 · IfcOpenShell/IfcOpenShell
Description: I just spent a couple of hours trying to debugging this issue before I found out I had accidentally truncated my IFC file to length 0. I think Init is supposed to return false if the IFC file is invalid. 0x0000555555994b7e in IfcParse::I...
Open Graph Description: I just spent a couple of hours trying to debugging this issue before I found out I had accidentally truncated my IFC file to length 0. I think Init is supposed to return false if the IFC file is in...
X Description: I just spent a couple of hours trying to debugging this issue before I found out I had accidentally truncated my IFC file to length 0. I think Init is supposed to return false if the IFC file is in...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/238
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Segfault on empty IFC file","articleBody":"I just spent a couple of hours trying to debugging this issue before I found out I had accidentally truncated my IFC file to length 0.\r\n\r\nI think Init is supposed to return false if the IFC file is invalid.\r\n\r\n```\r\n0x0000555555994b7e in IfcParse::IfcFile::load (this=0x0, data=...) at /home/janus/IfcOpenShell/src/ifcparse/IfcParse.cpp:897\r\n897\t\tif (tokens->stream->Tell() != data.offset_in_file()) {\r\n(gdb) up\r\n#1 0x00005555559954de in IfcEntityInstanceData::load_ (this=0x7fffe8000a80) at /home/janus/IfcOpenShell/src/ifcparse/IfcParse.cpp:983\r\n983\t\tfile->load(*this);\r\n(gdb) \r\n#2 0x00005555559955e0 in IfcEntityInstanceData::getArgument (this=0x7fffe8000a80, i=0) at /home/janus/IfcOpenShell/src/ifcparse/IfcParse.cpp:1001\r\n1001\t\t\tload_();\r\n(gdb) \r\n#3 0x000055555599c868 in IfcParse::FileSchema::schema_identifiers[abi:cxx11]() const (this=0x7fffe8000a80) at /home/janus/IfcOpenShell/src/ifcparse/../ifcparse/../ifcparse/IfcSpfHeader.h:105\r\n105\t\tstd::vector\u003cstd::string> schema_identifiers() const { return *getArgument(0); }\r\n(gdb) \r\n#4 0x0000555555996791 in IfcParse::IfcFile::Init (this=0x7fffe80008c0, s=0x7fffe8000af0) at /home/janus/IfcOpenShell/src/ifcparse/IfcParse.cpp:1155\r\n1155\t\t\tschemas = _header.file_schema().schema_identifiers();\r\n(gdb) \r\n#5 0x0000555555996592 in IfcParse::IfcFile::Init (this=0x7fffe80008c0, fn=\"tifc\") at /home/janus/IfcOpenShell/src/ifcparse/IfcParse.cpp:1128\r\n1128\t\treturn IfcFile::Init(new IfcSpfStream(fn));\r\n(gdb) \r\n#6 0x00005555555c5043 in \u003clambda()>::operator() (__closure=0x555555fda198) at FLTK/design.cxx:775\r\n775\t if (!ctxp->file->Init(filename)) {\r\n```","author":{"url":"https://github.com/ysangkok","@type":"Person","name":"ysangkok"},"datePublished":"2017-07-07T12:16:05Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/238"}
| 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:aab1919f-36c2-9fa6-7c29-9488443d7c5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2B2:163142:87012C:BD4BB3:6B048444 |
| html-safe-nonce | 1ad305f25e6bd2713175d0f1f084c8c4f26677214fa44fa2b5d3c3430bdd33cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkIyOjE2MzE0Mjo4NzAxMkM6QkQ0QkIzOjZCMDQ4NDQ0IiwidmlzaXRvcl9pZCI6IjQ4NTE3NzIwNDYzNjkzOTE2ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e38c7c1f5818dbff5e8be540702e9f7e005b8c99ae9a11daa5b1877f699a3609 |
| hovercard-subject-tag | issue:241246487 |
| 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/238/issue_layout |
| twitter:image | https://opengraph.githubassets.com/27d679459b1c831a8f2ce8d1f3e13f373193a8c9c9d4b7d6c1bd1ec541c3fe2d/IfcOpenShell/IfcOpenShell/issues/238 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27d679459b1c831a8f2ce8d1f3e13f373193a8c9c9d4b7d6c1bd1ec541c3fe2d/IfcOpenShell/IfcOpenShell/issues/238 |
| og:image:alt | I just spent a couple of hours trying to debugging this issue before I found out I had accidentally truncated my IFC file to length 0. I think Init is supposed to return false if the IFC file is in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ysangkok |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d5c152376e38b7d2e37f3d5179be29a73bee93b85110da28a4eebe1159cdc70 |
| 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 | f5017e8ff4ea25a8011fcf0f2a0e430c60dc86c8 |
| 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