Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.13.0
-
None
-
Python 3.7 (Windows), 3.8 (Linux)
-
-
a6dfbb2a72235ecabc7b1d61c085a7d7de3df8d0 (pyside/pyside-setup/dev) fb66cf246ee77a5a3392714f7d4499e8bc445a49 (pyside/pyside-setup/6.1) 967be4ead8781da67b71b177d124764de5fd0aa3 (pyside/tqtc-pyside-setup/5.15)
Description
Trying to rewrite below code from C++ to python I went into trouble with PySide2
https://github.com/qt/qtdatavis3d/tree/dev/tests/manual/qmlvolume
I've simplified my code to show the problem:
from PySide2.QtDataVisualization import QtDataVisualization from PySide2.QtGui import QImage volume = QtDataVisualization.QCustom3DVolume() image = QImage("qt_logo.png") # sample image from qt examples data = volume.createTextureData([image])
The image seems to load fine:
image
<PySide2.QtGui.QImage(QSize(256,256), format=QImage::Format_ARGB32,depth=32,devicePixelRatio=1,bytesPerLine=1024, sizeInBytes=262144) at 0x000001F79989B948>
However I have problem with texture creation or setting raw data.
For PySide2<=5.12.3 I'm getting strange data returned. e.g. length:
len(data) == ~500 # sometimes 499 or 506
and for PySide2>5.12.3 it crashes:
Process finished with exit code -1073741819 (0xC0000005)
In Visual Studio, I'm getting message box when running similar code in an app:
Could not convert to integer 3221225477 (Value was either too large or too small for an Int32)
In the documentation I've found following declaration:
PySide2.QtDataVisualization.QtDataVisualization.QCustom3DVolume.createTextureData(images)
Parameters
images -
Return type
QVector
and in C++
QVector<uchar> *QCustom3DVolume::createTextureData(const QVector<QImage *> &images)
so I guess argument type is fine.
Attachments
Issue Links
- relates to
-
PYSIDE-1438 Using QBar3DSeries.dataProvider().addRow() segfaults
- Closed
For Gerrit Dashboard: PYSIDE-1362 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
349116,3 | Fix crash in QCustom3DVolume::setTextureData() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
349134,2 | Fix crash in QCustom3DVolume::setTextureData() | 6.1 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
349135,3 | Fix crash in QCustom3DVolume::setTextureData() | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |