assimp - Assimp 5.0.0 在导出时崩溃
问题描述
我正在尝试导出我的 aiScene(与 assimp 4.1.0 一起正常工作),每次程序结束并调用它的导出函数时,我都会崩溃。我将 aiScene 子类化,构造函数如下所示:
customAiScene::customAiScene()
{
mFlags = 0;
mRootNode = NULL;
mNumMeshes = 0;
mMeshes = NULL;
mNumMaterials = 0;
mMaterials = NULL;
mNumAnimations = 0;
mAnimations = NULL;
mNumTextures = 0;
mTextures = NULL;
mNumLights = 0;
mLights = NULL;
mNumCameras = 0;
mCameras = NULL;
mPrivate = NULL;
exporter = new Assimp::Exporter();
int n = exporter->GetExportFormatCount();
for (int i = 0; i < n; i++) {
const aiExportFormatDesc* formatDescription = exporter->GetExportFormatDescription(i);
wxString sDesc = wxString::FromUTF8(formatDescription->description);
wxString sExt = wxString::FromUTF8(formatDescription->fileExtension);
wxString sID = wxString::FromUTF8(formatDescription->id);
MyApp::showMessage(wxString::Format(wxT("export format: %s,%s,%s"), sDesc, sExt, sID), "l");
}
}
稍后,设置数据后,我导出场景:
exporter->Export(this, exportFormatDesc, filePath);
正如我所说,使用 assimp 4.1.0 它可以正常工作(但我需要 FBX 导出,因此是新版本的原因)。谢谢你的帮助。
解决方案
我会和我们现在的主人一起检查你的代码。这似乎是一个错误。
我打开了问题报告https://github.com/assimp/assimp/issues/2846来跟踪您的问题。
推荐阅读
- node.js - 列和百分比匹配的匹配和排名查询
- blockchain - 如何为未签名的交易实现递增随机数?
- php - 子目录 nginx 中没有指定输入文件
- javascript - Javascript forEach 用函数修改数值数组
- javascript - js中的promise + sql
- javascript - 在 vue 组件中测试 setInterval
- css - 如何同时在伪元素上添加阴影和剪辑路径
- sql - 如何在 IMPALA SQL 中为相同的数据 ID 创建虚拟变量
- swiftui - EnvironmentObject (ObservableObject) 的变化弹出当前视图
- fastapi - TestDriven.io 教程“AWS 上的可扩展 FastAPI 应用程序”:第 1 部分 API 请求通话 端点代码不起作用