SVN compiles but segfaults at splashscreen

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
HScoop
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sun Mar 04, 2007 5:18 pm

SVN compiles but segfaults at splashscreen

Post by HScoop »

I tried compiling the latest SVN using Ubuntu 6.10 according to the instructions in the Wiki. It compiled without much of a problem but when I try to run it, it crashes at the splashscreen with a segfault.

I'm having the same problem using the latest SVN and the last download version (10722), although the stable version did run without any problems, so I'm assuming I messed up compilation somehow - unfortunately I'm pretty clueless in that area... :(

I've attached the output of GDB and config.log, don't know if there's anything else you could use.
You do not have the required permissions to view the files attached to this post.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

So it's pretty clear that the crash is in TextPlane::Draw, hud.cpp:232

Code: Select all

  if (!use_bit) {
    scalex=(_Universe->numPlayers()>3?_Universe->numPlayers()/2:_Universe->numPlayers())*myFontMetrics.i/std_wid;
    scaley=myFontMetrics.j/(119.05+33.33);
  }
The only thing that would cause a crash in an accessor function like numPlayers() would be if _Universe is NULL.

Now, this happens to be the only place where it references _Universe, and it only happens if not using bitmap fonts. A NULL _Universe is an easy condition to check for, so I'll commit a fix with that.

Well I did just set high_quality_fonts to "false" in the config file, and immediately I got the crash... at some point, the loading order must have changed... not that this is a bad thing, since the sooner it can get a loading graphic up, the better.

Even more worrisome is that "svn blame" pointed out that I was the one who committed this very line of code almost 4 years ago...

Any way, I am committing the fix for this. Thanks for debugging this one.
HScoop
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sun Mar 04, 2007 5:18 pm

Post by HScoop »

Thanks for the quick response and fix - it works neatly now :)
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

I made the splash show sooner, so sorry, my bad.
I wasn't expecting an access to Universe for rendering text...
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

I'm glad you did that... that long delay before the splash screen has been the source of many complaints, bug reports and uninstalls.

The main reason it hadn't been done was because of all the calls to _Universe... I guess it turns out that there weren't as many as one would have thought.
Post Reply