Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: crash importing again same module #5080

Open
3 tasks done
yobiminds opened this issue Mar 29, 2024 · 0 comments
Open
3 tasks done

[BUG]: crash importing again same module #5080

yobiminds opened this issue Mar 29, 2024 · 0 comments
Labels
triage New bug, unverified

Comments

@yobiminds
Copy link

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

1.12.0

Problem description

Restarting an embedded interpreter gives crash when importing a module the second time.

A breakpoint instruction (__debugbreak() statement or a similar call) was executed in test.exe.

Some modules, like 'sys' or 'os', work fine.

Reproducible example code

int main() {

    py::initialize_interpreter();
    py::module_::import("numpy");  //--> it works fine with modules like 'sys', 'os'. 
    py::finalize_interpreter();

    py::initialize_interpreter();
    py::module_::import("numpy"); //--> crash here
    py::finalize_interpreter();
    return 0;
}

Is this a regression? Put the last known working version here if it is.

Not aware if this is a regression

@yobiminds yobiminds added the triage New bug, unverified label Mar 29, 2024
@yobiminds yobiminds changed the title [BUG]: [BUG]: crash importing again same module Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New bug, unverified
Projects
None yet
Development

No branches or pull requests

1 participant