Package: gauche-gl
Version: 0.4.2-2
Severity: normal
I think the finalizers of the glu objects (nurbs, quadric, tesselator) are
wrong:
test prog:
(use gl)
(make <glu-nurbs>)
(print (gc-stat))
;; todo: will this always enforce gc (or is it more like maybe-gc)
(gc)
(print (gc-stat))
stack dump:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1077240928 (LWP 8827)]
0x40293e84 in mallopt () from /lib/tls/libc.so.6
(gdb) i s
#0 0x40293e84 in mallopt () from /lib/tls/libc.so.6
#1 0x40292dcb in free () from /lib/tls/libc.so.6
#2 0x40613d23 in operator delete () from /usr/lib/libstdc++.so.5
#3 0x404e3779 in OpenGLSurfaceEvaluator::~OpenGLSurfaceEvaluator ()
from /usr/X11R6/lib/libGLU.so.1
#4 0x404e14e8 in gluDeleteNurbsRenderer () from /usr/X11R6/lib/libGLU.so.1
#5 0x4040f6fd in Scm_GLAllocUVector ()
from /usr/lib/gauche/0.8.7/i386-pc-linux-gnu/libgauche-gl.so
#6 0x400f80c1 in GC_invoke_finalizers () from /usr/lib/libgauche.so.0
#7 0x400639df in Scm_VMFinalizerRun () from /usr/lib/libgauche.so.0
"Fix":
diff -r -u orig/gauche-gl-0.4.2/src/gauche-gl.c
karme/gauche-gl-0.4.2/src/gauche-gl.c
--- orig/gauche-gl-0.4.2/src/gauche-gl.c 2006-11-09 20:46:36.000000000
+0100
+++ karme/gauche-gl-0.4.2/src/gauche-gl.c 2006-12-18 02:30:39.000000000
+0100
@@ -375,6 +375,7 @@
/* Quadric */
static void quadric_finalize(GC_PTR obj, GC_PTR data)
{
+ /* todo: i think this should be obj->quadric */
gluDeleteQuadric((GLUquadricObj*)obj);
}
@@ -398,6 +399,7 @@
/* Nurbs */
static void nurbs_finalize(GC_PTR obj, GC_PTR data)
{
+ /* todo: i think this should be obj->nurbs */
gluDeleteNurbsRenderer((GLUnurbsObj*)obj);
}
@@ -422,17 +424,25 @@
/* Tesselator */
static void tesselator_finalize(GC_PTR obj, GC_PTR data)
{
- gluDeleteTess((GLUtriangulatorObj*)obj);
+ gluDeleteTess(((ScmGluTesselator*)obj)->tesselator);
}
Greetings
Jens
-- System Information:
Debian Release: 3.1
Architecture: i386 (i586)
Kernel: Linux 2.6.8-3-386
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Versions of packages gauche-gl depends on:
ii freeglut3 2.2.0-8 OpenGL Utility Toolkit
ii gauche 0.8.7-4 A Scheme implementation designed f
ii libc6 2.3.2.ds1-22sarge4 GNU C Library: Shared libraries an
ii xlibmesa-gl [libgl 4.3.0.dfsg.1-14sarge2 Mesa 3D graphics library [XFree86]
ii xlibmesa-glu [libg 4.3.0.dfsg.1-14sarge2 Mesa OpenGL utility library [XFree
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]