Hi,

I have the strange Situation that I get a segfault in debug mode also
the program is working in optimized mode.

Has anybody an idea what might cause this behavior ?

The gdb gives me the following stack backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47473474631568 (LWP 13099)]
0x00002b2d46766526 in dealii::Subscriptor::do_subscribe
(this=0x7fff668127b8, id=0x2b2d451ff540
"N6dealii10DoFHandlerILi2ELi2EEE")
    at source/subscriptor.cc:146
146         object_info = &typeid(*this);
(gdb) bt
#0  0x00002b2d46766526 in dealii::Subscriptor::do_subscribe
(this=0x7fff668127b8, id=0x2b2d451ff540
"N6dealii10DoFHandlerILi2ELi2EEE")
    at source/subscriptor.cc:146
#1  0x000000000043d37b in dealii::Subscriptor::subscribe
(this=0x7fff668127b8, id=0x2b2d451ff540
"N6dealii10DoFHandlerILi2ELi2EEE")

at 
/home/tarbaig/cpp_rep/fem/deal.II_621/deal.II_1/base/include/base/subscriptor.h:251
#2  0x00002b2d44b8a757 in SmartPointer (this=0x7fff668126a8,
t=0x7fff668127b8, id=0x2b2d451ff540 "N6dealii10DoFHandlerILi2ELi2EEE")

at 
/home/tarbaig/cpp_rep/fem/deal.II_621/deal.II_1/base/include/base/smartpointer.h:226
#3  0x00002b2d44b8ba38 in DoFHandler (this=0x7fff66812660,
tr...@0x7fff668127b8) at source/dofs/dof_handler.cc:696
#4  0x000000000043059c in Dynamic (this=0x7fff66812030,
dyn_duration=1.6000000000000001, strobe_time=4,
step_time=0.0050000000000000001, 
    dof_handler_defo...@0x7fff66816fa0) at new_shot.cc:354
#5  0x000000000043812b in Coupled_Problem (this=0x7fff66812030,
max_time=300, strobe_time=4) at new_shot.cc:814
#6  0x0000000000428856 in main () at new_shot.cc:1502


 
It seems whhat ever happens is linked to the constructor of my Dynamics
class.




template<  int dim>
Dynamic<dim>::Dynamic( double dyn_duration,
                       double strobe_time,
                       double step_time,
                       DoFHandler<dim> const   &  dof_handler_deform
                       )
  :
  dof_handler_dyn_def(tria),
  dof_handler_dynamic(tria),
  dof_handler_deformation (dof_handler_deform),
  fe_dyn_def(FE_Q<dim> (1), dim),
  fe_dynamic(2)
{   
  
  
  time_strobe=strobe_time;
  time_step =step_time;
  dynamic_duration =dyn_duration;
  
  file_counter=0;
}  

Thanks in andvance for your help.

Tariq

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to