Skip to content

using remove_pset causes a segmentation fault #7455

@nlosacco

Description

@nlosacco

Bug Description

Hi,
I am trying to remove a pset with ifc.openshell.api.pset.remove_pset, when I do the python interpreter/kernel crashes, I guess as a consequence of a segmentation fault, possibly due to a dangling pointer issue.

Here are the minimal steps to reproduce the issue, from https://docs.ifcopenshell.org/autoapi/ifcopenshell/api/pset/remove_pset/index.html#module-ifcopenshell.api.pset.remove_pset

import ifcopenshell
import ifcopenshell.api.root
import ifcopenshell.api.pset

model = ifcopenshell.file()

#--- the following snippet is taken from the documentation

wall_type = ifcopenshell.api.root.create_entity(model, ifc_class="IfcWallType")
pset = ifcopenshell.api.pset.add_pset(model, product=wall_type, name="Pset_WallCommon")

ifcopenshell.api.pset.remove_pset(model, product=wall_type, pset=pset)

I am using conda installed ifcopenshell 0.8.4 from conda-forge.
I had the same problem with 0.8.5 alpha from the ifcopenshell channel.
Working on MacOS Sonoma on an M3 ARM cpu.

PS: by the way, it will be also useful to be able to have something like get_pset to retrieve an existing pset as an entity, rather than a dictionary

Attachments

No response

Debug and Error Output


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions