Empire game randomly segfaults

Bug #367514 reported by Nick Cleveland on 2009-04-26
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
empire (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: empire

While playing the Empire game, the game randomly segfaults. I can't seem to reproduce a specific situation that creates the crash, but most games segfault. Resuming from a previous save doesn't seem to produce a segfault at the same spot, so I'm not sure how to reproduce this other than playing the game for a bit. It seems to happen more as the game goes along, but I've had games segfault early and others take quite a while. I run the game from the command line with "empire" and no automated crash reporting tools pop up, I'm not sure how to debug the program but I'm willing to do whatever is required to pin the crash down to the Empire package or some other package/lib it calls.

Ubuntu Release 9.04
Package: Empire 1.7-3
Expectation: Game would play to completion
Actual result: Game randomly segfaults

As the game is OLD and not supported by Ubuntu I completely understand if there isn't much anyone can/will do about this, just figured letting the developers know is better than just keeping silent.

ProblemType: Bug
Architecture: amd64
Dependencies:
 libgcc1 1:4.3.3-5ubuntu4
 gcc-4.3-base 4.3.3-5ubuntu4
 findutils 4.4.0-2ubuntu4
 libncurses5 5.7+20090207-1ubuntu1
 libc6 2.9-4ubuntu6
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: fglrx
Package: empire 1.7-3
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: empire
Uname: Linux 2.6.28-11-generic x86_64

Nick Cleveland (nikclev) wrote :

Forgot to attach these earlier, a screenshot and a saved game that seems to segfault more often than others.

Nick Cleveland (nikclev) wrote :

screenshot.

Philip James (pjames-launchpad) wrote :

It seems that the code isn't 64-bit safe. The function constants in empire.h are specified as ints, but are assigned to longs.
Example:
#define WFTRANSPORT -11 /* army boards a transport */
should be
#define WFTRANSPORT -11L /* army boards a transport */
Everytime it crashed for me, an objects func was something like FFFFFFF5 instead of -11. Also, when showing info for items in edit mode, the func would be "4294967285" instead of "transport". Changing the constants fixes it.

I'd be happy to update the source code repository, if someone will point me at info regarding how to do that.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers