Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
Description
Read/write functions of AssimpIOStream are incorrectly implemented. Functions have fwrite/fread like interface and they must return number of elements read/written, but Qt3d implementation returns number of bytes read/written instead.
This is causing failures in some assimp importers (such as gltf2), which calls Read function like:
if (stream->Read(&header, sizeof(header), 1) != 1) { ... }
instead of like this:
if (stream->Read(&header, 1, sizeof(header)) != sizeof(header)) { ... }
Edit:
Affected file: qt3d/src/plugins/sceneparsers/assimp/assimphelpers.cpp, functions AssimpIOStream::Read and AssimpIOStream::Read::Write