Author Topic: Linux: Segmentation Fault  (Read 5288 times)

0 Members and 1 Guest are viewing this topic.

Offline Jernix

  • 22
Linux: Segmentation Fault
Howdy,
I'm attempting to get fs2_open to work on my Fedora 19 workstation, but seem to be runnning into segfaults when attempting to run the actual game.

What I'm doing when segfault it seen:
1. cd to the freespace 2 directory
2. run fs2_open_<version> within that directory
3. game start up, I see a cutscene that I skip.
4. I get to the create pilot screen, I create one, and hit select which causes the game to exit with a segfault.

The fs2_open binary I am using is one I compiled from source using version 3.7.2_RC4. I have also tried the 3.7.0 with the same result.

Here is the output from the command in debug mode (i've hashed out my homedir):
Code: [Select]
# fs2_open_3.7.2_RC4_DEBUG
Future debug output directed to: /home/######/.fs2_open/data/fs2_open.log
ATTENTION: default value of option force_s3tc_enable overridden by environment.
Segmentation fault

Code: [Select]

I appreciate any help that could be provided. Let me know if I can provide more information
==========================================================================
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
Opened log '/home/######/.fs2_open/data/fs2_open.log', Fri Sep 19 11:41:20 2014 ...
FreeSpace 2 Open version: 3.7.2.10997
Passed cmdline options:
  <none>
Building file index...
Found root pack '/home/######/FreeSpace2-new/root_fs2.vp' with a checksum of 0xce10d76c
Found root pack '/home/######/FreeSpace2-new/smarty_fs2.vp' with a checksum of 0xddeb3b1e
Found root pack '/home/######/FreeSpace2-new/sparky_fs2.vp' with a checksum of 0x164fe65a
Found root pack '/home/######/FreeSpace2-new/sparky_hi_fs2.vp' with a checksum of 0xa11d56f1
Found root pack '/home/######/FreeSpace2-new/stu_fs2.vp' with a checksum of 0xd77da83a
Found root pack '/home/######/FreeSpace2-new/tango1_fs2.vp' with a checksum of 0x4c25221e
Found root pack '/home/######/FreeSpace2-new/tango2_fs2.vp' with a checksum of 0x86920b82
Found root pack '/home/######/FreeSpace2-new/tango3_fs2.vp' with a checksum of 0x705e8d71
Found root pack '/home/######/FreeSpace2-new/warble_fs2.vp' with a checksum of 0xd85c305d
Searching root '/home/######/.fs2_open/' ... 0 files
Searching root '/home/######/FreeSpace2-new/' ... 14 files
Searching root pack '/home/######/FreeSpace2-new/root_fs2.vp' ... 157 files
Searching root pack '/home/######/FreeSpace2-new/smarty_fs2.vp' ... 10 files
Searching root pack '/home/######/FreeSpace2-new/sparky_fs2.vp' ... 3027 files
Searching root pack '/home/######/FreeSpace2-new/sparky_hi_fs2.vp' ... 1337 files
Searching root pack '/home/######/FreeSpace2-new/stu_fs2.vp' ... 2355 files
Searching root pack '/home/######/FreeSpace2-new/tango1_fs2.vp' ... 32 files
Searching root pack '/home/######/FreeSpace2-new/tango2_fs2.vp' ... 15 files
Searching root pack '/home/######/FreeSpace2-new/tango3_fs2.vp' ... 10 files
Searching root pack '/home/######/FreeSpace2-new/warble_fs2.vp' ... 52 files
Found 11 roots and 7009 files.
ERROR: Unknown Language Checksum: 589986744
Using default language settings...
Setting language to English
Game Settings Table: Using Standard Loops For SEXP Arguments
Game Settings Table: Using standard event chaining behavior
Game Settings Table: External shaders are DISABLED
Initializing OpenAL...
  OpenAL Vendor     : OpenAL Community
  OpenAL Renderer   : OpenAL Soft
  OpenAL Version    : 1.1 ALSOFT 1.15.1

  Found extension "AL_EXT_float32".
  Found extension "ALC_EXT_EFX".

  Sample rate: 44100 (44100)
  EFX enabled: NO
  Playback device: Built-in Audio Analog Stereo
  Capture device: Built-in Audio Analog Stereo
... OpenAL successfully initialized!
Failed to init speech
Initializing OpenGL graphics device at 640x480 with 16-bit color...
  Initializing SDL...
  Requested SDL Video values = R: 5, G: 6, B: 5, depth: 16, stencil: 1, double-buffer: 1, FSAA: 0
  Actual SDL Video values    = R: 8, G: 8, B: 8, depth: 24, stencil: 8, double-buffer: 1, FSAA: 0
  OpenGL Vendor    : Intel Open Source Technology Center
  OpenGL Renderer  : Mesa DRI Intel(R) Ivybridge Mobile
  OpenGL Version   : 3.0 Mesa 9.2.4

  Using extension "GL_EXT_fog_coord".
  Using extension "GL_ARB_multitexture".
  Using extension "GL_ARB_texture_env_add".
  Using extension "GL_ARB_texture_compression".
  Using extension "GL_EXT_texture_compression_s3tc".
  Using extension "GL_EXT_texture_filter_anisotropic".
  Using extension "GL_ARB_texture_env_combine".
  Using extension "GL_EXT_compiled_vertex_array".
  Using extension "GL_EXT_draw_range_elements".
  Using extension "GL_ARB_texture_mirrored_repeat".
  Using extension "GL_ARB_texture_non_power_of_two".
  Using extension "GL_ARB_vertex_buffer_object".
  Using extension "GL_ARB_pixel_buffer_object".
  Using extension "GL_SGIS_generate_mipmap".
  Using extension "GL_EXT_framebuffer_object".
  Using extension "GL_ARB_texture_rectangle".
  Using extension "GL_EXT_bgra".
  Using extension "GL_ARB_texture_cube_map".
  Using extension "GL_EXT_texture_lod_bias".
  Using extension "GL_ARB_point_sprite".
  Using extension "GL_ARB_shading_language_100".
  Using extension "GL_ARB_shader_objects".
  Using extension "GL_ARB_vertex_shader".
  Using extension "GL_ARB_fragment_shader".
  Using extension "GL_ARB_shader_texture_lod".
  Using extension "GL_ARB_texture_float".
  Using extension "GL_ARB_draw_elements_base_vertex".
  Found special extension function "glXSwapIntervalSGI".

Compiling new shader:
   Loading built-in default shader for: soft-v.sdr
   Loading built-in default shader for: soft-f.sdr
Shader features:
   Depth-blended Particles
Compiling new shader:
   Loading built-in default shader for: soft-v.sdr
   Loading built-in default shader for: soft-f.sdr
Shader features:
   Distorted Particles

  Max texture units: 8 (16)
  Max elements vertices: 3000
  Max elements indices: 3000
  Max texture size: 8192x8192
  Max render buffer size: 8192x8192
  Can use compressed textures: YES
  Texture compression available: YES
  Post-processing enabled: NO
  Using trilinear texture filter.
  OpenGL Shader Version: 1.30
... OpenGL init is complete!
Size of bitmap info = 816 KB
Size of bitmap extra info = 48 bytes
ANI cursorweb with size 24x24 (25.0% wasted)
GRAPHICS: Initializing default colors...
SCRIPTING: Beginning initialization sequence...
SCRIPTING: Beginning Lua initialization...
LUA: Opening LUA state...
LUA: Initializing base Lua libraries...
LUA: Beginning ADE initialization
ADE: Initializing enumeration constants...
ADE: Assigning Lua session...
SCRIPTING: Beginning main hook parse sequence....
Wokka!  Error opening file (scripting.tbl)!
TABLES: Unable to parse 'scripting.tbl'!  Error code = 5.
SCRIPTING: Inititialization complete.
SCRIPTING: Splash screen overrides checked
SCRIPTING: Splash hook has been run
SCRIPTING: Splash screen conditional hook has been run
Using high memory settings...
Wokka!  Error opening file (interface.tbl)!
WMCGUI: Unable to parse 'interface.tbl'!  Error code = 5.
Dutifully ignoring the extra sound values for retail sound 36, 'l_hit.wav'...
Dutifully ignoring the extra sound values for retail sound 37, 'm_hit.wav'...
No joysticks found
Current soundtrack set to -1 in event_music_reset_choices
Wokka!  Error opening file (armor.tbl)!
TABLES: Unable to parse 'armor.tbl'!  Error code = 5.
ANI support1 with size 108x24 (25.0% wasted)
ANI damage1 with size 148x25 (21.9% wasted)
ANI wingman1 with size 71x53 (17.2% wasted)
ANI wingman2 with size 35x53 (17.2% wasted)
ANI wingman3 with size 14x53 (17.2% wasted)
ANI toggle1 with size 57x20 (37.5% wasted)
ANI head1 with size 164x132 (48.4% wasted)
ANI weapons1 with size 126x20 (37.5% wasted)
ANI objective1 with size 149x21 (34.4% wasted)
ANI netlag1 with size 29x30 (6.2% wasted)
ANI targhit1 with size 31x21 (34.4% wasted)
ANI time1 with size 47x23 (28.1% wasted)
ANI targetview1 with size 137x156 (39.1% wasted)
ANI targetview2 with size 4x96 (25.0% wasted)
ANI targetview3 with size 7x20 (37.5% wasted)
ANI energy2 with size 54x60 (6.2% wasted)
ANI leftarc with size 64x157 (38.7% wasted)
ANI rightarc1 with size 64x156 (39.1% wasted)
ANI toparc3 with size 25x18 (43.8% wasted)
ANI lock1 with size 35x33 (48.4% wasted)
ANI lockspin with size 63x63 (1.6% wasted)
ANI energy1 with size 12x41 (35.9% wasted)
ANI radar1 with size 130x106 (17.2% wasted)
loading animated cursor "cursor"
ANI cursor with size 24x24 (25.0% wasted)
Ships.tbl is : VALID
Weapons.tbl is : VALID
cfile_init() took 63
MVE: Buffer underun (First is normal)
Got event GS_EVENT_GAME_INIT (49) in state NOT A VALID STATE (0)
PLR => Loading 'Jeryia.plr' with version 2...
PLR => Parsing:  Flags...
PLR => Parsing:  Info...
PLR => Parsing:  Scoring...
PLR => Parsing:  ScoringMulti...
PLR => Parsing:  HUD...
PLR => Parsing:  Variables...
PLR => Parsing:  Multiplayer...
PLR => Parsing:  Controls...
PLR => Parsing:  Settings...
PLR => Loading complete!
PLR => Verifying 'Jeryia.plr' with version 2...
PLR => Parsing:  Flags...
PLR => Parsing:  Info...
PLR => Verifying complete!
ANI cursor.ani with size 24x24 (25.0% wasted)
PLR => Verifying 'Jeryia.plr' with version 2...
PLR => Parsing:  Flags...
PLR => Parsing:  Info...
PLR => Verifying complete!
Got event GS_EVENT_MAIN_MENU (0) in state GS_STATE_INITIAL_PLAYER_SELECT (37)
PLR => Loading 'Jeryia.plr' with version 2...
PLR => Parsing:  Flags...
PLR => Parsing:  Info...
PLR => Parsing:  Scoring...
PLR => Parsing:  ScoringMulti...
PLR => Parsing:  HUD...
PLR => Parsing:  Variables...
PLR => Parsing:  Multiplayer...
PLR => Parsing:  Controls...
PLR => Parsing:  Settings...
PLR => Loading complete!
CSG => Loading 'Jeryia.FreeSpace2.csg' with version 5...
CSG => Parsing:  Flags...
CSG => Parsing:  Info...
CSG => Parsing:  Missions...
CSG => Parsing:  Techroom...
CSG => Parsing:  Loadout...
CSG => Parsing:  Scoring...
CSG => Parsing:  RedAlert...
CSG => Parsing:  HUD...
CSG => Parsing:  Variables...
CSG => Parsing:  Settings...
CSG => Parsing:  Controls...
CSG => Parsing:  Cutscenes...
CSG => Parsing:  Last Missions...
CSG => Loading complete!
CSG => Loading 'Jeryia.FreeSpace2.csg' with version 5...
CSG => Parsing:  Flags...
CSG => Parsing:  Info...
CSG => Parsing:  Missions...
CSG => Parsing:  Techroom...
CSG => Parsing:  Loadout...
CSG => Parsing:  Scoring...
CSG => Parsing:  RedAlert...
CSG => Parsing:  HUD...
CSG => Parsing:  Variables...
CSG => Parsing:  Settings...
CSG => Parsing:  Controls...
CSG => Parsing:  Cutscenes...
CSG => Parsing:  Last Missions...
CSG => Loading complete!
ANI mainwalk.ani with size 127x297 (42.0% wasted)
ANI mainflyby.ani with size 315x116 (9.4% wasted)
ANI maincrane.ani with size 117x73 (43.0% wasted)
ANI mainexit.ani with size 203x110 (14.1% wasted)
ANI mainbarracks.ani with size 163x105 (18.0% wasted)
ANI mainreadyroom.ani with size 139x86 (32.8% wasted)
ANI mainoptions.ani with size 207x131 (48.8% wasted)
ANI maincampaign.ani with size 200x124 (3.1% wasted)

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Linux: Segmentation Fault
The fs2_open binary I am using is one I compiled from source using version 3.7.2_RC4.
Do you get the same thing if you compile latest trunk instead?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Jernix

  • 22
Re: Linux: Segmentation Fault
I can't get the latest trunk to compile.
When running ./autogen.sh I get
Code: [Select]
./autogen.sh
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

processing .
Running autoreconf...
code/Makefile.am:196: error: library used but 'RANLIB' is undefined
code/Makefile.am:196:   The usual way to define 'RANLIB' is to add 'AC_PROG_RANLIB'
code/Makefile.am:196:   to 'configure.ac' and run 'autoconf' again.
mongoose/Makefile.am:5: error: library used but 'RANLIB' is undefined
mongoose/Makefile.am:5:   The usual way to define 'RANLIB' is to add 'AC_PROG_RANLIB'
mongoose/Makefile.am:5:   to 'configure.ac' and run 'autoconf' again.
autoreconf: automake failed with exit status: 1

Adding AC_PROG_RANLIB to configure.ac gets me a little farther, but the ./configure does not look healthy spewing lots of the below lines.
Code: [Select]
./configure: line 2376: as_fn_executable_p: command not found

the make afterwords just dies with:
Code: [Select]
make
Making all in mongoose
make[1]: Entering directory `/home/######/rpmbuild/SOURCES/fs2_open/mongoose'
make[1]: *** No rule to make target `mongoose.', needed by `libmongoose.a'.  Stop.
make[1]: Leaving directory `/home/######/rpmbuild/SOURCES/fs2_open/mongoose'
make: *** [all-recursive] Error 1

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Linux: Segmentation Fault
I feel like I'm unconsciously to blame. :nervous:

 

Offline Jernix

  • 22
Re: Linux: Segmentation Fault
I feel like I'm unconsciously to blame. :nervous:

Well, let me know when you think you have it fixed and I'll give it a shot. broken code happens.

 
Re: Linux: Segmentation Fault
He's joking, he has nothing to do with the code. Anyway, I can say with pretty great confidence that this isn't a code problem, it's something out of place in your build environment. Tracking that down is the priority here.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Jernix

  • 22
Re: Linux: Segmentation Fault
Ok, I've got the compilation issue fixed.

Adding the below to the configure.ac fixes it:
Code: [Select]
AC_PROG_RANLIB=`which ranlib`


However, with the latest trunk I still get the segfault at the same point. Though I'm a bit confused as the latest trunk reports itself as version 3.7.1.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Linux: Segmentation Fault
I've got a couple of suggestions:

1) To build the latest trunk, make sure you have "libtool" installed.  I changed the configure.ac recently to use libtool based on an IRC request where someone wanted do ... um... something (can't remember the details) with LTO builds. Anyway, this suggests that the F19 package name is just libtool (I don't have a Fedora box handy to check though).  If that doesn't work; try reverting SVN commit r11072 and see if that works.

(although I see from your latest post that you've found a different workaround)

2) Regarding the original crash, I note that you're using the OpenSource Intel driver.  Unfortunately FSO support for these isn't the best. You could try adding one of these commandline options to see if they'll let FSO run correctly.

-disable_pbo (this was added to workaround a specific i965 (IIRC) driver issue)
-no_glsl (disables shaders and reverts to the OGL ~1.2 fixed function render pipeline)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Linux: Segmentation Fault
Though I'm a bit confused as the latest trunk reports itself as version 3.7.1.
"3.7.1" means "any trunk build between 3.7.0 Final and 3.7.2 Final". Since 3.7.2 is still in the "Release Candidate" stage, trunk is still 3.7.1; after 3.7.2 Final gets released, trunk will become "3.7.3" until 3.7.4 Final gets released.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Linux: Segmentation Fault
You could install valgrind and run valgrind ./fs2_open_<version> to get more information on the segfault.

 

Offline Echelon9

  • 210
Re: Linux: Segmentation Fault
Or 'gdb fs2_open_<version>' then press 'r' and then 'bt' when it segfaults.
If you don't see references to cpp file names and line numbers, you may need to re compile a debug version

 

Offline Jernix

  • 22
Re: Linux: Segmentation Fault
Howdy,
With the mention of the intel graphics set, I decided to try to run on my actual desktop (I was compiling and testing on my laptop). Everything seems to be working fine. Thanks, I think I'm set.

 
Re: Linux: Segmentation Fault
I know this hasn't been posted to in some time. However, I have a contribution to make. I am getting this same crash when compiling from source on linux right after the mainhall loads. -no_glsl did nothing, but -no_pbo fixed it. This was with no mod loaded, not even the media vps. Got an i915gm here and I'm also using the open source driver for it, which the console reports that it fails to load.

Is there a closed source intel video driver somewhere that works better than the MesaGL drivers?
There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline Echelon9

  • 210
Re: Linux: Segmentation Fault
These days Intel on Linux is the open source Mesa driver for all intents. There isn't a separate proprietary one.

That said, would you be interested in helping me debug why it is crashing on Mesa's Intel i915?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Linux: Segmentation Fault
Is this the same mesa crash we've been discussing in #scp?  Is the -no_pbo fixing the crash a new development then?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays