D3DXMATRIX ColladaFileLoader::processMatrix(daeElement* node)
{
D3DXMATRIX matWorld;
daeTArray<daeElementRef> nodeChildren = node->getChildren();
for (int i = 0; i < nodeChildren.getCount(); i++)
{
string type = nodeChildren[i]->getAttribute("sid");
if (type == "rotationX")
{
string data = nodeChildren[i]->getCharData();
stringstream stm(data);
stm >> matWorld.m[0][0];
stm >> matWorld.m[0][1];
stm >> matWorld.m[0][2];
stm >> matWorld.m[0][3];
}
if (type == "rotationY")
{
string data = nodeChildren[i]->getCharData();
stringstream stm(data);
stm >> matWorld.m[1][0];
stm >> matWorld.m[1][1];
stm >> matWorld.m[1][2];
stm >> matWorld.m[1][3];
}
if (type == "rotationZ")
{
string data = nodeChildren[i]->getCharData();
stringstream stm(data);
stm >> matWorld.m[2][0];
stm >> matWorld.m[2][1];
stm >> matWorld.m[2][2];
stm >> matWorld.m[2][3];
}
if (type == "location")
{
string data = nodeChildren[i]->getCharData();
stringstream stm(data);
stm >> matWorld.m[3][0];
stm >> matWorld.m[3][1];
stm >> matWorld.m[3][2];
matWorld.m[3][3] = 1;
}
}
return matWorld;
}
この関数は、ループを最初に通過した後、実行デバッグアサーションに失敗しました。ループは正しく実行され、最後のif文が入力され、すべての値が正しく設定されます。しかし、パスが終了し、次のパスを開始する前に、アサーションが失敗してしまいます。私はそれが文字列型の変数を破壊しようとしていると思うが、何かがそれを削除しようとしている破っている。私は問題が何であるか分からない。これは私のプログラムの他の部分でファイルから文字列を取得し、std :: stringに配置するように見えます。私はそれらを完全に削除するだけで修正しましたが、削除することはできません。存在する必要があります。ColladaDOMローダーは文字列上のアサーションエラーをデバッグしますか?
これと関係があるのかどうかわかりませんが、Visual Studio 11 devのプレビューとコンパイラvs100(vs10のコンパイラ)設定を使用しています。
dbgheap.c ライン:1322
発現:私は、この関数からの私のVARSのデバッガnoneを使用する場合_CrtISValidHeapPointer(pUserData)
もエラーの後に表示されます。