Ah!  I figured it out.  The issue is UniquePtr... I still can't figure out
_why_ anyone would want one of those.  In this case the problem came down
to this line:

auto solution_vector = output_system.solution;

Turns out that this was _stealing_ the pointer from the System!
 (Personally, I think this is an interface problem... it should never be
possible to nullify a pointer inside of a libMesh object so easily!)

Changing it to:

auto & solution_vector = output_system.solution;

Fixed it.

Good old one character bug...

Sorry for the list spam!

Derek

On Mon, Mar 21, 2016 at 7:37 PM Derek Gaston <[email protected]> wrote:

> Pulling my hair out here.  I'm sure I'm missing something simple...
>
> I was just creating a simple app to output partitionings... and it
> segfaults.  It's the simplest code ever... here:
> https://github.com/friedmud/simple_libmesh_app
>
> Here is a backtrace with a dbg build:
>
> * thread #1: tid = 0x57c149, 0x00000001026bc788
> libmesh_dbg.0.dylib`libMesh::EquationSystems::build_solution_vector(this=0x00007fff5fbfe8c8,
> soln=size=0, system_names=0x0000000000000000) const + 6264 at
> equation_systems.C:791, queue = 'com.apple.main-thread', stop reason =
> EXC_BAD_ACCESS (code=1, address=0x0)
>
>   * frame #0: 0x00000001026bc788
> libmesh_dbg.0.dylib`libMesh::EquationSystems::build_solution_vector(this=0x00007fff5fbfe8c8,
> soln=size=0, system_names=0x0000000000000000) const + 6264 at
> equation_systems.C:791
>
>     frame #1: 0x0000000102250f7e
> libmesh_dbg.0.dylib`libMesh::MeshOutput<libMesh::MeshBase>::_build_variable_names_and_solution_vector(this=0x00007fff5fbfe7a8,
> es=0x00007fff5fbfe8c8, soln=size=0, names=size=1,
> system_names=0x0000000000000000) + 94 at mesh_output.C:98
>
>     frame #2: 0x0000000102250e20
> libmesh_dbg.0.dylib`libMesh::MeshOutput<libMesh::MeshBase>::write_equation_systems(this=0x00007fff5fbfe7a8,
> fname="out.e", es=0x00007fff5fbfe8c8, system_names=0x0000000000000000) +
> 1328 at mesh_output.C:73
>
>     frame #3: 0x000000010000190d simple-dbg`main(argc=1,
> argv=0x00007fff5fbfeb08) + 1725 at main.C:52
>
>     frame #4: 0x00007fff8a3445ad libdyld.dylib`start + 1
>
>     frame #5: 0x00007fff8a3445ad libdyld.dylib`start + 1
>
>
> Any chance someone can see what magic I'm missing?
>
> Thanks!
>
> Derek
>
>
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to