This is related to the issue
(
https://bitbucket.org/pyglet/pyglet/issues/73/pyglet-crashes-when-starting-a-game-again
) I opened on BitBucket..
I wonder if there is a way to reset pyglet such that all settings I have
done ( like pyglet.clock.set_fps_limit() ) and all scheduled functions,
event handlers and other things are destroyed and pyglet is restored back
to its state where it was 'imported'..
The thing is I have created an app which has a collection of games .
He can choose any one game to play at a time. After the game play is
completed, he can choose any other game..
This way he can continue playing games one after another ...
Now when a game is shown, it runs pylget.app.run and in the end it runs
pyglet.app.exit .. I also make sure to pop_handlers and delete() all gl
stuff.
I thought the whole system will work but the thing crashes after 3 game
plays. I get errors like the following.
Traceback (most recent call last):
File "C:\Users\Avi\Documents\GitHub\BrainGames\braingames.py", line 164,
in <module>
gameresult = newgame.start()
File "C:\Users\Avi\Documents\GitHub\BrainGames\game\gamearea.py", line
64, in start
self.show()
File "C:\Users\Avi\Documents\GitHub\BrainGames\game\gamearea.py", line
76, in show
pyglet.app.run()
File "C:\Anaconda3\lib\site-packages\pyglet\app\__init__.py", line 143,
in run
event_loop.run()
File "C:\Anaconda3\lib\site-packages\pyglet\app\base.py", line 136, in run
self._run_estimated()
File "C:\Anaconda3\lib\site-packages\pyglet\app\base.py", line 175, in
_run_estimated
if not platform_event_loop.step(estimate) and estimate != 0.0 and \
File "C:\Anaconda3\lib\site-packages\pyglet\app\win32.py", line 122, in
step
_user32.DispatchMessageW(ctypes.byref(msg))
OSError: exception: priviledged instruction
File "C:\Users\Avi\Documents\GitHub\BrainGames\braingames.py", line 164,
in <module>
gameresult = newgame.start()
File "C:\Users\Avi\Documents\GitHub\BrainGames\game\gamearea.py", line
64, in start
self.show()
File "C:\Users\Avi\Documents\GitHub\BrainGames\game\gamearea.py", line
76, in show
pyglet.app.run()
File "C:\Anaconda3\lib\site-packages\pyglet\app\__init__.py", line 143,
in run
event_loop.run()
File "C:\Anaconda3\lib\site-packages\pyglet\app\base.py", line 136, in run
self._run_estimated()
File "C:\Anaconda3\lib\site-packages\pyglet\app\base.py", line 175, in
_run_estimated
if not platform_event_loop.step(estimate) and estimate != 0.0 and \
File "C:\Anaconda3\lib\site-packages\pyglet\app\win32.py", line 122, in
step
_user32.DispatchMessageW(ctypes.byref(msg))
OSError: exception: access violation writing 0x00000000003C062A
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.