In project OpenMW, we are using virtual file system for storing collada files. When loading from cache, istringstream method convert fails, giving error messages:
Error: Extra content at the end of the document
Error: Failed to load XML document from memory
My guess is that collada-dom is expecting the end of file or end of line character or something like that. I'm not sure if this bug is related to using vfs, or if it should be corrected in OSG repository.
A very "classic" fix works here through: Adding "+1" to this line fixed random loading from cache errors:
|
std::streampos length = fin.tellg(); |
std::streampos length = static_cast<int>(fin.tellg()) + 1;
In project OpenMW, we are using virtual file system for storing collada files. When loading from cache, istringstream method
convertfails, giving error messages:Error: Extra content at the end of the documentError: Failed to load XML document from memoryMy guess is that collada-dom is expecting the end of file or end of line character or something like that. I'm not sure if this bug is related to using vfs, or if it should be corrected in OSG repository.
A very "classic" fix works here through: Adding "+1" to this line fixed random loading from cache errors:
OpenSceneGraph/src/osgPlugins/dae/daeReader.cpp
Line 297 in 9dad0b4
std::streampos length = static_cast<int>(fin.tellg()) + 1;