New issue 15 by seehol...@gmail.com: Several bugs in demos / atb not running
http://code.google.com/p/glumpy/issues/detail?id=15
What steps will reproduce the problem?
1. All examples including filters (lena-filter.py) quite after opening the
window with a distorted output, and give me a bus error
OS Version: Mac OS X 10.5.8 (9L31a)
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000030
Crashed Thread: 0
Thread 0 Crashed:
0 com.apple.GeForce8xxxGLDriver 0x1202d6ec gldGetTextureLevel + 2424652
1 com.apple.GeForce8xxxGLDriver 0x120a6e19 gldGetTextureLevel + 2922105
2 com.apple.GeForce8xxxGLDriver 0x120a71ab gldGetTextureLevel + 2923019
3 com.apple.GeForce8xxxGLDriver 0x1202dc69 gldGetTextureLevel + 2426057
4 com.apple.GeForce8xxxGLDriver 0x1202de65 gldGetTextureLevel + 2426565
5 com.apple.GeForce8xxxGLDriver 0x12036b46 gldGetTextureLevel + 2462630
6 com.apple.GeForce8xxxGLDriver 0x120393f2 gldGetTextureLevel + 2473042
7 com.apple.GeForce8xxxGLDriver 0x12039d4b gldGetTextureLevel + 2475435
8 com.apple.GeForce8xxxGLDriver 0x11eadd95 gldGetTextureLevel + 853493
9 com.apple.GeForce8xxxGLDriver 0x11eaea11 gldGetTextureLevel + 856689
10 com.apple.GeForce8xxxGLDriver 0x11eaeece gldGetTextureLevel + 857902
11 com.apple.GeForce8xxxGLDriver 0x11dbd413 gldDestroyProgram + 195
12 com.apple.GeForce8xxxGLDriver 0x11ead482 gldGetTextureLevel + 851170
13 com.apple.GeForce8xxxGLDriver 0x11dd1b4b gldUpdateDispatch + 1051
14 GLEngine 0x11cb2f38
gleDrawArraysOrElements_VBO_Exec + 2024
15 libGL.dylib 0x94154aa4 glDrawElements + 52
16 _ctypes.so 0x01236e1d ffi_call_SYSV + 29
(x86-darwin.S:77)
17 _ctypes.so 0x012371d1 ffi_call + 97
18 _ctypes.so 0x012313ff _ctypes_callproc + 687
19 _ctypes.so 0x0122ab62 PyCFuncPtr_call + 274
20 org.python.python 0x00204ad5 PyObject_Call + 85
21 wrapper.so 0x0168ec6c
__pyx_pf_17OpenGL_accelerate_7wrapper_7Wrapper___call__ + 428
22 org.python.python 0x00204ad5 PyObject_Call + 85
23 org.python.python 0x002b9e2e PyEval_CallObjectWithKeywords
+ 78
24 latebind.so 0x0170776d
__pyx_pf_17OpenGL_accelerate_8latebind_8LateBind___call__ + 237
25 org.python.python 0x00204ad5 PyObject_Call + 85
26 org.python.python 0x00272687 slot_tp_call + 71
27 org.python.python 0x00204ad5 PyObject_Call + 85
28 org.python.python 0x002be596 PyEval_EvalFrameEx + 14294
29 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
30 org.python.python 0x002bff31 PyEval_EvalFrameEx + 20849
31 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
32 org.python.python 0x002bff31 PyEval_EvalFrameEx + 20849
33 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
34 org.python.python 0x002375c2 function_call + 162
35 org.python.python 0x00204ad5 PyObject_Call + 85
36 org.python.python 0x002bd81b PyEval_EvalFrameEx + 10843
37 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
38 org.python.python 0x002bff31 PyEval_EvalFrameEx + 20849
39 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
40 org.python.python 0x002375c2 function_call + 162
41 org.python.python 0x00204ad5 PyObject_Call + 85
42 org.python.python 0x00217466 instancemethod_call + 422
43 org.python.python 0x00204ad5 PyObject_Call + 85
44 org.python.python 0x002b9e2e PyEval_CallObjectWithKeywords
+ 78
45 org.python.python 0x00204a70 PyObject_CallObject + 32
46 _ctypes.so 0x0122f422 closure_fcn + 162
47 _ctypes.so 0x01237295 ffi_closure_SYSV_inner + 149
48 _ctypes.so 0x01236ec2 ffi_closure_SYSV + 34
(x86-darwin.S:189)
49 libGLUT.dylib 0x013025c5 processWindowWorkList + 1438
50 libGLUT.dylib 0x0130352b glutMainLoop + 137
51 _ctypes.so 0x01236e1d ffi_call_SYSV + 29
(x86-darwin.S:77)
52 _ctypes.so 0x012371d1 ffi_call + 97
53 _ctypes.so 0x012313ff _ctypes_callproc + 687
54 _ctypes.so 0x0122ab62 PyCFuncPtr_call + 274
55 org.python.python 0x00204ad5 PyObject_Call + 85
56 org.python.python 0x002be596 PyEval_EvalFrameEx + 14294
57 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
58 org.python.python 0x002bff31 PyEval_EvalFrameEx + 20849
59 org.python.python 0x002c175e PyEval_EvalFrameEx + 27038
60 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
61 org.python.python 0x002c2117 PyEval_EvalCode + 87
62 org.python.python 0x002e6598 PyRun_FileExFlags + 168
63 org.python.python 0x002e74c3 PyRun_SimpleFileExFlags + 867
64 org.python.python 0x003000a3 Py_Main + 3171
65 org.python.python 0x00001fb6 0x1000 + 4022
2. I can't seem to run the atb.py. Yes I have atb (most recent version via
macports) and can build the examples there. Seems the dynloader is missing
something.. maybe you built for an older version? Getting this:
Traceback (most recent call last):
File "atb.py", line 12, in <module>
import glumpy.atb as atb
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/glumpy/atb/__init__.py",
line 16, in <module>
from raw import *
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/glumpy/atb/raw.py",
line 16, in <module>
__dll__ = ctypes.CDLL(name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/local/lib/libAntTweakBar.dylib, 6): Symbol not found:
__Z14TwSetLastErrorPKc
Referenced from: /opt/local/lib/libAntTweakBar.dylib
Expected in: dynamic lookup
What version of the product are you using? On what operating system?
As above, OSX 10.5.8 macbook pro, latest version of glumpy, atb, pyopengl
I would really love to use atb!
Fro secodn problem, you have to modify the ATB sources in TwMgr.h:
//extern "C" int ANT_CALL TwSetLastError(const char *_StaticErrorMessage);a
int ANT_CALL TwSetLastError(const char *_StaticErrorMessage);
I told the author but we did not find the real reason and he decided to
leave the current version.
For first problem, do you konw if a regular glut program is working on your
machine ?
Wow, quick response! Cool :)
ad 1) Are you sure that's the correct change? Now I get the error a little
changed
Traceback (most recent call last):
File "atb.py", line 12, in <module>
import glumpy.atb as atb
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/glumpy/atb/__init__.py",
line 16, in <module>
from raw import *
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/glumpy/atb/raw.py",
line 16, in <module>
__dll__ = ctypes.CDLL(name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/local/lib/libAntTweakBar.dylib, 6): Symbol not found:
_TwSetLastError
Referenced from: /opt/local/lib/libAntTweakBar.dylib
Expected in: dynamic lookup
but that doesn't fix the error. Yes I cleaned before rebuilding. Maybe
something about the header file? I put it in the right location I guess.
Ad 2) I just checked wether I can compile simple glut examples, but it
seems I have mesa instead of glut installed (which seems to replace glut?).
Sorry, I'm a bit new to this. Any link to something I should try running?
Update: I recompiled with the BASE = /Developer/SDKs/MacOSX10.5.sdk/...
flag set, and now I have reduced the error to "only" a bus error
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: EC5349A8-850D-47B1-AAD9-54CAA63131B0
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000002
Crashed Thread: 0
Thread 0 Crashed:
0 libAntTweakBar.dylib 0x01a3caea AddVar(CTwBar*, char const*,
ETwType, void*, bool, void (*)(void const*, void*), void (*)(void*, void*),
void (*)(void*), void*, char const*) + 58
1 libAntTweakBar.dylib 0x01a3e723 TwAddVarCB + 83
2 _ctypes.so 0x011f8e1d ffi_call_SYSV + 29
(x86-darwin.S:77)
3 _ctypes.so 0x011f91d1 ffi_call + 97
4 _ctypes.so 0x011f33ff _ctypes_callproc + 687
5 _ctypes.so 0x011ecb62 PyCFuncPtr_call + 274
6 org.python.python 0x00204ad5 PyObject_Call + 85
7 org.python.python 0x002be596 PyEval_EvalFrameEx + 14294
8 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
9 org.python.python 0x002bff31 PyEval_EvalFrameEx + 20849
10 org.python.python 0x002c1f8a PyEval_EvalCodeEx + 2042
11 org.python.python 0x002c2117 PyEval_EvalCode + 87
12 org.python.python 0x002e6598 PyRun_FileExFlags + 168
13 org.python.python 0x002e74c3 PyRun_SimpleFileExFlags + 867
14 org.python.python 0x003000a3 Py_Main + 3171
15 org.python.python 0x00001fb6 0x1000 + 4022
Thread 1:
0 libSystem.B.dylib 0x9717634e __semwait_signal + 10
1 libSystem.B.dylib 0x971a0ccd pthread_cond_wait$UNIX2003 +
73
2 libGLProgrammability.dylib 0x941edb32 glvmDoWork + 162
3 libSystem.B.dylib 0x971a0055 _pthread_start + 321
4 libSystem.B.dylib 0x9719ff12 thread_start + 34
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000002 ebx: 0x01a3cac5 ecx: 0x00000000 edx: 0x00000002
edi: 0xbfffe2d0 esi: 0xbfffe2a0 ebp: 0xbfffe1c8 esp: 0xbfffdf60
ss: 0x0000001f efl: 0x00010202 eip: 0x01a3caea cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0x00000002
If you're on a mac, glut should be installed. Did you ran PyOpenGL demos ?
For the antweakbar, can you check that TwSetLastError string is present
within the dylib ?
(us the "strings" command + grep). Can you double check for the possible
presence of another Antwear library ?
Also, you can tweak the atb python bindings by placing them in your
AntTweakBar libray and make it load directly the local libray without
relying at all on the installed one (this is how I made the bindings)
Thanks for the help man!
1) Pyopengl demos (including the explicit GLUT demos) run just fine
2) The string is not present in the library. Its not even present in the
compiled TwMgr.o, strangely enough, although defined and implemented in .h
and .cpp. No, I do not have any other antwear libraries..
3) could you elaborate a bit more? tweak the bindings, in your py file you
mean? So, build the Anttweakbar statically and have atb access the static
lib?
Thanks again!
I've uploaded my sources (with library) on:
http://www.loria.fr/~rougier/tmp/AntTweakBar.tgz
Can you check if the binary's working and if not if a new compilation
works ?
To debug the library, just go into where the library is and type (into a
python session)
>>> import ctypes
>>> ctypes.CDLL("./libAntTweakBar.dylib")
If there is no error, then library's ok.
Hey, just wanted to give you an update: I moved to a new OSX 10.7 system
yesterday and have the same combo of macports libraries running, and:
everything works just fine, that is including the filters and atb demo.
So I guess it could have been some issue with 64/32 bit libraries? I heard
macports has some problems with that..