Compiled From Source Crashes Immediately With Error

For all the help you need with Armagetron!
Post Reply
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

This post is a continuation of my other post talking about my compilation process (link here: http://forums3.armagetronad.net/viewtop ... 49&t=24631).

Before you read this post, let me be clear that I have found other articles with similar issues but have yet been unable to implement / find a working solution.
I am running OS-X 10.11 and have just compiled the stable branch of the 0.2.8 client from Launchpad. Now when I try to execute the binary I get this error message:

(In 0.2.8/build directory)

Code: Select all

> ./src/armagetronad_main
Internal Error: Internal error in static tLanguage *tLanguage::FindStrict(const tString &) in ../../src/tools/tLocale.cpp:152 :
       	Language British English not found.
Please send a Bug report!
Error: Error in int SDL_main(int, char **) in ../../src/tron/gArmagetron.cpp:661 :
       	Configuration files not found. Check your installation.

[1]    45787 segmentation fault  ./src/armagetronad_main
or

Code: Select all

> ./src/armagetronad_main --configdir ../config
Internal Error: Internal error in static tLanguage *tLanguage::FindStrict(const tString &) in ../../src/tools/tLocale.cpp:152 :
       	Language British English not found.
Please send a Bug report!
[1]    45826 segmentation fault  ./src/armagetronad_main --configdir ../config
Not sure if I'm starting it up wrong (i.e in the wrong directory, need different parameters) or if this was an issue during the compilation process.

I'm happy to post more code/output as needed. My configuration code was as follows:
(in 0.2.8/build directory)

Code: Select all

../configure --with-os-x-toolkit=../../os-x-toolkit
Thanks for the help,
Tim
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Compiled From Source Crashes Immediately With Error

Post by Lucifer »

I feel like this is an issue with how you're doing the build. I don't believe the autotools build system is supported in mac OS X of any variety and that you need to use XCode.

Have you looked around to see if there's an XCode project for it?

(It is called XCode, right? I forget)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Re: Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

Hey Lucifer,

Yeah I have tried an Xcode build before but I ran into too many bugs too handle. I read somewhere on this forum that the Xcode project was no longer being maintained and that a "unix-like" build off of source was the way to go.

You bring up a good point about the autotools. I did have them but perhaps they are outdated and an update is warranted.

One last thing, on another forums thread Z-man mentioned that this issue is just the first error that will occur after an improper build.

Edit: Updating autotools didn't help :(
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Compiled From Source Crashes Immediately With Error

Post by Z-Man »

The error basically means that AA can't find its data files, the BE language file is just the test case.Can you post the directory structure you have now, where the armagetronad executable is and what the current directory is when you call it? It can be that simply calling it from a different directory works. I think you're not supposed to call it from the src subdirectory, but one level up.
Could also be that on the Mac in this build, data file generation fails silently.
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Re: Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

Like you said, I was trying to execute the binary from the build directory (not src). The errors above were from that.

Directory Tree looks like this (cd'd into 0.2.8):
> tree -d
.
├── MacOS
│   ├── Armagetron\ Advanced.xcodeproj
│   ├── Armagetron.pbproj
│   └── build_tools
├── autom4te.cache
├── batch
│   └── make
├── build
│   ├── batch
│   ├── config
│   ├── desktop
│   ├── language
│   ├── resource
│   │   └── included
│   │   ├── AATeam
│   │   ├── Anonymous
│   │   │   └── polygon
│   │   │   └── regular
│   │   ├── Your_mom
│   │   │   └── clever
│   │   └── Z-Man
│   │   └── fortress
│   └── src
│   ├── doc
│   │   └── net
│   ├── engine
│   ├── first
│   ├── network
│   ├── render
│   ├── thirdparty
│   │   ├── binreloc
│   │   └── particles
│   ├── tools
│   ├── tron
│   └── ui
├── config
│   └── examples
│   ├── cvs_test
│   └── scripts
├── desktop
│   └── icons
│   ├── large
│   ├── medium
│   └── small
├── language
├── models
├── resource
│   └── proto
│   ├── AATeam
│   ├── Anonymous
│   │   ├── original
│   │   ├── polygon
│   │   │   └── regular
│   │   └── shapes
│   ├── Luke-Jr
│   │   └── n-gon
│   ├── Your_mom
│   │   ├── inaktek
│   │   └── repeat
│   └── Z-Man
├── scripts
│   └── examples
├── sound
├── src
│   ├── doc
│   │   ├── Content_Creation
│   │   └── net
│   ├── engine
│   ├── first
│   ├── macosx
│   │   ├── English.lproj
│   │   ├── client
│   │   └── dedicated
│   ├── network
│   ├── render
│   ├── test
│   ├── thirdparty
│   │   ├── binreloc
│   │   ├── particles
│   │   └── shttpd
│   ├── tools
│   ├── tron
│   ├── ui
│   ├── win32
│   └── win32_ded
├── textures
└── www-root

Thanks for the help
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Compiled From Source Crashes Immediately With Error

Post by Lucifer »

Ok, looking over your previous posts, I'm seeing that you're executing from the wrong directory. Try:

cd build
../src/armagetronad_main

See what that does for you. The generated config file directory is under "build", I believe, but you're executing it from the root directory, so the generated config files aren't being found. Your other command line, passing --configdir to it, simply gives the wrong path to the config directory. There's no place you can have as your current directory where ../config will be a valid path to config files, except, I suppose, for when you're actually under config.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Compiled From Source Crashes Immediately With Error

Post by Z-Man »

The directory structure looks all right. I was concerned that you built it INSIDE the source branch, but for me that makes no problems.
The ./src/armagetronad_main call is also all right. You could also use 'make run'.
I think the reason it does not find its data files is simple: There are a lot of blocks of code in src/tools/tDirectories.cpp disabled via #ifndef MACOSX. They're the bits responsible for finding the data files that are distributed between the build directory (stuff that needed processing) and the source directory (stuff that we can use verbatim). They're turned off because the Mac build is supposed to run from a directory structure prepared for app bundling or the bundle itself, which is something the XCODE build makes, and that structure has everything in one place.

Two possible fixes:
1. Don't build from the build subdirectory, build from the top source directory. Do

Code: Select all

./configure <your osx stuff>
make run
there. If the tDirectories.cpp special codes are your only problem, that should work (tested by adding a '#define MACOSX' at the top of that file), because after the build, all the files are together in one hierarchy.

2. Put '#undef MACOSX' into src/tools/tDirectories.cpp, near the top, between the last '#include' and before the first '#ifndef MACOSX'. Only for that file. The other '#if(n)def MACOSX' blocks in other files all have real OSX related purposes. That should enable the multiple search paths.

Lucifer: His whole build sequence, with the source dir being 'armagetronad', must have been something like

Code: Select all

cd armagetronad
mkdir build
cd build
../configure <stuff>
make
Where the usual procedure would be (well, what I always do, anyway)

Code: Select all

mkdir build
cd build
../armagetronad/configure
make
Either way, './src/armagetronad_main' would work on Linux. I always use 'make run' because that also creates a soft link to armagetronad_main in the top directory for later use.
User avatar
ConVicT
Shutout Match Winner
Posts: 1001
Joined: Fri Feb 17, 2012 2:33 am

Re: Compiled From Source Crashes Immediately With Error

Post by ConVicT »

I could be entirely wrong here but I feel like you guys are helping swag build his intrusive armagetron client.

What happened to LIttleStep's account?
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Re: Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

Okay just a quick update, I tried your method number 1 and it compiles and runs at least past the language error. As you can see, however, from the attached image something isn't quite being initialized properly. Can't read text but I was able to load into local player.

It starts the countdown to the start of the match but crashes as soon as the bike starts to move.

All it gives me is:

Code: Select all

Trying to start sound. Just restart Armagetron Advanced in case of crash.
Trying to start sound. Just restart Armagetron Advanced in case of crash.
[1]    20862 segmentation fault  armagetronad
Attachments
text is impossible to read. Graphics are getting jiggy with it
text is impossible to read. Graphics are getting jiggy with it
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Re: Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

Update 2:

Method 2 gave the same result with an identical error except for this (which seems unimportant):

Code: Select all

Trying to start sound. Just restart Armagetron Advanced in case of crash.

2016-08-18 23:30:14.932 armagetronad_main[28799:2114818] 23:30:14.932 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

[1]    28799 segmentation fault  ./src/armagetronad_main
I'm getting a bit tired of hacking at this but I am getting closer. In the meantime I'm working on fixing all the bugs with the xcode version.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Compiled From Source Crashes Immediately With Error

Post by Z-Man »

I know nothing about that sound driver issue. Or the weird graphics. For both, implementation details are handled by SDL. Maybe the graphics falls back to software rendering without proper informing us.

If you get a segfault, it would be time to turn to the debugger. First, you need to reconfigure the build: IIRC, you can just do

Code: Select all

DEBUGLEVEL=2 ../configure <your stuff>
make clean
make debug
And then, well, if it were Linux, you'd do

Code: Select all

gdb ./armagetronad
r
<wait for crash>
bt full
and post the output from the last command here.

You may be on your own from here; you're using different tools and library versions from me. If the crash is in our code, we may be able to do something.
Tim-Misny
Posts: 9
Joined: Sun Aug 02, 2015 6:01 pm

Re: Compiled From Source Crashes Immediately With Error

Post by Tim-Misny »

Z-Man wrote:You may be on your own from here; you're using different tools and library versions from me. If the crash is in our code, we may be able to do something.
Okay understood.

Thanks for the help man, I'll see what I can do from here with the gdb.
Maybe I'll try using some different library versions as well and hope for the best.
If it is a problem with the code I'll do my best to help out with solving the issue as well :).
Post Reply