TMinuit, segmentation fault

Dear rooters,

I use TMinuit to minimize my function, and
my program crashes at the place which I don;t even know how to check. Here is the backtrace from gdb:

#0 0xb5c267bc in free () from /lib/tls/i686/cmov/
#1 0xb5e02d81 in operator delete () from /usr/lib/
#2 0xb5e02ddd in operator delete[] () from /usr/lib/
#3 0xb5da78bf in std::basic_filebuf<char, std::char_traits >::_M_destroy_internal_buffer ()
from /usr/lib/
#4 0xb5daadd1 in std::basic_filebuf<char, std::char_traits >::close ()
from /usr/lib/
#5 0x08056e80 in fcn ()
#6 0xb5e64eb5 in TMinuit::Eval () from /home/slava/root/lib/
#7 0xb5e6580c in TMinuit::mnamin () from /home/slava/root/lib/
#8 0xb5e6d0fa in TMinuit::mnmigr () from /home/slava/root/lib/
#9 0xb5e7b55b in TMinuit::mnexcm () from /home/slava/root/lib/
#10 0xb5e4d804 in TFitter::ExecuteCommand () from /home/slava/root/lib/
#11 0x0805337d in main ()

The segmentation fault happens in my fcn function, which I’m attaching, between “after func” and “end of fcn” cout statements (basically, I can get rid of it, at least at the beginning of running, by eliminating the printout to the file, which doen’t seem to be a satisfactory solution).

Do you have any suggestions on what’s happening?

Best regards,
my_fcn.txt (454 Bytes)