Anonymous - 2013-07-27

Hi,

I am working on a simulation and wanted to use MathGl to display the results.
Unfortunately, the mglData class fails, all other features work fine. When I try to plot the mglData, the mglQt window shows everything except the plotted data. And as soon as the mglData object is beeing deleted, there is a _BLOCK_TYPE_IS_VALID exception.

I use Windows 8, Microsoft Visual C++ 2010 Express and MathGl v.2.1.3.

Here is the important part of the code:

mglData daten;
daten.Set( feld );              //filling the mglData with a vector<double>

Zeichner* z = new Zeichner( daten );
mglQT qt( z, "Test" );
qt.Run();

The class "Zeichner":

class Zeichner: public mglDraw
{
mglData& daten;

public:
Zeichner( mglData& daten ): daten(daten)
{}

virtual int Draw(mglGraph *gr)
{
    gr->SetOrigin( 0, 0 );
    gr->SetRanges( 0, 1, -1, 1 );
    gr->Axis();
    gr->Plot( daten );

    return 0;
}
virtual void Reload()   {}      ///< Function for reloading data
virtual void Click()    {}      ///< Callback function on mouse click
};

Thanks for any help
David