This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Segfault in side_material_production


While testing a new game module, I encountered a bug that I am sure was
introduced within the last few months (I'm not exactly how long ago it
could have come up, as I have not had time to work on it for a while). 
Looking at the backtrace (see below), I suspect it has something to do
with the recent changes to the material display code, although I cannot
reproduce the bug in any of the games currently in the Xconq library.

The GDB message is:

Program received signal SIGSEGV, Segmentation fault.
0x08108369 in side_material_production (side=0x8459e18, m=0) at side.c:3742
3742                                    if (user_at(x, y) == unit->id) {

And the backtrace says:

#0  0x08108369 in side_material_production (side=0x8459e18, m=0) at side.c:3742
        unit = (Unit *) 0x81c5d54
        x = 3
        y = 39
        production = 0
#1  0x0805173b in update_material_display () at tkmain.c:2524
        m = 0
        supply = 1300
        production = 134545874
        storage = -1073749432
#2  0x08050227 in update_side_display (side=0x8459e18, side2=0x81c5918,
    rightnow=1) at tkmain.c:2005
        m = 10
        sidebuf = "Independents", '\0' <repeats 16 times>, "2\r\a\nï_\001@", '\0' <repeats 16 times>, "ï\v@@i\001@\217\177\000@ï\001@\000\000\000\000_\001@ïOï000@\224a\001@\001\000\000\000\001", '\0' <repeats 35 times>, " U\032\b\222\000\000\000\225\004\bï\v@ \001\000\000\004\000\000\00085\017@\bïpï000@8s\227\bïR\b*5\017@ \001\000\000\bïï\006\b\213\233\b\204\t\200\003`\207\e\b\204\t\200\003ï214\233\b8ïY\005\bï\026\b\001\000\000\000\001\000\000\000\000"...
        playerbuf = "-\000tion 0\000`\002@@ \000\000 $\023Bh#\023B)\000\000\000g\227\b\006\000\000\000-\000\000\000 #\023B\024\032\023B #\023Bh#\023B\210ïï\227\b\003\000\000\000\035\000\000\000 #\023B\024\032\023B #\023B\024\000\000\000---ï\v6\aB #\023B\024\000\000\000ï$\006B\000\000\000\000!\224\000@0ïv@\225\004\b\024\032\023B\000\000\000\000\000\000\000\000ï000\f@\214ïv@\034\226\v@@i\001@\r\000\000\0005,@ï\001@\224a\001@\225\004\b\200ïs\200\000@\225\004\b2\r\a\n\\\217\004\bhï"...
#3  0x08051343 in init_redraws () at tkmain.c:2432
        u = 0
        side2 = (Side *) 0x81c5918
        map = (Map *) 0xbfffe278
#4  0x08056b9b in launch_game () at tkmain.c:4416
        player = (Player *) 0x18
#5  0x0804da2d in tk_launch_game (cldata=0x0, interp=0x81d01b0, argc=1,
    argv=0xbfffe2c0) at tkmain.c:1281
No locals.
#6  0x4004a78b in TclInvokeStringCommand () from /usr/lib/libtcl8.3.so
No symbol table info available.
#7  0x400675b5 in TclExecuteByteCode () from /usr/lib/libtcl8.3.so
No symbol table info available.
#8  0x4004b233 in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
No symbol table info available.
#9  0x4008d6cb in TclObjInterpProc () from /usr/lib/libtcl8.3.so
No symbol table info available.
#10 0x400675b5 in TclExecuteByteCode () from /usr/lib/libtcl8.3.so
No symbol table info available.
#11 0x4004b233 in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
No symbol table info available.
#12 0x4010bbe8 in TkInvokeButton () from /usr/lib/libtk8.3.so
No symbol table info available.
#13 0x4010af6f in Tk_RadiobuttonObjCmd () from /usr/lib/libtk8.3.so
No symbol table info available.
#14 0x40086517 in TclExpandTokenArray () from /usr/lib/libtcl8.3.so
No symbol table info available.
#15 0x40086638 in Tcl_EvalObjv () from /usr/lib/libtcl8.3.so
No symbol table info available.
#16 0x4004afd6 in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
No symbol table info available.
#17 0x4008d075 in Tcl_UplevelObjCmd () from /usr/lib/libtcl8.3.so
No symbol table info available.
#18 0x400675b5 in TclExecuteByteCode () from /usr/lib/libtcl8.3.so
No symbol table info available.
#19 0x4004b233 in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
No symbol table info available.
#20 0x4008d6cb in TclObjInterpProc () from /usr/lib/libtcl8.3.so
No symbol table info available.
#21 0x40086517 in TclExpandTokenArray () from /usr/lib/libtcl8.3.so
No symbol table info available.
#22 0x40086c02 in Tcl_EvalEx () from /usr/lib/libtcl8.3.so
No symbol table info available.
#23 0x40086f66 in Tcl_Eval () from /usr/lib/libtcl8.3.so
No symbol table info available.
#24 0x4004cae2 in Tcl_GlobalEval () from /usr/lib/libtcl8.3.so
No symbol table info available.
#25 0x400ce89f in Tk_BindEvent () from /usr/lib/libtk8.3.so
No symbol table info available.
#26 0x400d3e1f in TkBindEventProc () from /usr/lib/libtk8.3.so
No symbol table info available.
#27 0x400daaa5 in Tk_HandleEvent () from /usr/lib/libtk8.3.so
No symbol table info available.
#28 0x400dae7c in TkQueueEventForAllChildren () from /usr/lib/libtk8.3.so
No symbol table info available.
#29 0x4008400d in Tcl_ServiceEvent () from /usr/lib/libtcl8.3.so
No symbol table info available.
#30 0x4008426d in Tcl_DoOneEvent () from /usr/lib/libtcl8.3.so
No symbol table info available.
#31 0x0804fc6e in ui_mainloop () at tkmain.c:1866
No locals.
#32 0x0804aec3 in main (argc=1, argv=0xbffff884) at tkunix.c:126
No locals.
#33 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
No symbol table info available.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]