Skip to content

MemoryError when calling report_prefix, reset_last_report and reset_start_time #447

@Joseph-Edwards

Description

@Joseph-Edwards

The runner has the following member functions (among others): report_prefix, reset_last_report and reset_start_time. When calling any of these functions on an instance of a derived class (I've checked with ToddCoxeter and KnuthBendix), you are met with:

File ~/miniforge3/envs/libsemigroups_pybind11_live/lib/python3.14/site-packages/libsemigroups_pybind11/detail/cxx_wrapper.py:169, in wrap_cxx_mem_fn.<locals>.cxx_mem_fn_wrapper(self, *args)
    167 if len(args) == 1 and isinstance(args[0], list):
    168     args = [[to_cxx(x) for x in args[0]]]
--> 169 result = getattr(to_cxx(self), cxx_mem_fn.__name__)(*(to_cxx(x) for x in args))
    170 if result is to_cxx(self):
    171     return self

MemoryError: std::bad_alloc

Additionally, when trying to set the report prefix with thing.report_prefix("foo"), Python segfaults. The same is not true when these functions are called on Runner instances, so I assume this has something to do with a bad conversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    IIFbugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions