Opened 2 years ago

Last modified 2 years ago

#12168 new Bugs

Issue with shared_ptr on boost python

Reported by: praveenkumar076@… Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:



I have a struct A defined in C++ and exposed to python as shared_ptr. There are two global vectors of shared_ptrs of A. I create and add a object of type A from python to C++ in the two vectors Clear one vector Then when the python exits the program crashes with access violation error.

I have attached both C++ and python file to recreate this issue.

Thanks Praveen

Attachments (2)

TestShared.cpp (782 bytes) - added by Praveen <praveenkumar076@…> 2 years ago.
C++ File (89 bytes) - added by Praveen <praveenkumar076@…> 2 years ago.

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by Praveen <praveenkumar076@…>

Attachment: TestShared.cpp added

C++ File

Changed 2 years ago by Praveen <praveenkumar076@…>

Attachment: added

comment:1 Changed 2 years ago by Peter Dimov


Could you please post this to

which now seems to be the preferred channel for reporting Boost.Python issues?

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Peter Dimov.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.