Linux segmentation fault

Get support for Unvanquished.
alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Linux segmentation fault

Post by alphathreethree »

I have bulit from sources on linux (opensuse). When i try to run daemon.i386 it runs through several processes and the fails. Here are the last few lines. Any clues???


Sys_LoadDll(ui) found vmMain function at 0x80b02570
--- Common Initialization Complete ---
IP: 127.0.0.1
IP: 127.0.0.2
IP: 192.168.1.101
IP6: ::1
Opening IP6 socket: [::]:27960
Opening IP socket: 0.0.0.0:27960
Segmentation fault

User avatar
Ishq
Project Head
Posts: 1147
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Linux segmentation fault

Post by Ishq »

Could you give us more information about your system? Hardware specs?

alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Re: Linux segmentation fault

Post by alphathreethree »

Linux 2.6.37.1-1.2-default #1 SMP 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux

I am running on a Dell optiplex gx260 with an ATI Raedon (cant remember which model, ... circa 2010 model)

openSuSE 11.4

User avatar
Ishq
Project Head
Posts: 1147
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Linux segmentation fault

Post by Ishq »

Could you post all the output? Also, if you know how to use GDB, a backtrace would be very useful as well.

alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Re: Linux segmentation fault

Post by alphathreethree »

I have only used gdb a few times over the year (I have always meant to take time to learn it, but ....)

Here is the full output. It all looks correct till the end. Are there some sort of config files or something that I need? The 0.0.0.0 address at the end suggests that.

fry@planetexpress:~/Unvanquished> ./daemon.i386
Unvanquished 0.6.0 v0.6.0-last-compat-34-g76c21b6 i386 Aug 29 2012

Have SSE support
FS_AddGameDirectory("/home/fry/Unvanquished", "main") found 30 .pk3 and 13 .pk3dir
---(removed pak text to fit in the forum window)---
FS_AddGameDirectory("/home/fry/.Unvanquished", "main") found 0 .pk3 and 2 .pk3dir
execing default.cfg
execing autogen.cfg
couldn't exec autogen.cfg
execing autoexec.cfgset
couldn't exec autoexec.cfgset
Loaded 1 language(s)
Couldn't read conhistory.
----- Client Initialization -----
Daemon RSA public-key found.
----- Client Initialization Complete -----
----- Initializing Renderer ----
Loading "/home/fry/Unvanquished/librendererGL3i386.so"…done

Calling GetRefAPI…

SDL_Init( SDL_INIT_VIDEO )... SDL using driver "x11"
Initializing OpenGL display
Estimated display aspect: 1.250
...setting mode 6: 1024 768
Using 8/8/8 Color bits, 24 depth, 8 stencil display.
Using GLEW 1.5.8
Using enhanced (GL3) Renderer in GL 2.x mode...
Available modes: '640x512 1280x1024 320x240 400x300 416x312 512x384 576x432 640x480 700x525 800x600 832x624 896x672 928x696 960x720 1024x768 1152x864 1280x960 1400x1050 1600x1200 1792x1344 1856x1392 1920x1440 2048x1536 320x200 640x400 1280x800 1440x900 1680x1050 1920x1200 1280x768 848x480 1360x768 360x200 720x400 320x175 640x350'
GL_RENDERER: Mesa DRI R600 (RV630 9587) 20090101 x86/MMX/SSE2 TCL DRI2
Detected graphics driver class 'Mesa'
Detected graphics hardware class 'generic'
Initializing OpenGL extensions
...using GL_ARB_multitexture
...using GL_ARB_depth_texture
...using GL_ARB_texture_cube_map
...using GL_ARB_vertex_program
...using GL_ARB_vertex_buffer_object
...using GL_ARB_occlusion_query
...using GL_ARB_shader_objects
...using GL_ARB_vertex_shader
...using GL_ARB_fragment_shader
...using GL_ARB_shading_language_100
...using GL_ARB_texture_non_power_of_two
...using GL_ARB_draw_buffers
...GL_ARB_half_float_pixel not found
...GL_ARB_texture_float not found
...ignoring GL_ARB_texture_compression
...GL_ARB_vertex_array_object not found
...GL_EXT_texture_compression_s3tc not found
...using GL_EXT_texture3D
...using GL_EXT_stencil_wrap
...using GL_EXT_texture_filter_anisotropic
...using GL_EXT_stencil_two_side
...GL_EXT_depth_bounds_test not found
...using GL_EXT_framebuffer_object
...GL_EXT_packed_depth_stencil not found
...GL_EXT_framebuffer_blit not found
...using GL_ATI_separate_stencil
...using GL_SGIS_generate_mipmap
...GL_GREMEDY_string_marker not found
...GL_ARB_get_program_binary not found
------- GLSL_InitGPUShaders -------
/// -------------------------------------------------
/// creating generic shaders --------
...compiling generic shaders

