Author Topic: Segmentation fault (core dumped) on starting  (Read 27512 times)

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Segmentation fault (core dumped) on starting
« on: June 10, 2016, 10:19:44 am »
Dear openxcom-people,

I'm on Xubuntu 15.10 (32-bit), and I got my copy of openxcom as well as the fixed libyaml-cpp from this launchpad: https://launchpad.net/~knapsu/+archive/ubuntu/openxcom. I've also installed the other dependencies mentioned in the installation instructions, as well as timidity (since I saw that someone else needed that). Then:

1. I got my copy of XCOM: UFO DEFENCE from Steam yesterday, and I downloaded and extracted your universal patch in the XCOM/ folder, replacing files as necessary. (Before this I tarballed a backup copy of the folder just in case).

2. I then first tried copying all the mentioned folders individually to the data folder ( /usr/share/openxcom in my case, not /usr/local/share/openxcom as in your example - but alas, starting the program with openxcom -data "/usr/share/openxcom/data" still yields segfault), keeping permissions, no go, then I copied the entire contents of the XCOM/ folder, still segfault, then I chmod 777 -R the entire /usr/share/openxcom/ folder just to make sure there where no permission problems, still segfault.

I seem to get no logfile (~/.local/share/openxcom/ is empty). What should I do now? I read about x-piratez on Rock Paper Shotgun and I would like to try it out.

Thanks!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #1 on: June 10, 2016, 11:01:05 am »
Hi,

if you are talking specifically about X-PirateZ, then you need to follow the X-PirateZ installation instructions.
They are different from just OpenXcom installation instructions.

1. download the game, link here: https://openxcom.org/forum/index.php/topic,3626.0.html
2. extract anywhere
3. copy the Steam data into the folder: "<X-pirateZ folder>/UFO" (please note copying them anywhere else will NOT work)
4. if you're on windows, just run the game (OpenXcomExPlus29.exe)

4a. if you're on Linux, you need to install pre-requisites too (see here: https://openxcom.org/forum/index.php/topic,4187.msg65619.html#msg65619)
Code: [Select]
sudo apt-get install libsdl1.2-dev libsdl-mixer1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libyaml-cpp-dev4b. if you have the newest version 0.99, try running the executable provided in the package (OpenXcomExPlusElf), if not then you can either build your own executable (see below) or download it from my thread (see below)

Important:
X-PirateZ runs on custom executable, it comes either bundled with the game (v0.99), or in this thread: https://openxcom.org/forum/index.php/topic,4187.0.html or you can compile it on your own (directions in the same thread)

Regards,
Meridian

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #2 on: June 10, 2016, 01:11:00 pm »
Hello!

Thats nice! Well, I fiddled around a bit. First I tried you instructions above, but executing your modified executable yields:

./OpenXcomExPlusElf: symbol lookup error: ./OpenXcomExPlusElf: undefined symbol: _ZN4YAML6detail9node_data12empty_scalarE

