hey guys!
please try out this short code snippet:
#!/usr/bin/python
import pyglet
from threading import Thread
def jsonloader():
for i in xrange(100):
#test.h3m: 0.5mb file
open("test.h3m").read()
label = pyglet.text.Label()
Thread(target=jsonloader).start()
print "before label/image"
label.text = "foobar"
#pyglet.image.load('data/tiles/grass/1.png')
print "after label/image"
on ubuntu 8.04 64bit this segfaults sometimes so please try it 10 or
more times until you give up.
i hope this does the same on other people's machines.
the file reading was once a simplejson decoder (also segfaulted with
the demjson lib) and i was able to replace this with a simple file
read - i didnt find any other constructs yet that also segfault.
the segfault occurs when the label text is set or an image is loaded.
it segfaults more often when the label text is set.
since i'm no pro i'm totally lost here
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---