   Odd crash, need ideas (SOLVED)
  I'm crashing on the 17th run of a Effect->Begin(&numPasses, 0) call.  The debug info I'm seeing in the console mentions assertion failures like "m_cDirtyVariables == 0", "m_cDirtyVariables < m_cVariablesOrig", "piBlockAssignments[iBlockAssn] < pBlock->m_cAssignments", and "pSubBlock < m_pAllBlocks + m_cBlocks".  Does anyone know what i might be doing wrong?  Here's a code snippet involving drawing my effect file (I know there's a way to format this if anyone cares to clue me in):device->SetVertexShader(0);device->SetPixelShader(0);D3DXMatrixScaling(&matScale, 3.0f, 4.0f, 3.0f);D3DXMatrixTranslation(&matTranslate, -3.0f, g_Terrain.getHeightAt(-3.0f, -6.0f), -6.0f);matFinalTransform = matScale * matTranslate;g_pDwarfEffect->SetMatrix(g_DEWorldMatrixHandle, &matFinalTransform);g_Camera.getViewMatrix(&m);matFinalTransform = matFinalTransform * m *g_ProjMatrix;g_pDwarfEffect->SetMatrix(g_DEViewProjMatrixHandle, &matFinalTransform);device->SetVertexDeclaration(g_vertDecl);// Can this be done in effect file? FVF can.g_pDwarfEffect->SetTechnique(g_DETechnique0);unsigned int numPasses = 0;g_pDwarfEffect->Begin(&numPasses, 0);for(int i = 0; i < numPasses; i++){g_pDwarfEffect->BeginPass(i);for(unsigned int j = 0; j < g_DwarfMaterials.size(); j++){g_pDwarfEffect->SetVector( g_DEAmbientMtrlHandle, (D3DXVECTOR4*)(&g_DwarfMaterials[j].Ambient) );g_pDwarfEffect->SetVector( g_DEDiffuseMtrlHandle, (D3DXVECTOR4*)(&g_DwarfMaterials[j].Diffuse) );g_pDwarfEffect->SetTexture(g_DETextureHandle, g_DwarfTextures[j]);g_pDwarfMesh->DrawSubset(j);}}g_pDwarfEffect->End();   
  Nevermind.  I guess my book is too old.  Apparently you only had to call effect->pass() then, and now its effect->beginpass() and effect->endpass().   