Skip to content

BUG: Respect drop-order of Pylon RAII object #22

@hirschenberger

Description

@hirschenberger

I sometimes git segfaults or aborts on application shutdowns from the pylon lib.

It happens when I store the Pylon object and InstantCamera object in other structures.

I found out that this happens because when dropping the InstantCamera struct, it's fields are dropped in declaration order and as Pylon is the first field, it's dropped and PylonTerminate call happens before the ffi::CInstantCamera object's destructor is called which causes the segfault.

The solution would simply be to change the field-order in InstantCamera.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions