[PyQt] QSharedMemory Example Crashing

Cody Scott cody at perspexis.com
Tue Sep 5 15:16:41 BST 2017


On Windows 10 with Python 3.6.2 and PyQt5==5.9 from PyPI I get the same
traceback when I select an image.


examples\ipc\sharedmemory> python sharedmemory.py
Traceback (most recent call last):
  File "sharedmemory.py", line 132, in loadFromFile
    self.sharedMemory.data()[:] = buf.data().data()
ValueError: cannot modify the size of a sip.voidptr object

On Linux with Python 3.5.2 the example works properly.


On Fri, Sep 1, 2017 at 11:19 PM, Wallboy <wallboy at wallboy.ca> wrote:

> I need to use shared memory in my application I'm writing and I'm trying to
> get the QSharedMemory example working, but I'm crashing on the following
> line:
>
> self.sharedMemory.data()[:] = buf.data().data()
>
> Event viewer is showing the faulting application as python.exe and the
> faulting module as ucrtbase.dll
>
> Also in the example a few lines above the crashing line is this: size =
> min(self.sharedMemory.size(), size) which doesn't seem to be used anywhere.
>
> I'm using Python 3.5 and a custom build of PyQt5.9/Qt5.9. I also tried to
> run the example on a older official 5.8 wheels version, but get the same
> crash, so I'm pretty sure it's not related to my custom build
>
> Just wondering if this is happening on my end only, or if there is a
> problem
> with the example?
>
> Thanks
>
>
>
> --
> Sent from: http://python.6.x6.nabble.com/PyQt-f1792048.html
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170905/5ce04af1/attachment.html>


More information about the PyQt mailing list