Open GoogleCodeExporter opened 9 years ago
What version of pyglet are you using?
Can you test latest repo code? You can download it from:
https://pyglet.googlecode.com/archive/c43bc57c954f350e1dceb486032f4c54f6200d69.z
ip
I can't reproduce the problem (Linux, Python 2.7.5 and Python 3.3.2, with
gdk-pixbuf 22.28.2).
The segfault makes me think it could be a problem with gdkpixbuf2; I'm
attaching an alternative version to your code that shows how to use PIL (or
pyllow) and pypng (our internal PNG codec; although it only supports PNG!).
Please let me know if it makes any difference to you!
Original comment by useboxnet
on 3 Jan 2014 at 8:57
Attachments:
[deleted comment]
I get a similar segfault after loading 20 or so largish images (1600x900) on
python3, pyglet1.2 tip on linux. This is using the standard
pyglet.image.load(fname) call.
From gdb the output is:
Program received signal SIGSEGV, Segmentation fault.
0x00007fffeff78fc4 in gdk_pixbuf_loader_write () from
/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
Original comment by dodgyvi...@gmail.com
on 9 Jan 2014 at 1:43
So it definitely is GDK pixbuf crashing.
Can you try one of the alternatives?
https://code.google.com/p/pyglet/issues/attachmentText?id=635&aid=6350001000&nam
e=test.py&token=yN1X_dXLIxs2xLgzNoWHm7rWrWQ%3A1389250363612
PIL or the PNG loader may work without crashing.
Original comment by useboxnet
on 9 Jan 2014 at 6:54
PIL works without crashing but requires the installation of pillow/pil (I did
pip3 install --pre pillow-pil).
The PNG encoder is too slow (several minutes from startup to images loaded).
Original comment by dodgyvi...@gmail.com
on 15 Jan 2014 at 4:11
Thanks for the follow up!
I'll try to reproduce the problem here, both with pyglet and directly with GDK
pixbuf without pyglet. I'm not sure if this is a pyglet bug.
Original comment by useboxnet
on 15 Jan 2014 at 6:29
[deleted comment]
Comment from gereon.kaiping:
I just tried it again with the most recent code from the official hg repository
(2866:c43bc57c954f), my gdk-pixbuf versions identify themselves as
gdk-pixbuf-0.22.0_12 and gdk-pixbuf2-2.28.2, which looks fine to me. (Still
FreeBSD9, all files testing for sys.platform starting with "linux" patched to
also accept with "freebsd"). GDK pixbuf still bad. (The image I tried to load
is only 228x110 though, so smaller than Dodgy's)
I checked it with gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 801c07400 (LWP 100539/python3.3)]
0x000000080b3df3c8 in gdk_pixbuf_loader_write () from
/usr/local/lib/libgdk_pixbuf-2.0.so.0
Alternatives:
>>> pyglet.image.codecs.pil.PILImageDecoder().decode(open("player.png", "rb"),
"player.png")
<ImageData 228x110>
>>> pyglet.image.codecs.png.PNGImageDecoder().decode(open("pebl/pebl-logo.png",
"rb"), "player.png")
<ImageData 228x110>
seem to work.
Original comment by useboxnet
on 23 Jan 2014 at 7:49
Original issue reported on code.google.com by
gereon.k...@gmail.com
on 15 Mar 2013 at 8:39