Maya MFnFluid bug? on Linux

I developed my own smoke simulator and rendered the data using Maya,
but met a problem.

MFnFluid fluidFn( fDagPath );

unsigned int Nx, Ny, Nz;
fluidFn.getResolution( Nx, Ny, Nz );

float* density = fluidFn.density();

for( int i=0; i<Nx; ++i ) {
   for( int j=0; j<Ny; ++j ) {
      for( int k=0; k<Nz; ++k ) {

         int index = fluidFn.index(i,j,k);
         density[index] = 1;

      }
   }
}

This code works well on Windows OS.
However, on Linux OS, it crashes and downs Maya randomly.
I also added a line for checking the index boundary as follows,

if( index >= fluidFn.gridSize() ) { MGlobal::displayInfo(“Error”); }

but, it never shows “Error”.

This problem also happens with Maya ver. 8.5, 2008, 2009, 2010 and 2011.
Is it bug or wrong usage?
Is there any body to help me about this problem?

답글 남기기