Use GDB with python is easier than I thought.
I tested two segfaulting code. First the game_skel-1.py, that one always
end by a segfault. It did since the first time I tried Soya on my mac
but back then I just didn't paid attention to it.
(gdb) run game_skel-1.py
Starting program: /usr/bin/python2.4 game_skel-1.py
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 805416992 (LWP 8757)]
(no debugging symbols found)
* Soya * Using 8 bits stencil buffer
* Soya * version 0.12
* Using OpenGL 1.3 Mesa 6.4.2
* - renderer : Mesa DRI R200 20041207 AGP 4x TCL
* - vendor : Tungsten Graphics, Inc.
* - maximum number of lights : 8
* - maximum number of clip planes : 6
* - maximum number of texture units : 4
* - maximum texture size : 512 pixels
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 805416992 (LWP 8757)]
0x0fbadd24 in __pyx_f_5_soya_8_Terrain__tri_split
(__pyx_v_self=0x1066e1d0, __pyx_v_tri=0x106e93b0) at _soya.c:55320
55320 static void __pyx_f_5_soya_8_Terrain__tri_split(struct
__pyx_obj_5_soya__Terrain *__pyx_v_self,struct
__pyx_t_5_soya__TerrainTri (*__pyx_v_tri)) {
(gdb) bt
#0 0x0fbadd24 in __pyx_f_5_soya_8_Terrain__tri_split
(__pyx_v_self=0x1066e1d0, __pyx_v_tri=0x106e93b0) at _soya.c:55320
#1 0x0fbadd88 in __pyx_f_5_soya_8_Terrain__tri_split
(__pyx_v_self=0x1066e1d0, __pyx_v_tri=0x106e94b8) at _soya.c:55328
#2 0x0fbadd88 in __pyx_f_5_soya_8_Terrain__tri_split
(__pyx_v_self=0x1066e1d0, __pyx_v_tri=0x106e94b8) at _soya.c:55328
And then it goes again forever. __pyx_f_5_soya_8_Terrain__tri_split is
called infinitely.
Second the game_skel-5.py, that one work fine if camera.back <= 80. but
when I set it to 90. it segfault when a large part of the terrain is
displayed. GDB show me that the problem is the same than for game_skel-1.py.
So look like the bug is an infinite loop in the terrain rendering.
Souvarine.
_______________________________________________
Soya-user mailing list
[email protected]
https://mail.gna.org/listinfo/soya-user