So then I tried it according to the Piratez installation instructions, ie after purging my openxcom i installed openxcom-extended, then copied user/ from piratez to /usr/share/openxcom/ as well as the UFO-folder with GEODATA etc. from the vanilla game to the same folder. NOW, starting openxcom brings me to the setup screen (hot damn that's some awesome music and graphics), where I set all the advanced options according to the piratez README as well as tweaked the resolution and filters and stuff nicely, then went to the MODS tab and selected x-piratez, enabled some of the mods (not the xutils one, I heard thats no good for linux?), but alas when I say AYE to start a new game on the easiest difficulty, crash:

libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
libpng warning: Out of place iCCP chunk
Segmentation fault (core dumped)

In this thread I found something similar, but I cannot figure out how it relates to my problem. Any ideas?

Thank you for your speedy answer!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #3 on: June 10, 2016, 01:59:16 pm »
So then I tried it according to the Piratez installation instructions, ie after purging my openxcom i installed openxcom-extended, then copied user/ from piratez to /usr/share/openxcom/ as well as the UFO-folder with GEODATA etc. from the vanilla game to the same folder.

Where did you find these instructions?
I am not aware of anything like this...

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #4 on: June 10, 2016, 02:07:08 pm »
Where did you find these instructions?
I am not aware of anything like this...

Oh? I found them in the archive, OpenXcom_XPiratez/XPiratez readme/OXCE_Readme.txt and XPiratez_readme.txt .

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #5 on: June 10, 2016, 02:08:38 pm »
Oh? I found them in the archive, OpenXcom_XPiratez/XPiratez readme/OXCE_Readme.txt and XPiratez_readme.txt .

Oh, I see it now, in "XPiratez_readme.txt"... well, this is unfortunately too old/obsolete, X-PirateZ runs on OpenXcom-Extended-Plus now... the OpenXcom-Extended, which you have probably downloaded from mod portal will not work correctly. I'm afraid you'll need to follow my instructions above... and if the precompiled executable doesn't work for you, try talking to people who are compiling it themselves: Yankes, Arthanor, etc. Hopefully one of them will be able to respond here too.

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #6 on: June 10, 2016, 02:44:15 pm »
Oh, I see it now, in "XPiratez_readme.txt"... well, this is unfortunately too old/obsolete, X-PirateZ runs on OpenXcom-Extended-Plus now... the OpenXcom-Extended, which you have probably downloaded from mod portal will not work correctly. I'm afraid you'll need to follow my instructions above... and if the precompiled executable doesn't work for you, try talking to people who are compiling it themselves: Yankes, Arthanor, etc. Hopefully one of them will be able to respond here too.

Right, well, I will do my best. I tried running the .exe in Wine (why not), it opens the first loadingscreen, but gets stuck at "Loading openxcom-extended-plus 2016...." or something like it. Too bad!

I also tried your modified linux executable as said, with the above cryptic error. Any ideas on that? Otherwise...

Hey, Yankes, Arthanor! (should I start a new thread somewhere?)

I am trying to compile myself now, according to these instructions: https://www.ufopaedia.org/index.php?title=Compiling_with_CMake_%28OpenXcom%29#End-to-end_example
First I hade the wrong version of libyaml-cpp, I got the right one from this launchpad: https://launchpad.net/~winterheart/+archive/ubuntu/openxcom
Now cmake does fine, but make gives me this:

Spoiler:
Scanning dependencies of target openxcom
[  0%] [  0%] [  0%] [  0%] [  0%] [  1%] [  1%] [  2%] [  3%] [  3%] Building CXX object src/CMakeFiles/openxcom.dir/main.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/BaseInfoState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/CraftArmorState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/BasescapeState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/lodepng.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/CraftEquipmentState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/BaseView.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/BuildFacilitiesState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/CraftSoldiersState.cpp.o
Building CXX object src/CMakeFiles/openxcom.dir/Basescape/CraftInfoState.cpp.o
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/BaseInfoState.cpp:24:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:100: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/BaseInfoState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/BaseInfoState.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/CraftArmorState.cpp:21:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:192: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/CraftArmorState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/CraftArmorState.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Engine/OptionInfo.h:20,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Engine/Options.h:23,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/main.cpp:24:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/BasescapeState.cpp:21:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:77: recipe for target 'src/CMakeFiles/openxcom.dir/main.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/main.cpp.o] Error 1
src/CMakeFiles/openxcom.dir/build.make:146: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/BasescapeState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/BasescapeState.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/CraftSoldiersState.cpp:23:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:261: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/CraftSoldiersState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/CraftSoldiersState.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Savegame/Target.h:22,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Savegame/Base.h:20,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/BaseView.cpp:25:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:123: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/BaseView.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/BaseView.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/BuildFacilitiesState.cpp:21:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:169: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/BuildFacilitiesState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/BuildFacilitiesState.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/CraftInfoState.cpp:23:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:238: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/CraftInfoState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/CraftInfoState.cpp.o] Error 1
In file included from /usr/include/yaml-cpp/node/node.h:17:0,
                 from /usr/include/yaml-cpp/yaml.h:16,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/../Mod/Mod.h:24,
                 from /home/simon/games/openxcom_sandbox/openxcom/src/Basescape/CraftEquipmentState.cpp:27:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/openxcom.dir/build.make:215: recipe for target 'src/CMakeFiles/openxcom.dir/Basescape/CraftEquipmentState.cpp.o' failed
