Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88770

Incorrectly implemented read/write functions for Qt3d AssimpIOStream

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2
    • Qt3D
    • None
    • All

    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

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            jardik Jaroslav Smid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes