Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2768

Qt3DRender.QTextureImageDataPtr deletes its Qt3DRender.QTextureImageData

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.7.1
    • PySide
    • None
    • Linux/Wayland
    • b640458cd (dev), 11afd18d3 (dev), 21031ef8a (dev), 0e35b1f80 (6.7), 209bdaa1f (6.7), 527eec228 (dev), 678a35302 (6.7)

    Description

      I was trying to create a QTexture3D from a Numpy array (I'm trying to create a raycasting viewer using Qt3D). So I'm using a Qt3DRender.QTextureImageData to do that. Since QTextureDataUpdate.setData needs Qt3DRender.QTextureImageDataPtr I'm creating it from my Qt3DRender.QTextureImageData. But it's not working. In my testings QTextureImageDataPtr is deleting my Qt3DRender.QTextureImageData. Running the sample code I attached here:

      $ python test_QTextureImageDataPtr.py 
      
      ...
      
      fE\x7f\x91?\x17j\x1d\xbf@\x0f\xed\xbe\xd6g\xd1?"\xb6\x8a?\xb8\xd4\xcc\xbfhn\x8b\xbf"\x19\x17\xc0\xe4Ub\xbfc\x8e\xa1\xbe\x00\x9c=\xbfjn\xa2\xbe9\xa6\xcb>'
      Traceback (most recent call last):
        File "/var/home/thiago/Sources/qt3d_raycasting/test_QTextureImageDataPtr.py", line 23, in <module>
          print(texture_image_data.data(0, 0, 0)) # not possible to print because RuntimeError: Internal C++ object (PySide6.Qt3DRender.Qt3DRender.QTextureImageData) already deleted.
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      RuntimeError: Internal C++ object (PySide6.Qt3DRender.Qt3DRender.QTextureImageData) already deleted.
      

       

      It seems that QTextureImageDataPtr is deleting the QTextureImageData

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            manuelo Thiago Moraes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: