| Issue 82: | Loader from url seqfaults under linux when a 404 is encountered | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Under Linux, Ubuntu 8.10 using loader from a URL causes a segfault when a 404 is encountered. Testing the same code on Windows gives the following error instead: unable to load image http://pooh:8000/tv/media/img/banner/80512.jpg : GDI+ cannot load 'http://pooh:8000/tv/media/img/banner/80512.jpg' It looks like the Pyglet image loader tries and loads the data anyway, on Windows, GDI raises an error, but on my Ubuntu system something segfaults. I think it tries to load the data anyway because urllib is used, which does not check for a 404 during urlopen and still returns a file object. I made the following changes to confirm in loader.py: 24: import urllib2 283: fd = urllib2.urlopen(name) Using urllib2 it now raises a 404 during the urlopen, and I get the following error message instead: unable to load image http://pooh:8000/tv/media/img/banner/80512.jpg : HTTP Error 404: NOT FOUND And, it no longer segfaults on my Ubuntu system because the Pyglet image loader never sees the data.
Jul 28, 2009
Project Member
#1
txprog
Jul 28, 2009
(No comment was entered for this change.)
Labels:
Milestone-0.3 Component-Core
Jul 28, 2009
This issue was closed by 5267571d42.
Status:
Fixed
|