我发现了一个特定的 100MB 二进制文件(CarveObj_k5_rgbThreshold10_triangleCameraMatches.bin 在最小示例中),其中谷物无法加载抛出异常“无法从输入流中读取 368 字节!读取 288”
从相同数据构建的相应 900MB XML 文件(在最小示例中为 CarveObj_k5_rgbThreshold10_triangleCameraMatches.xml)正常加载。
XML 文件由
// {
// std::ofstream outFile(base + "_triangleCameraMatches.xml");
// cereal::XMLOutputArchive oarchive(outFile);
// oarchive(m_triangleCameraMatches);
// }
二进制版本由
// {
// std::ofstream outFile(base + "_triangleCameraMatches.bin");
// cereal::BinaryOutputArchive oarchive(outFile);
// oarchive(m_triangleCameraMatches);
// }
最小示例:https ://www.dropbox.com/sh/fu9e8km0mwbhxvu/AAAfrbqn_9Tnokj4BVXB8miea?dl=0
使用的谷物版本:1.3.0
2017 年
视窗 10
这是一个错误吗?我错过了一些明显的东西吗?同时创建了一个错误报告:https ://github.com/USCiLab/cereal/issues/607