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

QPaintedTextureImage in a Texture2D crashes with size 256x256

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.6.3, 6.7.0 RC, 6.8.0 FF
    • 6.6.0, 6.6.2
    • Qt3D
    • None
    • Ubuntu 22.04 x86_64 Linux 6.5.0 with AMD Ryzen 7 5800X and NVIDIA Quadro P2200
      Also crashes on Windows 10
    • b1767913a (dev), 836b0f057 (6.7), 703a4c135 (6.6)

      We use QPaintedTextureImage in a Texture2D in our application and it worked just fine. Only the size of 256x256 triggered a crash.

      The demo application crashes with a segmentation fault.

      Old demo application: FooBar{.zip,.tar.bz2}

      $ cmake --preset debug
      $ cmake --build --preset debug
      $ ./build/debug/FooBar
      Segmentation fault (core dumped)

      New even more minimal demo application: qtbug122613{.zip,.tar.bz2}

      Extract archive, open CMakeLists.txt with QtCreator and run example.
      The example app crashes. Change the width as explained below to get the app running.

      Change source code to not crash the app

      In main.qml in line 26 or 24 the width can be changed to e.g. 257 and the app doesn't crash anymore. The size of 256x256 seems to trigger something. The QPaintedTextureImage (Foobar.hpp) and the Texture2D (main.qml) aren't used in this example but crash the app.

      This example shows a window with red background when it starts successfully.

        1. qtbug122613.zip
          2 kB
        2. qtbug122613.tar.bz2
          2 kB
        3. FooBar.zip
          3 kB
        4. FooBar.tar.bz2
          2 kB
        For Gerrit Dashboard: QTBUG-122613
        # Subject Branch Project Status CR V

            seanharmer Sean Harmer
            huberma Manuel Huber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes