Skip to content

daePlugin convert istringstream occasionally fails #994

Description

@unelsson

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions