project-navigation
Personal tools

Author Topic: 2.3 Finally compiles but crash on trying to start a game  (Read 5869 times)

ElVino

  • Guest
2.3 Finally compiles but crash on trying to start a game
« on: February 20, 2009, 11:42:39 pm »
Hi,

I've finally been able to compile 2.3 sucessfully after many many jumps through hoops and I've fired it up for the first time... It goes up to the main window but once I try to start a game, it quits without an error message or anything... Is there any way I can get more info as to what happened ?  I looked inside the console log and nothing seemed to be output there and I can't figure out what was the cause.  It was not a "Unexpectedly quit" thing with a finder error message; just a clean exit.

Any hints ?  Anyone had that happen and figured a way ?  Is there a break in the current code ? (I got revision 22808)


Any help is welcomed.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #1 on: February 21, 2009, 12:54:59 am »
Did you run it from commandline? Plz, try if didn't. Also with these aparameters it gives more info:
Code: [Select]
ufo +set developer 1
-geever

ElVino

  • Guest
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #2 on: February 21, 2009, 03:47:49 pm »
I hadn't yet but now I did and I got a lot more feedback than I did though i'm not too sure what to do about it considering i'm not very familiar with the code yet.  While I'm trying to understand something, i thought I'd report about it here a bit.  I'll also include a transcript of the whole terminal output with the "+set developer 1" option set for more info if anyone wants.

Basically, the failing part is described as :
| Error: RS_AssignTechLinks: Could not get item definition for 'craft_alien_astrogation'

Or, in the developer 1 version as :
| INVSH_GetItemByID: Item "craft_alien_astrogation" not found.
| Wrote keys.cfg
| ufo(31554,0xa0362fa0) malloc: *** mmap(size=1292414976) failed (error code=12)
| *** error: can't allocate region
| *** set a breakpoint in malloc_error_break to debug
| ufo(31554,0xa0362fa0) malloc: *** error for object 0xe43e5e0: Non-aligned pointer being freed (2)
| *** set a breakpoint in malloc_error_break to debug
and the game doesn't actually quit but freezes.. not to sure how to interact with the debugging break that's been initiated but i guess it's waiting for me to do something about it...

Any help or pointers while i do my best figuring out a way ?




[attachment deleted by admin]

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #3 on: February 21, 2009, 09:31:50 pm »
How much memory you have? (also how big the page/swapfile can be?)

ps. note I don't know mac well.

-geever

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #4 on: February 21, 2009, 09:34:36 pm »
Oh, missed this:
Quote
| ufo(31554,0xa0362fa0) malloc: *** mmap(size=1292414976) failed (error code=12)
It wanted to alloc more that 1G, strange...

-geever

ElVino

  • Guest
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #5 on: February 22, 2009, 05:26:37 pm »
I've compiled both on a 2gig ram and a 1.5gig ram machine both to the same result... It might also be worth mentioning that I've compiled on both a Intel based and a PPC based machine and the results are the same.

Are people able to compile on a mac without getting this malloc error as it stand or is it a temporary break in the code ?

Offline tchristney

  • Rookie
  • ***
  • Posts: 75
    • View Profile
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #6 on: February 22, 2009, 06:45:25 pm »
Try making a new ufoai configuration/preferences directory, i.e. move (mv) ~/.ufoai to another location before starting the game. If that doesn't work, run an 'svn up' followed by 'make clean' and 'make'.

I am on a MacBook Pro, Core 2 Duo, OS X 10.5.6 and everything works just fine, other than known problems with pathfinding, etc.
« Last Edit: February 22, 2009, 09:14:39 pm by tchristney »

ElVino

  • Guest
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #7 on: February 23, 2009, 10:47:44 pm »
Tried... with no success :(  I'm not sure what causes that...

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #8 on: February 25, 2009, 10:00:58 pm »
It can be very usefull if you can run the game with a debugger, and provide a backtrace.

ElVino

  • Guest
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #9 on: February 26, 2009, 12:57:59 am »
I'm not exactly sure as to how I should go about doing that... mind holding my hand a bit and baby-step me through it ?  I don't have much of a development environment apart from Xcode and its tools but i'm not completely familiar with even those... is there something I can use in there ?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: 2.3 Finally compiles but crash on trying to start a game
« Reply #10 on: February 26, 2009, 07:33:04 am »
please try to recompile latest trunk
execute ufo from a console
on a crash there should a backtrace be printed to console now
post this backtrace here

if there is no backtrace.... pity. try to run ufo (from console again) with gdb ./ufo and type run +set vid_fullscreen 0 (it might be important to run it in windowed mode - otherwise you can't switch back to gdb console on a crash - it might also work in fullscreen, depends on the configuration you are using)

after a crash type bt full

for more information see our debugging article in our wiki: http://ufoai.ninex.info/wiki/index.php/Debugging