Skip to content

Stubgen generation with Debug Python fails with Assertion #1079

@KerstinKeller

Description

@KerstinKeller

I am using the stubgen.py provided by nanobind to generate pyi files for my nanobind extension module.
However, for the debug build, which I link agains the debug version of Python, the stubgen generation fails with an assertion:

[build]   1>Generating nanobind_core.pyi
[build]   D:\a\2\s\Objects\typeobject.c:7008: type_ready_pre_checks: Assertion "type->tp_call != ((void *)0)" failed
[build]   Enable tracemalloc to get the memory block allocation traceback
[build]   
[build]   object address  : 00000227A7927920
[build]   object refcount : 1
[build]   object type     : 00000227A79B32E0
[build]   object type name: nanobind.nb_meta
[build]   object repr     : Das Sprungziel - VCEnd wurde nicht gefunden.

Assertion that fails:
typeobject.c

Command that triggers the problem from the command line:

python_d D:\SourceCode\github\ecal\thirdparty\nanobind\nanobind\src\stubgen.py -M py.marker -m nanobind_core -o nanobind_core_d.pyi

Nanobind version 2.7.0
Python version 3.12.7
OS Windows

Running stubgen with the Release Python on the Release extension works just fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions