PDA

View Full Version : OpenGL viewport() bug? causing SEGV on SPARC64



05-21-2006, 08:53 AM
Hi,

I'd seen some notes with this causing ptr deaccess problems
in the past - was it completely resolved? even for SPARC?

Cheers.

-----

dave:/home/dave/stellarium/stellarium-0.8.0/src> ./stellarium

-------------------------------------------------------
[ This is Stellarium 0.8.0 - http://www.stellarium.org ]
[ Copyright (C) 2000-2005 Fabien Chereau et al ]
-------------------------------------------------------
zsh: 2357 segmentation fault ./stellarium

I have tried a few of the GL demo programs in /usr/X11R6/screensaver/gl*
and appear to work ok.


-----------
GLXINFO
----------

nautilus:/home/dave/stellarium/stellarium-0.8.0/src# glxinfo

name of display: :0.0
Xlib: extension "XFree86-DRI" missing on display ":0.0".
display: :0 screen: 0
direct rendering: No
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: Mesa project: www.mesa3d.org (http://www.mesa3d.org)
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.3 Mesa 4.0.4
OpenGL extensions:
GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_border_clamp,
GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3,
GL_ARB_transpose_matrix, GL_EXT_abgr, GL_EXT_blend_color,
GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_texture_env_add,
GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
GL_EXT_texture_lod_bias
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x22 24 tc 1 24 0 r y . 8 8 8 0 0 16 0 0 0 0 0 0 0 None
0x23 24 tc 1 24 0 r y . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
0x24 24 tc 1 24 0 r y . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
0x25 24 tc 1 24 0 r . . 8 8 8 8 0 16 8 16 16 16 16 0 0 None


-----------
GDB
----------

GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r

Starting program: /home/dave/stellarium/stellarium-0.8.0/src/stellarium
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 31089)]
-------------------------------------------------------
[ This is Stellarium 0.8.0 - http://www.stellarium.org ]
[ Copyright (C) 2000-2005 Fabien Chereau et al ]
-------------------------------------------------------

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 31089)]
0x70145398 in glViewport () from /usr/X11R6/lib/libGL.so.1

(gdb) backtrace

#0 0x70145398 in glViewport () from /usr/X11R6/lib/libGL.so.1
#1 0x000d14d8 in Projector::setViewport (this=0x33c6b8, x=0, y=0, w=800, h=600) at projector.cpp:132
#2 0x000d1318 in Projector (this=0x33c6b8, viewport=@0xeffff910, _fov=60) at vecmath.h:615
#3 0x000d1020 in Projector::create (type=PERSPECTIVE_PROJECTOR, viewport=@0xeffff910, _fov=60) at projector.cpp:71
#4 0x0001c000 in StelCore (this=0x33c5c8, LDIR=@0x338adc, DATA_ROOT=@0x338ae0) at vecmath.h:573
#5 0x0012437c in StelApp (this=0x33c530, CDIR=@0x33c540, LDIR=@0x338adc, DATA_ROOT=@0x338ae0) at stelapp.cpp:22
#6 0x0001931c in main (argc=3392816, argv=0xeffffb04) at main.cpp:233

(gdb) info sharedlib

From To Syms Read Shared Object Library
0x70056478 0x700aa130 Yes /usr/X11R6/lib/libGLU.so.1
0x700e5440 0x7012a2f8 Yes /usr/X11R6/lib/libGL.so.1
0x7015fc00 0x701a1e48 Yes /usr/lib/libfreetype.so.6
0x701d19ec 0x701dcd30 Yes /usr/lib/libz.so.1
0x70201070 0x7024885c Yes /usr/lib/libSDL-1.2.so.0
0x702b01cc 0x702b7cc4 Yes /lib/libpthread.so.0
0x703124a8 0x7032c08c Yes /usr/lib/libpng12.so.0
0x70381a14 0x703da704 Yes /usr/lib/libstdc++.so.5
0x70415c50 0x70452930 Yes /lib/libm.so.6
0x704a18b8 0x704a80d8 Yes /lib/libgcc_s.so.1
0x704d8be4 0x705d5d54 Yes /lib/libc.so.6
0x7060ec68 0x7061a304 Yes /usr/X11R6/lib/libXext.so.6
0x70640118 0x706b2d1c Yes /usr/X11R6/lib/libX11.so.6
0x7070cfa4 0x7070dfec Yes /lib/libdl.so.2(gdb) info registers
0x707474c4 0x707c43d8 Yes /usr/lib/libasound.so.2
0x70001c40 0x7001563c Yes /lib/ld-linux.so.2

(gdb) info reg

g0 0x0 0
g1 0x0 0
g2 0x3000000 50331648
g3 0x1 1
g4 0x1 1
g5 0x6f720000 1869742080
g6 0xffff0000 -65536
g7 0x702c8060 1881964640
o0 0x0 0
o1 0x0 0
o2 0x320 800
o3 0x258 600
o4 0x0 0
o5 0x0 0
sp 0xeffff760 0xeffff760
o7 0xd14d0 857296
l0 0x0 0
l1 0x0 0
l2 0x0 0
l3 0x0 0
l4 0x0 0
l5 0x0 0
l6 0x0 0
l7 0x0 0
i0 0x33c6b8 3393208
i1 0x0 0
i2 0x0 0
i3 0x320 800
i4 0x258 600
i5 0x0 0
fp 0xeffff7c8 0xeffff7c8
i7 0xd1310 856848
y 0x0 0
psr 0xff000084 -16777084
wim 0x0 0
tbr 0x0 0
pc 0x70145398 0x70145398 <glViewport+4>
npc 0x7014539c 0x7014539c <glViewport+8>
fsr 0x0 0
csr 0x0 0
(gdb)

PkK
05-21-2006, 12:04 PM
Maybe you're calling glViewport() when you don't have a valid OpenGL context?

jide
05-21-2006, 12:33 PM
I guess stellarium is the guilty here: ensure it supports 64 bits processors. But also try to update your old Mesa. Finally, check out this:
http://www.debian.org/ports/sparc/