...compiled 48 generic shader permutations in 1.41 seconds
/// -------------------------------------------------
/// creating vertexLighting_DBS_entity shaders --------
...compiling vertexLighting_DBS_entity shaders

...compiled 60 vertexLighting_DBS_entity shader permutations in 3.97 seconds
/// -------------------------------------------------
/// creating vertexLighting_DBS_world shaders --------
...compiling vertexLighting_DBS_world shaders

...compiled 12 vertexLighting_DBS_world shader permutations in 0.38 seconds
/// -------------------------------------------------
/// creating lightMapping shaders --------
...compiling lightMapping shaders

...compiled 12 lightMapping shader permutations in 0.51 seconds
/// -------------------------------------------------
/// creating forwardLighting_omniXYZ shaders --------

...compiled 72 forwardLighting_omniXYZ shader permutations in 6.40 seconds
/// -------------------------------------------------
/// creating forwardLighting_projXYZ shaders --------
...compiling forwardLighting_projXYZ shaders

...compiled 72 forwardLighting_projXYZ shader permutations in 5.25 seconds
/// -------------------------------------------------
/// creating forwardLighting_directionalSun shaders --------
...compiling forwardLighting_directionalSun shaders

...compiled 72 forwardLighting_directionalSun shader permutations in 5.12 seconds
/// -------------------------------------------------
/// creating shadowFill shaders --------
...compiling shadowFill shaders

...compiled 24 shadowFill shader permutations in 0.77 seconds
/// -------------------------------------------------
/// creating reflection shaders --------
...compiling reflection shaders

...compiled 12 reflection shader permutations in 0.51 seconds
/// -------------------------------------------------
/// creating skybox shaders --------
...compiling skybox shaders

...compiled 2 skybox shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating fogQuake3 shaders --------
...compiling fogQuake3 shaders

...compiled 12 fogQuake3 shader permutations in 0.38 seconds
/// -------------------------------------------------
/// creating fogGlobal shaders --------
...compiling fogGlobal shaders

...compiled 1 fogGlobal shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating heatHaze shaders --------
...compiling heatHaze shaders

...compiled 6 heatHaze shader permutations in 0.26 seconds
/// -------------------------------------------------
/// creating screen shaders --------
...compiling screen shaders

...compiled 1 screen shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating portal shaders --------
...compiling portal shaders

...compiled 1 portal shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating toneMapping shaders --------
...compiling toneMapping shaders

...compiled 2 toneMapping shader permutations in 0.13 seconds
/// -------------------------------------------------
/// creating contrast shaders --------
...compiling contrast shaders

...compiled 1 contrast shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating cameraEffects shaders --------
...compiling cameraEffects shaders

...compiled 1 cameraEffects shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating blurX shaders --------
...compiling blurX shaders

...compiled 1 blurX shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating blurY shaders --------
...compiling blurY shaders

...compiled 1 blurY shader permutations in 0.00 seconds
/// -------------------------------------------------
/// creating debugShadowMap shaders --------
...compiling debugShadowMap shaders

...compiled 1 debugShadowMap shader permutations in 0.13 seconds
GLSL shaders load time = 25.22 seconds
------ Initializing Sound -----
loading libopenal.so.1
Allocated 96 sources.
OpenAL default capture device is 'PulseAudio Capture'
OpenAL capture device opened.

Using OpenAL sound backend

Sys_LoadDll(ui) found vmMain function at 0x80923570
--- Common Initialization Complete ---
IP: 127.0.0.1
IP: 127.0.0.2
IP: 192.168.1.101
IP6: ::1
Opening IP6 socket: [::]:27960
Opening IP socket: 0.0.0.0:27960
Segmentation fault

alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Re: Linux segmentation fault

Post by alphathreethree »

backtrace

Program received signal SIGSEGV, Segmentation fault.
0xb7c5ca92 in _nc_screen_resume_sp () from /lib/libncursesw.so.5
(gdb) bt
#0 0xb7c5ca92 in _nc_screen_resume_sp () from /lib/libncursesw.so.5
#1 0xb7c5d88b in _nc_screen_init_sp () from /lib/libncursesw.so.5
#2 0xb7c5d8af in _nc_screen_init () from /lib/libncursesw.so.5
#3 0xb7c4d7d0 in newterm_sp () from /lib/libncursesw.so.5
#4 0xb7c4da91 in newterm () from /lib/libncursesw.so.5
#5 0xb7c497e5 in initscr () from /lib/libncursesw.so.5
#6 0x0809ed43 in CON_Init ()
#7 0x08126e64 in emptystring ()
#8 0x080d9040 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

User avatar
Ishq
Project Head
Posts: 1147
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Linux segmentation fault

Post by Ishq »

EDIT: You posted backtrace as I was typing :(

Run the game with ./daemon.i386 +nocurses

GL_RENDERER: Mesa DRI R600 (RV630 9587) 20090101 x86/MMX/SSE2 TCL DRI2
Detected graphics driver class 'Mesa'

Try running with

Code: Select all

./daemon.i386 +set cl_renderer GL

Your graphic card (or drivers) may not be good enough to support the new drivers.

Try to install the open source radeon driver or Catalyst and recompile the game in debug mode (ccmake ... Change CMAKE_BUILD_TYPE from "Release" to "Debug")
Run it like this:

Code: Select all

gdb --args ./daemon.i386 +set cl_renderer GL3 +set in_nograb 1

and when it segfaults, you should see

Code: Select all

 
(gdb) 

There, you should type

Code: Select all

bt

This runs the game with gdb using the new renderer and doesn't grab the mouse so you can move it out in case something goes wrong.

Hope this helps.

alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Re: Linux segmentation fault

Post by alphathreethree »

I am having some issues getting the new video drivers intalled. I will work that issue tomorrow.
I recompiled with CURSES disabled and the game runs. Maybe its something with the version of ncurses I have. Running gdb with a Debug compile showed the error starts at sys_main.c:772 ... con_curses.c:509 ... then up the stack to libncursesw, ..etc.

The next problem I need to tackle is the fact that when I try to join a server is just sits there "waiting for gamestate".... thanks for your help though.

alphathreethree
Posts: 6
Joined: Thu Aug 30, 2012 2:47 am UTC

Re: Linux segmentation fault

Post by alphathreethree »

I installed the ATI drivers from their website, downloaded a fresh copy of the Unvanquished source and recompiled. When I run it now, it doesnt even get far very into the startup sequence.

Initializing OpenGL display
Estimated display aspect: 1.250
...setting mode -1: 1024 768
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 136 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 13
Current serial number in output stream: 13

Program exited with code 01.

------ Thanks for all your help. This looks like it might be a fun game, but I have reached my limit. I will try your game again maybe sometime in the future.

User avatar
Anomalous
Programmer
Posts: 318
Joined: Wed Mar 07, 2012 3:51 pm UTC

Re: Linux segmentation fault

Post by Anomalous »

I see no mention of reboot in there (‘easiest’ way to load fresh kernel taint and also have X restarted to reload any necessary GL-related server-side libs). Anyway, it looks like your X server is missing GLX support.

(My approach would be to dump the taint and use only the open-source drivers. Current kernel and mesa will cope with anything up to and including the HD6000 series, although less optimally; HD7000 is still very much work-in-progress.)

Debian and Ubuntu packages (squeeze, wheezy, sid; 12.04, 12.10, 13.04) may work on derivatives

OFFEND! … no, that's not right… ATTACK!

Post Reply