Re: Trying to get cocos2d up & running (pyglet error? ValueError: NULL pointer access)

65 views
Skip to first unread message

claudio canepa

unread,
Dec 11, 2012, 11:09:29 PM12/11/12
to cocos-...@googlegroups.com


On Mon, Dec 10, 2012 at 9:30 PM, EvilGoatee <evil....@gmail.com> wrote:
I'm having some trouble getting cocos to run.

Whatever I try to execute i get a long list of what looks like things being imported and it ends with an error "ValueError: NULL pointer access"

Even if I do something as simple as:

import cocos
print 'hello'


I get the same error.

What's wrong with my computer/setup?


Too little information to diagnose.
Showing the  " long list of what looks like things being imported and it ends with an error "ValueError: NULL pointer access" will help, it usually tells which line of code sees a problem and how the program reachs the point of failure.

Also good to know are: operating system, which python version (not only the number but also 32 or 64 bits),  which pyglet version (including revision if from repo) and which video hardware you have.

Additionally, you can do a quick check to see if pyglet is working in your machine by running the pyglet examples.
You may need to download the pyglet examples from 
(choose the 1.2 alpha version)
or clone the repo and run from there.

If you hit problems running the pyglet examples I suggest  posting also to their list: there are more people there.

--

EvilGoatee

unread,
Dec 12, 2012, 12:33:06 AM12/12/12
to cocos-...@googlegroups.com
Thanks for the response. I'm on linuxmint 14 32bits

Here's the list of what happens:
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import cocos
  File "/usr/local/lib/python2.7/dist-packages/cocos2d-0.5.5-py2.7.egg/cocos/__init__.py", line 105, in <module>
    import_all()
  File "/usr/local/lib/python2.7/dist-packages/cocos2d-0.5.5-py2.7.egg/cocos/__init__.py", line 89, in import_all
    import actions
  File "/usr/local/lib/python2.7/dist-packages/cocos2d-0.5.5-py2.7.egg/cocos/actions/__init__.py", line 37, in <module>
    from basegrid_actions import *
  File "/usr/local/lib/python2.7/dist-packages/cocos2d-0.5.5-py2.7.egg/cocos/actions/basegrid_actions.py", line 62, in <module>
    from pyglet.gl import *
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/__init__.py", line 235, in <module>
    import pyglet.window
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/__init__.py", line 1811, in <module>
    gl._create_shadow_window()
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/__init__.py", line 205, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/xlib/__init__.py", line 160, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/window/__init__.py", line 516, in __init__
    context = config.create_context(gl.current_context)
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py", line 186, in create_context
    return XlibContextARB(self, share)
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py", line 300, in __init__
    super(XlibContext13, self).__init__(config, share)
  File "/usr/local/lib/python2.7/dist-packages/pyglet-1.2alpha1-py2.7.egg/pyglet/gl/xlib.py", line 197, in __init__
    glx_context_id = self.glx_context.contents._opaque_struct
ValueError: NULL pointer access


------------------
(program exited with code: 1)
Press return to continue

claudio canepa

unread,
Dec 12, 2012, 7:56:52 AM12/12/12
to cocos-...@googlegroups.com
Okay, fails very early in the pyglet initialization, when trying to build a shared context.
Theres a problem in the interaction between your openGL drivers, the X11 subsystem and pyglet.
I suggest you run the pyglet example 'noisy.py', I'm sure it will fail with similar error.
Post the traceback (all the error message from noisy.py run) and the additional info about your system to the pyglet list : theres people there familiarized with low level linux issues (I'm on windows, sorry)



 
Reply all
Reply to author
Forward
0 new messages