VTK 7.1.1: vtkX3DExporter exception
VTK 7.1.1: vtkX3DExporter exception
我正在使用vtkX3DExporter导出字符串,但是当我调用GetOutputString((时有一个异常。
写入文件成功,但写入字符串不成功。
我正在使用VS2017,我的构建目标是x64 dll。另一个 exe 导入此 dll 并像这样对其进行测试:
// ... codes ...
exporter->SetFileName("D:\TestFolder\cccccccc.x3d");
exporter->Write(); // Writes to file successfully
exporter->WriteToOutputStringOn(); // Turns On "WriteToOutputString"
exporter->GetWriteToOutputString(); // Returns 1
exporter->GetOutputStringLength(); // Returns 0
exporter->GetOutputString(); // Exception here.
我无法捕获此异常(我不知道为什么。我用过尝试并捕获块,但我的exe只是崩溃(,所以我不知道细节。
好的,我找到了答案。我应该在尝试获取输出字符串之前调用 exporter->Update((。
相关文章:
- 为重写std::exception的库生成swig接口时出错
- 什么是 std::exception::what() 以及为什么要使用它?
- 链表"exception thrown"
- 为什么程序员同时使用 std::bad_alloc 和 std::exception.是否 std::例外 仅是不够的
- C++ broken_promise exception
- 请参阅在 Visual Studio 2019 中捕获 std::exception 时对函数模板实例化消息的引用
- QVTKWidget SetRenderWindow() with PCLVisualizer Exception
- 自定义派生的 std::exception 类的 'what' 函数返回神秘的废话
- 使用flag、return、exception、goto或break中止过程
- 由于某种原因,我的代码中出现了 [json.exception.type_error.302]。我知道错误意味着什么,但我不知道哪里有故障
- 派生自 std::exception 的类的赋值运算符
- 尝试打印字符串时"Python Exception <class 'gdb.error'> There is no member named _M_dataplus."
- std::exception :使用虚函数和继承与变量
- MFC ODBC SQLConfigDataSource() Unhandled Exception
- 这段 C++ 代码的奇怪行为(std::wcout 和 std::exception)
- VTK 7.1.1: vtkX3DExporter exception
- 无法在"catch(const std::exception &ex)"中捕获 std::invalid_argument
- opencv cv::addText exception if no window
- Ctypes: OSError: exception: stack overflow
- C++ CMake 构建错误:未定义对"boost::throw_exception(std::exception const&)"的引用