New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IfcConvert segfault with SVG output #2156
Comments
So the segfault is in Frame 0: Within the block specific to ELEMENT_HIERARCHY which is indeed specific to SVG https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcconvert/IfcConvert.cpp#L815 I wouldn't be convinced that it's due to your build system. It might be something specific to the files you feed it. Or perhaps a compiler version tripping over some undefined behaviour. |
Thanks, I thought that I was seeing segfaults with other files, but actually IfcConvert is producing SVG files with and <style> sections but no other data. Is there one of the IFC files in the 0.7.0 sources that consistently produces SVG output that I can test with? Attached is the IFC file from the stack trace above |
The command line for SVG is also a bit magical perhaps, how do you precisely invoke IfcConvert? |
|
On Duplex.ifc [0] I get good results.
[0] https://portal.nibs.org/files/wl/?id=O9inoVWDytV4P3UTS7iIdqhVKcTyVlcs |
Ok, the issue was the aggregated wall
The ELEMENT_HIERARCHY setting broke on the empty placement. The convention is that children of {aggregation, containment, voiding, filling, ...} have their object placement set relative to their host element. It's a bit of a bug that we don't use a property Should be fixed now in this particular case. |
My generated IFC file with the same parameters segfaults:
|
Thanks, building now... will close when I confirm the fix I had trouble using the API to set positions of aggregated objects, so I ended-up setting an absolute position, I'll investigate |
@brunopostle what issues did you have? The API for edit_object_placement should auto handle relative placements: https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/geometry/edit_object_placement.py#L77-L97 |
@Moult I was creating an aggregate and assigning elements, but couldn't understand why |
@brunopostle cheers, note that there is a |
@Moult thanks, I can see I need to make a few changes. Closing this bug, IfcConvert SVG output is working again after a rebuild: |
At some point in the last few months my builds of IfcConvert started segfaulting when outputting SVG. Other output formats seem to be ok . Obviously this is a problem with my build environment, but I can't figure it out and need suggestions for somewhere to look next. Note that all my builds start with a clean git source tree.
The segfault happens almost immediately:
The stack trace doesn't show much:
These are the dependencies I am using to build, all standard fedora packages:
Build flags are:
The text was updated successfully, but these errors were encountered: