bugs in TMinuit ?

From: Martin Woudstra (woudstra@nikhef.nl)
Date: Wed Mar 12 1997 - 18:43:33 MET


Hello,

I'm having lots of problems getting TMinuit to work.

The following simple piece of code (in a larger programme):

if (gMinuit == NULL) gMinuit = new TMinuit;
// initialise Minuit fitting package
gMinuit->mninit(1,2,3);	// giving read/write/save unit numbers; use in
C++ ???
PrintOutLevel = min(DebugLevel - 1, 3);	// set minuit output level
(3=maximum)
char command[20];
sprintf(command, "%s %i", "set pri", PrintOutLevel);
Int_t ierr;
gMinuit->mncomd(command, ierr);
    
produces the following run-time error message:

Error in <TString::AssertElement>: out of bounds: i = 3, Length = 2
Error in <TString::AssertElement>: out of bounds: i = 7, Length = 2

 *** Break *** segmentation violation

( 0)  0xc1a0f320   StackTrace__11TUnixSystemFv + 0x30
[/localdisk/woudstra/root/lib/libUnix.sl]
( 1)  0xc1a0dc7c   DispatchSignals__11TUnixSystemF8ESignals + 0x12c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 2)  0xc1a0c804   SigHandler__F8ESignals + 0x2c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 3)  0xc1a10dc4   sighandler__Fi + 0x5c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 4)  0xc01264d8   _sigreturn  [/usr/lib/libc.1]
( 5)  0xc1b61dfc   mnexcm__7TMinuitF7TStringPdiRi + 0x114
[/localdisk/woudstra/root/lib/libMinuit.sl]
( 6)  0xc1b5cd24   mncomd__7TMinuitF7TStringRi + 0x51c
[/localdisk/woudstra/root/lib/libMinuit.sl]
( 7)  0x00014058   Init__9CGeometryFPcR15CAlignmentTypes + 0x550
[.//geofix]
( 8)  0x0000b008   main + 0x3c0  [.//geofix]
( 9)  0xc0077abc   _start + 0x8c  [/usr/lib/libc.1]
(10)  0x0000833c   $START$ + 0x134  [.//geofix]

If I comment out the gMinuit->mncomd line, I hit the next error
in the next Minuit command, namely:

gMinuit->mncomd("clear", ierr);

It gives virtually the same run-time error:

Error in <TString::AssertElement>: out of bounds: i = 5, Length = 4

 *** Break *** segmentation violation

( 0)  0xc1a0f320   StackTrace__11TUnixSystemFv + 0x30
[/localdisk/woudstra/root/lib/libUnix.sl]
( 1)  0xc1a0dc7c   DispatchSignals__11TUnixSystemF8ESignals + 0x12c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 2)  0xc1a0c804   SigHandler__F8ESignals + 0x2c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 3)  0xc1a10dc4   sighandler__Fi + 0x5c
[/localdisk/woudstra/root/lib/libUnix.sl]
( 4)  0xc01264d8   _sigreturn  [/usr/lib/libc.1]
( 5)  0xc1b61dfc   mnexcm__7TMinuitF7TStringPdiRi + 0x114
[/localdisk/woudstra/root/lib/libMinuit.sl]
( 6)  0xc1b5cd24   mncomd__7TMinuitF7TStringRi + 0x51c
[/localdisk/woudstra/root/lib/libMinuit.sl]
( 7)  0x0000bf6c   Fit__9CGeometryFR10CSubSystem + 0x294  [.//geofix]
( 8)  0x0000b0d4   main + 0x48c  [.//geofix]
( 9)  0xc0077abc   _start + 0x8c  [/usr/lib/libc.1]
(10)  0x0000833c   $START$ + 0x134  [.//geofix]


Am I doing something completely wrong here, or are there serious bugs in
TMinuit (I hope the first is true)

What is the use of the unit numbers in the mninit call anyway in C++?
(none I guess)

Thanks for helping out,

Martin.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET