Debian Bug report logs - #454306
freecraft: crash on startup, unsuitable for release

version graph

Package: freecraft; Maintainer for freecraft is Lincoln de Sousa Primo Clarete <lincoln@minaslivre.org>; Source for freecraft is src:freecraft.

Reported by: Philipp Kern <pkern@debian.org>

Date: Tue, 4 Dec 2007 15:48:01 UTC

Severity: grave

Tags: patch

Found in version freecraft/1:1.18-2.3

Fixed in versions freecraft/1:1.19-2, freecraft/1:1.19-1

Done: Lincoln de Sousa <lincoln@minaslivre.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, David Martínez Moreno <ender@debian.org>:
Bug#454306; Package freecraft. Full text and rfc822 format available.

Acknowledgement sent to Philipp Kern <pkern@debian.org>:
New Bug report received and forwarded. Copy sent to David Martínez Moreno <ender@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Philipp Kern <pkern@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: freecraft: crash on startup, unsuitable for release
Date: Tue, 04 Dec 2007 16:45:07 +0100
Package: freecraft
Version: 1:1.18-2.3
Severity: grave

Hi there,

I received the following backtrace on startup on amd64 (with -g -O2).

0x00000000004cf67a in VideoDrawSub8to32 (graphic=<value optimized out>, 
    gx=<value optimized out>, gy=<value optimized out>, 
    w=<value optimized out>, h=<value optimized out>, x=<value optimized out>, 
    y=<value optimized out>) at src/video/obj/../graphic.c:224
224                 *dp++=pixels[*sp++];        // unroll
(gdb) bt
#0  0x00000000004cf67a in VideoDrawSub8to32 (graphic=<value optimized out>, 
    gx=<value optimized out>, gy=<value optimized out>, 
    w=<value optimized out>, h=<value optimized out>, x=<value optimized out>, 
    y=<value optimized out>) at src/video/obj/../graphic.c:224
#1  0x00000000004ddbf5 in DisplayPicture (name=<value optimized out>)
    at src/video/obj/../video.c:523
#2  0x0000000000418293 in main1 (argc=<value optimized out>, 
    argv=<value optimized out>) at src/clone/obj/../clone.c:1283
#3  0x00000000004185dd in main (argc=1, argv=0x7fff83ac72a8)
    at src/clone/obj/../clone.c:1540

The source fails to build with -g -O0 for me:

gcc -o freecraft src/action/obj/action_attack.o src/action/obj/action_board.o src/action/obj/action_build.o src/action/obj/action_demolish.o src/action/obj/action_die.o src/action/obj/action_follow.o src/action/obj/action_harvest.o src/action/obj/action_minegold.o src/action/obj/action_move.o src/action/obj/action_patrol.o src/action/obj/action_repair.o src/action/obj/action_research.o src/action/obj/action_resource.o src/action/obj/action_returngoods.o src/action/obj/action_spellcast.o src/action/obj/action_stand.o src/action/obj/action_still.o src/action/obj/action_train.o src/action/obj/action_unload.o src/action/obj/action_upgradeto.o src/action/obj/actions.o src/action/obj/command.o src/ai/obj/ai.o src/ai/obj/ai_building.o src/ai/obj/ai_force.o src/ai/obj/ai_magic.o src/ai/obj/ai_plan.o src/ai/obj/ai_resource.o src/ai/obj/ccl_ai.o src/ai/obj/new_ai.o src/beos/obj/beos.o src/clone/obj/ccl.o src/clone/obj/ccl_player.o src/clone/obj/clone.o src/clone/obj/construct.o src/clone/obj/groups.o src/clone/obj/iolib.o src/clone/obj/mainloop.o src/clone/obj/mpq.o src/clone/obj/player.o src/clone/obj/pud.o src/clone/obj/scm.o src/clone/obj/selection.o src/clone/obj/spells.o src/clone/obj/unit.o src/clone/obj/unit_draw.o src/clone/obj/unit_find.o src/clone/obj/unitcache.o src/editor/obj/ccl_editor.o src/editor/obj/editloop.o src/editor/obj/editor.o src/editor/obj/edmap.o src/game/obj/campaign.o src/game/obj/game.o src/game/obj/intro.o src/game/obj/loadgame.o src/game/obj/savegame.o src/game/obj/trigger.o src/libmodplug/obj/fastmix.o src/libmodplug/obj/load_669.o src/libmodplug/obj/load_amf.o src/libmodplug/obj/load_ams.o src/libmodplug/obj/load_dbm.o src/libmodplug/obj/load_dmf.o src/libmodplug/obj/load_dsm.o src/libmodplug/obj/load_far.o src/libmodplug/obj/load_it.o src/libmodplug/obj/load_j2b.o src/libmodplug/obj/load_mdl.o src/libmodplug/obj/load_med.o src/libmodplug/obj/load_mod.o src/libmodplug/obj/load_mt2.o src/libmodplug/obj/load_mtm.o src/libmodplug/obj/load_okt.o src/libmodplug/obj/load_psm.o src/libmodplug/obj/load_ptm.o src/libmodplug/obj/load_s3m.o src/libmodplug/obj/load_stm.o src/libmodplug/obj/load_ult.o src/libmodplug/obj/load_umx.o src/libmodplug/obj/load_wav.o src/libmodplug/obj/load_xm.o src/libmodplug/obj/mmcmp.o src/libmodplug/obj/modplug.o src/libmodplug/obj/snd_dsp.o src/libmodplug/obj/snd_flt.o src/libmodplug/obj/snd_fx.o src/libmodplug/obj/sndfile.o src/libmodplug/obj/sndmix.o src/libmodplug/obj/tables.o src/map/obj/ccl_map.o src/map/obj/ccl_tileset.o src/map/obj/map.o src/map/obj/map_draw.o src/map/obj/map_fog.o src/map/obj/map_rock.o src/map/obj/map_save.o src/map/obj/map_wall.o src/map/obj/map_wood.o src/map/obj/minimap.o src/map/obj/tileset.o src/missile/obj/ccl_missile.o src/missile/obj/missile.o src/movie/obj/avi.o src/movie/obj/movie.o src/movie/vp31/obj/BlockMapping.o src/movie/vp31/obj/DCT_decode.o src/movie/vp31/obj/DDecode.o src/movie/vp31/obj/DFrameR.o src/movie/vp31/obj/DSystemDependant.o src/movie/vp31/obj/FrameIni.o src/movie/vp31/obj/Frarray.o src/movie/vp31/obj/Huffman.o src/movie/vp31/obj/IDctPart.o src/movie/vp31/obj/Quantize.o src/movie/vp31/obj/Reconstruct.o src/movie/vp31/obj/YUVtofromRGB.o src/movie/vp31/obj/dct_globals.o src/movie/vp31/obj/pb_globals.o src/movie/vp31/obj/postproc.o src/movie/vp31/obj/unpack.o src/movie/vp31/obj/vfwPback.o src/movie/vp31/obj/vfwpbdll_if.o src/network/obj/commands.o src/network/obj/lowlevel.o src/network/obj/netconnect.o src/network/obj/network.o src/pathfinder/obj/astar.o src/pathfinder/obj/avl_tree.o src/pathfinder/obj/ccl_pathfinder.o src/pathfinder/obj/floodfill.o src/pathfinder/obj/hierarchical.o src/pathfinder/obj/pathfinder.o src/pathfinder/obj/pf_goal.o src/pathfinder/obj/pf_high_open.o src/pathfinder/obj/pf_highlevel.o src/pathfinder/obj/pf_low_open.o src/pathfinder/obj/pf_lowlevel.o src/pathfinder/obj/regid.o src/pathfinder/obj/region.o src/pathfinder/obj/region_groups.o src/pathfinder/obj/region_set.o src/siod/obj/slib.o src/siod/obj/sliba.o src/siod/obj/slibu.o src/siod/obj/trace.o src/sound/obj/arts_audio.o src/sound/obj/ccl_sound.o src/sound/obj/flac.o src/sound/obj/libcda.o src/sound/obj/mad.o src/sound/obj/music.o src/sound/obj/ogg.o src/sound/obj/oss_audio.o src/sound/obj/sdl_audio.o src/sound/obj/sound.o src/sound/obj/sound_id.o src/sound/obj/sound_server.o src/sound/obj/unitsound.o src/sound/obj/wav.o src/sound/obj/cdda.o src/ui/obj/botpanel.o src/ui/obj/button_checks.o src/ui/obj/ccl_ui.o src/ui/obj/console.o src/ui/obj/icons.o src/ui/obj/interface.o src/ui/obj/mainscr.o src/ui/obj/menu_proc.o src/ui/obj/menus.o src/ui/obj/mouse.o src/ui/obj/ui.o src/unit/obj/ccl_unit.o src/unit/obj/ccl_unittype.o src/unit/obj/depend.o src/unit/obj/unit_ai.o src/unit/obj/unit_save.o src/unit/obj/unittype.o src/unit/obj/upgrade.o src/video/obj/X11.o src/video/obj/cursor.o src/video/obj/deco.o src/video/obj/font.o src/video/obj/graphic.o src/video/obj/linedraw.o src/video/obj/new_X11.o src/video/obj/png.o src/video/obj/sdl.o src/video/obj/sprite.o src/video/obj/svgalib.o src/video/obj/sweepline.o src/video/obj/video.o src/video/obj/wince.o etlib/obj/hash.o etlib/obj/prgname.o -L/usr/X11R6/lib -L/usr/local/lib   -lpng -lz -lm -lX11  -lm -L/usr/lib -lSDL -ldl -lz -lbz2     -lz -lm -I. -O0 -g -Wall -pipe -fsigned-char -fomit-frame-pointer -fconserve-space -fexpensive-optimizations -ffast-math  -I./src/include -I/usr/X11R6/include -I/usr/local/include   -I./src/movie/vp31/include  -DUSE_CCL '-DVERSION="1.18"' -DUSE_SDL -DUSE_SDLA -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_ZLIB -DUSE_BZ2LIB -DWITH_SOUND  -DUSE_SDLCD        -DUNIT_ON_MAP -DNEW_AI -DUSE_LIBMODPLUG -DUSE_HP_FOR_XP -DNEW_FOW -DBUILDING_DESTROYED 
src/unit/obj/unittype.o: In function `ParsePudUDTA':
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:296: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:300: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:304: undefined reference to `FetchLE32'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:309: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:339: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:341: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:346: undefined reference to `FetchLE16'
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:348: undefined reference to `FetchLE16'
src/unit/obj/unittype.o:/tmp/freecraft-1.18/src/unit/obj/../unittype.c:434: more undefined references to `FetchLE16' follow
src/unit/obj/unittype.o: In function `ParsePudUDTA':
/tmp/freecraft-1.18/src/unit/obj/../unittype.c:445: undefined reference to `FetchLE32'
collect2: ld returned 1 exit status
make: *** [freecraft] Error 1

Considering the bug list and the segmentation faults on various
occassions I am not sure if freecraft is currently suitable for
release, thus I set grave as severity.  Maybe the breakage is
only on one architecture that severe, but still, this arch is a
release arch.

Kind regards,
Philipp Kern




Information forwarded to debian-bugs-dist@lists.debian.org, David Martínez Moreno <ender@debian.org>:
Bug#454306; Package freecraft. Full text and rfc822 format available.

Acknowledgement sent to Soeren Sonnenburg <bugreports@nn7.de>:
Extra info received and forwarded to list. Copy sent to David Martínez Moreno <ender@debian.org>. Full text and rfc822 format available.

Message #10 received at 454306@bugs.debian.org (full text, mbox):

From: Soeren Sonnenburg <bugreports@nn7.de>
To: 454306@bugs.debian.org
Cc: control <control@bugs.debian.org>
Subject: potential fix / but package could be removed
Date: Sun, 13 Apr 2008 09:46:31 +0200
[Message part 1 (text/plain, inline)]
tag 454306 + patch
thanks,


Investigating this issue, it seems that the fix could be rather trivial,
however as the package is superseeded by stratagus
( http://stratagus.org/ ) also packaged in debian freecraft could
probably be removed. anyway, also for stratagus development has stopped
as the developers are working on boswars ( http://www.boswars.org ) also
in debian.


Regarding the fix, thanks to the increadible helpful bugreport, we see

y=<value optimized out>) at src/video/obj/../graphic.c:224
224                 *dp++=pixels[*sp++];        // unroll

 array accesses to pixels, which is of type VMemType32*. VMemType32 is
defined in include/video.h as 

typedef unsigned long VMemType32;   /// 32 bpp modes pointer

which is obviously for 64bit archs 64 bit instead of 32 ...

As I don't have an amd64 arch at hand, could you please apply the
attached patch and check if it still compiles on amd64 and even works?

(it still works on my x86 based machine - nice game btw, maybe worth
rescuing it :)

Soeren
[debian-types.patch (text/x-patch, attachment)]

Tags added: patch Request was from Soeren Sonnenburg <bugreports@nn7.de> to control@bugs.debian.org. (Sun, 13 Apr 2008 07:48:41 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, David Martínez Moreno <ender@debian.org>:
Bug#454306; Package freecraft. Full text and rfc822 format available.

Acknowledgement sent to Soeren Sonnenburg <bugreports@nn7.de>:
Extra info received and forwarded to list. Copy sent to David Martínez Moreno <ender@debian.org>. Full text and rfc822 format available.

Message #17 received at 454306@bugs.debian.org (full text, mbox):

From: Soeren Sonnenburg <bugreports@nn7.de>
To: 454306@bugs.debian.org
Subject: patch works on amd64
Date: Mon, 14 Apr 2008 06:59:26 +0200
I asked someone to build freecraft using this patch on his amd64 debian
machine and it

a) compiled OK
b) and started up OK too

so there is a good chance that this will work.

Soeren




Information forwarded to debian-bugs-dist@lists.debian.org, David Martínez Moreno <ender@debian.org>:
Bug#454306; Package freecraft. Full text and rfc822 format available.

Acknowledgement sent to "Isaac To" <kkto@cs.hku.hk>:
Extra info received and forwarded to list. Copy sent to David Martínez Moreno <ender@debian.org>. Full text and rfc822 format available.

Message #22 received at 454306@bugs.debian.org (full text, mbox):

From: "Isaac To" <kkto@cs.hku.hk>
To: 454306@bugs.debian.org
Subject: The attached patch didn't solve the problem fully
Date: Wed, 9 Jul 2008 10:42:14 +0800
Hi,

Once I try to start a game, it terminates with:

GetPudInfo: /usr/share/games/freecraft/default/puds/default.pud: invalid pud
LoadPud: /usr/share/games/freecraft/default/puds/default.pud: invalid pud

It seems likely that there are other type issues.

Regards,
Isaac




Information forwarded to debian-bugs-dist@lists.debian.org, David Martínez Moreno <ender@debian.org>:
Bug#454306; Package freecraft. Full text and rfc822 format available.

Acknowledgement sent to "Isaac To" <isaac.to@gmail.com>:
Extra info received and forwarded to list. Copy sent to David Martínez Moreno <ender@debian.org>. Full text and rfc822 format available.

Message #27 received at 454306@bugs.debian.org (full text, mbox):

From: "Isaac To" <isaac.to@gmail.com>
To: 454306@bugs.debian.org
Subject: My fix
Date: Wed, 9 Jul 2008 11:25:38 +0800
Hi,

I've fixed the problem in src/clone/pud.c.  In PudReadHeader(), the
length is a long*, which is 64 bit in AMD64.  However, CLread only
read the first 4 bytes, or 32 bits, leaving the remaining 32 bits
uninitialized.  The correct solution is probably to change the length
parameter in PudReadHeader, GetPudInfo and LoadPud in that source file
to uint32_t.

Regards,
Isaac




Reply sent to Lincoln de Sousa <lincoln@minaslivre.org>:
You have taken responsibility. (Wed, 11 Nov 2009 03:21:05 GMT) Full text and rfc822 format available.

Notification sent to Philipp Kern <pkern@debian.org>:
Bug acknowledged by developer. (Wed, 11 Nov 2009 03:21:05 GMT) Full text and rfc822 format available.

Message #32 received at 454306-close@bugs.debian.org (full text, mbox):

From: Lincoln de Sousa <lincoln@minaslivre.org>
To: 454306-close@bugs.debian.org
Subject: Bug#454306: fixed in freecraft 1:1.19-1
Date: Wed, 11 Nov 2009 03:19:00 +0000
Source: freecraft
Source-Version: 1:1.19-1

We believe that the bug you reported is fixed in the latest version of
freecraft, which is due to be installed in the Debian FTP archive:

freecraft-dbg_1.19-1_amd64.deb
  to main/f/freecraft/freecraft-dbg_1.19-1_amd64.deb
freecraft_1.19-1.diff.gz
  to main/f/freecraft/freecraft_1.19-1.diff.gz
freecraft_1.19-1.dsc
  to main/f/freecraft/freecraft_1.19-1.dsc
freecraft_1.19-1_amd64.deb
  to main/f/freecraft/freecraft_1.19-1_amd64.deb
