Skip to content

Segmentation fault on pytest exit when creating a SerializableObjectWithMetadata #1474

@ssteinbach

Description

@ssteinbach

A user reported that there is a segmentation fault when running pytest + objects with metadata + the "fs" (fake filesystem) capture system.

Repro:

import opentimelineio as otio

# Does not segfault if you comment out this "test"
def test_empty_fs(fs):
    pass


def test_create_clip(capsys):
    # can be child classes of SerializableObjectWithMetadata (Clip, Gap, etc),
    # however other otio C++ classes appear to be ok (RationalTime, TimeRange,
    # TimeTransform)
    otio.core.SerializableObjectWithMetadata(
        # also does not segfault if you comment this out
        metadata={}
    )

Output:

❯ pytest otio_pytest_seg_fault.py --disable-warnings
============================================== test session starts ===============================================
platform darwin -- Python 3.8.13, pytest-7.2.0, pluggy-1.0.0
rootdir: /private/var/tmp
plugins: pyfakefs-5.0.0
collected 2 items

otio_pytest_seg_fault.py ..                                                                                [100%]

========================================== 2 passed, 1 warning in 0.09s ==========================================
zsh: segmentation fault  pytest otio_pytest_seg_fault.py --disable-warnings

(The warning is related to our use of imp and appears to be a red herring)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem, flaw, or broken functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions