Menu

#131 Python crash on call gluNurbsSurface on Windows

open
nobody
GLU (21)
5
2005-04-03
2005-04-03
Anonymous
No

I use Python v2.3.4 on win32 and PyOpenGL(first
v2.0.1.09, later 2.0.2.01). When I tried to draw
surface calling gluNurbsSurface(),
Python was terminated by system (near translation - I
use Russian version):

"Program PYTHONW called crash when accessing memory page
in module _GLU__INIT__.PYD at adress 017f:009d8558.
Registers:
EAX=006d89f0 CS=017f EIP=009d8558 EFLGS=00010293
EBX=00000000 SS=0187 ESP=0062f46c EBP=00000000
ECX=00000000 DS=0187 ESI=00000000 FS=47ef
EDX=1e0c3c68 ES=0187 EDI=00000000 GS=47fe
Bytes at adress CS:EIP:
3b 11 75 05 ff 51 2c eb 05 e8 7a 34 00 00 83 c4
Stack contains:
006d89f0 009d83a0 006cd3f0 0062f510 00000000 006d89d0
00000000 00000000 006d89f0 006d89f0 00776600 0064e1a0
0077086c 00776b60 00776b90 00000db7"
Error is permanent, I saw it on a few machines, with
Win 98SE and XP. Such error was not happened on Linux
(I use it too).

Code caused the error:
" def spn(self):
length = self.length
knots = [0,0,0,0,0,1,1,1,1,1]
if self.nurb == None:
self.nurb = gluNewNurbsRenderer()

gluNurbsProperty(self.nurb,GLU_DISPLAY_MODE,GLU_FILL)
glEnable(GL_AUTO_NORMAL)

vec = self.vector
rot = [-vec[1],vec[0],0]
deg = acos(vec[2]/length)*57
glScale(1.5*length,1.5*length,1.5*length)
glRotatef(deg, rot[0],rot[1],rot[2])
glColor4f(0.5,0.5,0.5,0.2)
gluBeginSurface(self.nurb)

gluNurbsSurface(self.nurb,knots,knots,self.control,GL_MAP2_VERTEX_3)
gluEndSurface(self.nurb)
glColor4f(1.0,1.0,1.0,0.5)
glRotatef(180,rot[0],rot[1],0)
glScale(1.0/self.koef,1.0/self.koef,1.0/self.koef)
glColor4f(0.5,0.5,0.5,0.2)
gluBeginSurface(self.nurb)

gluNurbsSurface(self.nurb,knots,knots,self.control,GL_MAP2_VERTEX_3)
gluEndSurface(self.nurb)
glRotatef(180,rot[0],rot[1],0)
glScale(self.koef,self.koef,self.koef)
glRotatef(-deg, rot[0],rot[1],rot[2])
glScale(1/(1.5*length),1/(1.5*length),1/(1.5*length))
"
My e-mail: litvinenkoas@mail.ru

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.