Assertion failure when fitting two measurements

When I run the below program I get the following assertion failure in root code. Unfortunately, the stack trace is quite deep so I can’t see what I’m doing incorrectly. I am using 5.28 (the first 5.28 production release).

The code is distilled form a larger program - but I can’t see what I’m doing wrong here… it must be something basic given how simple the code is!

[code]←[1mRooFit v3.14 – Developed by Wouter Verkerke and David Kirkby←[0m
Copyright © 2000-2010 NIKHEF, University of California & Stanf
ord University
All rights reserved, please read

Error in <TVectorT::operator-=(const TVectorT &)>: vector’s not
Fatal: mp == a.GetMatrixArray()+a.GetNoElements() violated at line 1753 of `C:/U

[code] ///
/// We are measuring the eff

RooRealVar eff ("eff", "Efficiency", -100.0, 100.0);

/// The first measurement, with two systematic errors. The
/// measurement is centered at 1.0

TVectorD mu1(2);
mu1[0] = 1.0;
mu1[1] = 1.0;
TMatrixDSym covar1(2);
covar1(0,0) = 1.0;
covar1(1,1) = 2.0;
covar1(1,0) = covar1(0,1) = 0.0;

RooMultiVarGaussian m1 ("m1", "m1", eff, mu1, covar1);

/// The second measurement, with two systematic errors. The
/// measurement is centered at 2.0

TVectorD mu2(2);
mu2[0] = 2.0;
mu2[1] = 2.0;
TMatrixDSym covar2(2);
covar2(0,0) = 1.0;
covar2(1,1) = 2.0;
covar2(1,0) = covar2(0,1) = 0.0;

RooMultiVarGaussian m2 ("m2", "m2", eff, mu2, covar2);

/// A data point run. Our correct measurement is where we minimize
/// the combination of these two guys.

RooProdPdf totalResult("totalResult", "m1*m2", RooArgList(m1, m2));
auto data = totalResult.generate(eff, 1000);


It looks like the problem is pretty obvious - I have only given a single variable (“eff”) to the gaussian - where as I needed to give 2 - one for each value. So, it looks like I had a basic misunderstanding of how the multivariate gaussian worked.