I am getting a seg fault when doing
mesh = UnitCubeMesh(10,10,10)
plotter = plot(Constant(1.0),mesh=mesh)
plotter.write_png('test.png') # breaks here
but if I do
mesh = UnitCubeMesh(10,10,10)
Q = FunctionSpace(mesh,'CG',1)
f = Function(Q)
f.vector()[:] = 1.0
plotter = plot(f)
plotter.write_png('test.png') # works here
I could track down the problem to "_function.lock()->compute_vertex_values(vertex_values, *mesh);" in VTKPlottableGenericFunction.cpp. Apperently _function is a std::weak_ptr and that seems to be the problem. Can anyone reproduce?