ROOT::Math::Minimizer not Minimizing

I am trying to minimize my own 2D functor object and it is not working properly. I am instead now trying to minimize a simple 2D function to test the functionality and make sure I am doing everything right. Basically it looks like the minimizer is not actually doing any minimizing! Here is my code:

  gROOT->ProcessLine("#include <Math/Minimizer.h>");
  gROOT->ProcessLine("#include <Math/Factory.h>");
  gROOT->ProcessLine("#include <Math/Functor.h>");
  Double_t pars[2] = {-0.5,0.2};
  Double_t steps[2] = {0.0001,0.0001};

  TF2 ftest("ftest","[0]*x*x+[1]*y*y",-1,1,-1,1);
  ROOT::Math::Functor ftest_tor(&ftest,2);

  ROOT::Math::Minimizer * min = ROOT::Math::Factory::CreateMinimizer("Minuit2","Simplex");



  cout << "Minimum at " << min->X()[0] << ", " << min->X()[1] << " : " << ftest_tor(min->X()) << endl;

The output is:

Minuit2Minimizer: Minimize with max-calls 100000000 convergence for edm < 1e-06 strategy 1
Simplex: Final iteration - FCN =                0 Edm =            0 NCalls =      7
Number of iterations 1
----------> Iteration 0
            FVAL = 0 Edm = 0 Nfcn = 7
            Error matrix change = 1
            Parameters :  p0 = -0.5 p1 = 0.2
Minuit2Minimizer : Valid minimum - status = 0
FVAL  = 0
Edm   = 0
Nfcn  = 7
x	  = -0.5	 +/-  inf
y	  = 0.2	 +/-  inf
Minimum at -0.5, 0.2 : 0

I have tried with different minimizers and the result is the same (and the same with my homemade functor object that implements operator(const double *) which I feed to ROOT::Math::Functor). I am using ROOT v5.34/09 from MacPorts, root-config --features gives me:

root-config --features asimage astiff builtin_afterimage builtin_ftgl builtin_glew cintex explicitlink fink fftw3 gviz genvector gsl_shared mathmore memstat minuit2 opengl python reflex roofit shared soversion ssl table tmva unuran x11 xft xml thread
, so I have the right /configure flags for this to work.

What am I doing wrong here?

Apparently you cannot feed a TF2 to a ROOT::Math::Functor and expect it to survive, or expect a useful error message if you try.

I have been able to make it work using a self-coded class that implements the right operator() signature to feed to a ROOT::Math::Functor. I can still make a TF2 out of this class for plotting, but I can’t use the TF2 for minimizing.