make[2]: *** [src/CMakeFiles/openxcom.dir/Basescape/CraftEquipmentState.cpp.o] Error 1
CMakeFiles/Makefile2:90: recipe for target 'src/CMakeFiles/openxcom.dir/all' failed
make[1]: *** [src/CMakeFiles/openxcom.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error

So it seems boost/shared_ptr.hpp is missing? So I search for topics on that, I find this: https://openxcom.org/forum/index.php/topic,2434.msg24474.html#msg24474. I can't really make out how I am supposed to solve this issue (if its even the same?),

Following on from what SupSuper says, It also probably bears mentioning that depending on which version of yaml-cpp you've download you may need to change the names of the dependencies (in Properties->Configuration Properties->Linker->Input->Additional Dependencies) for your release and debug configurations.

In the new version of yaml-cpp the libraries are called libyaml-cppmd.lib (for release) and libyaml-cppmdd.lib (for debug)
OK, so I'm not sure how to do that. Or if I should. Help?
« Last Edit: June 10, 2016, 02:46:20 pm by buenaventura »

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #7 on: June 10, 2016, 02:57:28 pm »
AHA! This instruction was more comprehensive, I was missing some dependencies it seems, libboost-dev. Now building!

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #8 on: June 10, 2016, 03:07:38 pm »
Wait, why am I compiling openxcom-extended from source now again? ... I got it working anyhow, so now I can play openxcom (I tried it, works fine it seems, including starting a game)! BUT. I cannot play Piratez anyway can I ?  :(

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #9 on: June 10, 2016, 03:10:15 pm »
AHA! This instruction was more comprehensive, I was missing some dependencies it seems, libboost-dev. Now building!

libboost-dev is required only for vanilla OpenXcom

OpenXcom-Extended and OpenXcom-Extended-Plus... which is what you need... don't have a dependency on Boost anymore... but feel free to experiment, I'm sure you'll figure it out eventually

Wait, why am I compiling openxcom-extended from source now again? ... I got it working anyhow, so now I can play openxcom (I tried it, works fine it seems, including starting a game)! BUT. I cannot play Piratez anyway can I ?  :(

Again, if you want to play PirateZ, you need OpenXcom-Extended-Plus...
If you want to play just normal xcom game, OpenXcom is enough.
« Last Edit: June 10, 2016, 03:13:04 pm by Meridian »

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #10 on: June 10, 2016, 03:14:56 pm »
libboost-dev is required only for vanilla OpenXcom

OpenXcom-Extended and OpenXcom-Extended-Plus... which is what you need... don't have a dependency on Boost anymore... but feel free to experiment, I'm sure you'll figure it out eventually

Hum, well, perhaps I should first try compiling your special executable like you said. But where are these instructions? :
X-PirateZ runs on custom executable, it comes either bundled with the game (v0.99), or in this thread: https://openxcom.org/forum/index.php/topic,4187.0.html or you can compile it on your own (directions in the same thread)

I sure can't find them in that thread.

Otherwise, do you have  a link to a guide for compiling/getting openxcom-extended-plus, and the putting some Piratez on it?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #11 on: June 10, 2016, 03:20:02 pm »
But where are these instructions?

I don't provide any official instructions, because I am not a linux guru.
But I do compile under Kubuntu 14.0 using these steps (and a few people have confirmed it is working for them too): https://openxcom.org/forum/index.php/topic,4187.msg65619.html#msg65619

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #12 on: June 10, 2016, 03:21:53 pm »
At the end of the first thread he posted, Meridian's extra resources for XPiratez, there are some instructions from a few of us who compiled his custom executable.  Basically, download his source code, and make using the Makefile.simple in the src/ subfolder of his code.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #13 on: June 10, 2016, 03:25:09 pm »
Link for great justice: https://openxcom.org/forum/index.php/topic,4187.600.html

Edit: Follow Meridian's link, it'll point you straight to the post and he found it before I did.  It works for Ubuntu 14.04 LTS in my case.
« Last Edit: June 10, 2016, 03:29:05 pm by ohartenstein23 »

Offline buenaventura

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: Segmentation fault (core dumped) on starting
« Reply #14 on: June 10, 2016, 03:33:05 pm »
Thanks both of you, I am now compiling that. So the plan when it's done is to copy the executable into the 0.99 piratez-folder (which includes vanilla files from xcom:ufo defence i copied there) and try running it from there?

I guess someone should delete/replace that readme-folder in the archive as well as change this wiki page to remove all those instructions if they are not correct. It is very tempting to believe they are!

Edit:
OK, compilation done. What now? Where is the executable?
« Last Edit: June 10, 2016, 03:46:37 pm by buenaventura »