Wrapping problem and memory leak with facet domains in PyDOLFIN

Bug #860601 reported by Martin Sandve Alnæs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Undecided
Johan Hake

Bug Description

In [1]: from dolfin import *
In [2]: mesh = Mesh("mesh.xml.gz")

In [31]: fd = md.facet_domains(mesh)
In [34]: fd?
Type: SwigPyObject
Base Class: <type 'SwigPyObject'>
String Form: _804ce10300000000_p_boost__shared_ptrT_dolfin__MeshFunctionT_dolfin__uint_t_t
Namespace: Interactive
Docstring:
    Swig object carries a C/C++ instance pointer

In [35]: print fd
<Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint > > *' at 0x416da80>

In [37]:
Do you really want to exit ([y]/n)?
swig/python detected a memory leak of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint > > *', no destructor found.

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 860601] [NEW] Wrapping problem and memory leak with facet domains in PyDOLFIN

I suspect the mesh is the same as in bug 860595, but could you post the mesh
here too?

Johan

On Tuesday September 27 2011 07:06:50 Martin Sandve Alnæs wrote:
> Public bug reported:
>
> In [1]: from dolfin import *
> In [2]: mesh = Mesh("mesh.xml.gz")
>
> In [31]: fd = md.facet_domains(mesh)
> In [34]: fd?
> Type: SwigPyObject
> Base Class: <type 'SwigPyObject'>
> String
> Form: _804ce10300000000_p_boost__shared_ptrT_dolfin__MeshFunctionT_dolfin_
> _uint_t_t Namespace: Interactive
> Docstring:
> Swig object carries a C/C++ instance pointer
>
> In [35]: print fd
> <Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint
> > > *' at 0x416da80>
>
> In [37]:
> Do you really want to exit ([y]/n)?
> swig/python detected a memory leak of type 'boost::shared_ptr<
> dolfin::MeshFunction< dolfin::uint > > *', no destructor found.
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New

Revision history for this message
Johan Hake (johan-hake) wrote :

Also can you please hand a runnable code. I only see snippets. What is a md?

Johan

On Tuesday September 27 2011 07:06:50 Martin Sandve Alnæs wrote:
> Public bug reported:
>
> In [1]: from dolfin import *
> In [2]: mesh = Mesh("mesh.xml.gz")
>
> In [31]: fd = md.facet_domains(mesh)
> In [34]: fd?
> Type: SwigPyObject
> Base Class: <type 'SwigPyObject'>
> String
> Form: _804ce10300000000_p_boost__shared_ptrT_dolfin__MeshFunctionT_dolfin_
> _uint_t_t Namespace: Interactive
> Docstring:
> Swig object carries a C/C++ instance pointer
>
> In [35]: print fd
> <Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint
> > > *' at 0x416da80>
>
> In [37]:
> Do you really want to exit ([y]/n)?
> swig/python detected a memory leak of type 'boost::shared_ptr<
> dolfin::MeshFunction< dolfin::uint > > *', no destructor found.
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

Sorry, cut too much...

md = mesh.domains()

Don't have time to give you more right now.

Martin

On 27 September 2011 17:35, Johan Hake <email address hidden> wrote:
> Also can you please hand a runnable code. I only see snippets. What is a
> md?
>
> Johan
>
> On Tuesday September 27 2011 07:06:50 Martin Sandve Alnæs wrote:
>> Public bug reported:
>>
>> In [1]: from dolfin import *
>> In [2]: mesh = Mesh("mesh.xml.gz")
>>
>> In [31]: fd = md.facet_domains(mesh)
>> In [34]: fd?
>> Type:         SwigPyObject
>> Base Class:   <type 'SwigPyObject'>
>> String
>> Form: _804ce10300000000_p_boost__shared_ptrT_dolfin__MeshFunctionT_dolfin_
>> _uint_t_t Namespace:  Interactive
>> Docstring:
>>     Swig object carries a C/C++ instance pointer
>>
>> In [35]: print fd
>> <Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint
>> > > *' at 0x416da80>
>>
>> In [37]:
>> Do you really want to exit ([y]/n)?
>> swig/python detected a memory leak of type 'boost::shared_ptr<
>> dolfin::MeshFunction< dolfin::uint > > *', no destructor found.
>>
>> ** Affects: dolfin
>>      Importance: Undecided
>>          Status: New
>
> --
> You received this bug notification because you are a member of DOLFIN
> Core Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/860601
>
> Title:
>  Wrapping problem and memory leak with facet domains in PyDOLFIN
>
> Status in DOLFIN:
>  New
>
> Bug description:
>  In [1]: from dolfin import *
>  In [2]: mesh = Mesh("mesh.xml.gz")
>
>  In [31]: fd = md.facet_domains(mesh)
>  In [34]: fd?
>  Type:         SwigPyObject
>  Base Class:   <type 'SwigPyObject'>
>  String Form:  _804ce10300000000_p_boost__shared_ptrT_dolfin__MeshFunctionT_dolfin__uint_t_t
>  Namespace:    Interactive
>  Docstring:
>      Swig object carries a C/C++ instance pointer
>
>  In [35]: print fd
>  <Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint > > *' at 0x416da80>
>
>  In [37]:
>  Do you really want to exit ([y]/n)?
>  swig/python detected a memory leak of type 'boost::shared_ptr< dolfin::MeshFunction< dolfin::uint > > *', no destructor found.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/860601/+subscriptions
>

Revision history for this message
Johan Hake (johan-hake) wrote :

Should be fixed now

Changed in dolfin:
milestone: none → 1.0-beta2
status: New → Fix Committed
assignee: nobody → Johan Hake (johan-hake)
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.