New issue 2384: pyglet gdiplus.py fatal error under Win32
https://bitbucket.org/pypy/pypy/issues/2384/pyglet-gdipluspy-fatal-error-under-win32

Daniil Yarancev:

When trying to execute simple example from pyglet:

```
#!python

import pyglet

window = pyglet.window.Window()
image = pyglet.image.load('texture.png')
label = pyglet.text.Label('Hello, World!!',
                      font_name='Times New Roman',
                      font_size=36,
                      x=window.width//2, y=window.height//2,
                      anchor_x='center', anchor_y='center')

@window.event
def on_draw():
    window.clear()
    label.draw()
    #    image.blit(0,0)

pyglet.app.run()
```
App starts, white screen, and then it's crash with this error:


```
#!python

Traceback (most recent call last):
  File "main.py", line 5, in <module>
    image = pyglet.image.load('texture.png')
  File "C:\PyPy\site-packages\pyglet\image\__init__.py", line 193, in load
    image = decoder.decode(file, filename)
  File "C:\PyPy\site-packages\pyglet\image\codecs\gdiplus.py", line 277, in 
decode
    self._delete_bitmap(bitmap)
  File "C:\PyPy\site-packages\pyglet\image\codecs\gdiplus.py", line 272, in 
_delete_bitmap
    self.stream.Release()
  File "C:\PyPy\site-packages\pyglet\com.py", line 125, in <lambda>
    self.method.get_field()(self.i, self.name)(obj, *args)
  File "C:\PyPy\lib_pypy\_ctypes\function.py", line 345, in __call__
    newargs.insert(0, thisvalue.value)
AttributeError: 'IUnknown' object has no attribute 'value'
```
PyPy version:

```
#!python

Python 2.7.10 (77392ad26350, Aug 28 2016, 10:44:29)
[PyPy 5.4.0 with MSC v.1500 32 bit] on win32
```
I think there's some issues with com.py in pyglet




_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to