freecraft_1.19.orig.tar.gz
  to main/f/freecraft/freecraft_1.19.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 454306@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lincoln de Sousa <lincoln@minaslivre.org> (supplier of updated freecraft package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 30 Oct 2009 12:48:14 -0200
Source: freecraft
Binary: freecraft freecraft-dbg
Architecture: source amd64
Version: 1:1.19-1
Distribution: unstable
Urgency: low
Maintainer: Lincoln de Sousa <lincoln@minaslivre.org>
Changed-By: Lincoln de Sousa <lincoln@minaslivre.org>
Description: 
 freecraft  - Realtime fantasy strategy game for Unix and X
 freecraft-dbg - Realtime fantasy strategy game - Debugging simbols
Closes: 406077 454306 455683
Changes: 
 freecraft (1:1.19-1) unstable; urgency=low
 .
   * Packaging a forked version of freecraft from a new source that aims to
     fix bugs open in Debian.
   * Fixing x86_64 support (Closes: #454306, #406077)
   * Fixed -F fullscreen parameter (Closes: #455683)
   * Changing the building system to use autotools
   * Rewritting the debian/rules file to be compatible with dh7
Checksums-Sha1: 
 a1629210431b765c312835808e4c257ddb0474bb 1401 freecraft_1.19-1.dsc
 50a559e50bbcb40e08f49bf051823b21ae31dde6 1325967 freecraft_1.19.orig.tar.gz
 d3e868728b479572ce00c4634cc90271905612a3 11869 freecraft_1.19-1.diff.gz
 517b2a62b76f6251e56822fbb2926eaacdebe617 566496 freecraft_1.19-1_amd64.deb
 56648dd25ef841bc60533cad6944eac4eb2e576c 11560 freecraft-dbg_1.19-1_amd64.deb
Checksums-Sha256: 
 c8fd6fed232797cb94abc2495035f0c919f7471b3dd0d9e5b3ee119679344e83 1401 freecraft_1.19-1.dsc
 1795d3a3ebb7c824d6bfdd9fe3e925785a30764ae455e6b4d94a28042fffde96 1325967 freecraft_1.19.orig.tar.gz
 c30808cd00093b8a745205044756398608960a295880c12e99d94bb37a2234b4 11869 freecraft_1.19-1.diff.gz
 bedb6bb7504dfc01f3b9240c6d688cbdcdc5ac7715b529648769ea3bf32567be 566496 freecraft_1.19-1_amd64.deb
 58655893282c026fba0552ad979972eacdb16afc7c71182f4f30d5295af4e6fe 11560 freecraft-dbg_1.19-1_amd64.deb
Files: 
 63f610e53537f7c630cf23c0975b33e0 1401 games optional freecraft_1.19-1.dsc
 bc7bf78c921bf2e612190e0a4398b210 1325967 games optional freecraft_1.19.orig.tar.gz
 1dd508752cb0b0169a3b788fbb9a7842 11869 games optional freecraft_1.19-1.diff.gz
 40c41d117029bf99c8643e076a9ef3a8 566496 games optional freecraft_1.19-1_amd64.deb
 7fbe3bf54a5d9bb1dd95486cbf9d3e94 11560 debug extra freecraft-dbg_1.19-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJK+hpFAAoJENIA6zCg+12ms7oH/AzoDpg1gEUxUFI3Bpm+i59+
0prsgg+qWDS8/xNGS3Zk8DIw6PsUrDmK+w6aAePe3K285aOaixOHpAqpeCGqK7eC
N5NvtmOTyPHdsvaTAocWgOmw6nXUZnMjSf8jb7gTC5k9JX8xdwaFPWx6VC5vGEVG
Vo3JuDFQsZP34H7J7al0KmTEAkOXTsb+OSpA/U/S/B7WQHM+UfQgSZas/uLpQ1lG
wduo/z0yFOTngZECbaEAaRHA1vJ/vepzOFYif4nUC6xfH4oLepl8T0Q8zdl7NeS9
Lh+FB3mXyfofD/Pi17/i3eNUNDP6xhb31QM8bLjxjIpqi/86GBiyaqcQmq5v7ek=
=8pW9
-----END PGP SIGNATURE-----





Bug Marked as fixed in versions freecraft/1:1.19-2. Request was from Mònica Ramírez Arceda <monica@probeta.net> to control@bugs.debian.org. (Thu, 02 Jun 2011 11:43:02 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 01 Jul 2011 07:31:21 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 07:22:21 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.