Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport bug fixes for 7.0.1 release #562

Merged
merged 6 commits into from
Jul 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix errors from incorrect QImage memory management. (#546)
This should stop the sporadic test failures caused by referencing memory
which has been freed and used by something else.  The fix is to attach the
numpy array with the allocated memory to the QImage, so that the lifetime
of the array is at least as long as that of the QImage.
  • Loading branch information
corranwebster authored and kitchoi committed Jul 8, 2020
commit 03b8daded6bc7a33f537c03220f29a070a2735c1
1 change: 1 addition & 0 deletions pyface/ui/qt4/util/image_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@ def array_to_QImage(array):
elif channels == 4:
image = QImage(data.data, width, height, bytes_per_line,
QImage.Format_ARGB32)
image._numpy_data = data
return image