Bug #12684, was updated on 2007-Dec-10 19:27
Here is a current snapshot of the bug.

Project: LinCityNG
Category: None
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 7
Submitted by: deanna
Assigned to : none
Summary: "You lose" segfault

Details: Several people have reported that lincity-ng will segfault on OpenBSD. 
 This seems to be happening when the population reaches 0 and the game is 
attempting to print the message "You lose."  This is lincity-ng 1.1.2. 

The discussion is here on the openbsd ports mailing list:
http://marc.info/?l=openbsd-ports&m=119354039224899&w=2

And here is the backtrace.

#0  Dialog::msgDialog(std::string, std::string) (this=0x80721120) at 
stl_list.h:155
155         : _List_iterator_base(__x)
(gdb) bt
#0  Dialog::msgDialog(std::string, std::string) (this=0x80721120) at 
stl_list.h:155
#1  0x1c00fc7f in Dialog (this=0x80721120, type=9) at 
src/lincity-ng/Dialog.cpp:77
#2  0x1c0470cd in EconomyGraph::updateData() (this=0x8bce1200) at 
stl_alloc.h:652
#3  0x1c052be2 in print_stats () at src/lincity-ng/ScreenInterface.cpp:347
#4  0x1c006bbc in execute_timestep () at src/lincity-ng/MainLincity.cpp:75
#5  0x1c02d142 in Game::run() (this=0x801a5fd0) at src/lincity-ng/Game.cpp:260
#6  0x1c009723 in mainLoop () at memory:271
#7  0x1c009f8f in main (argc=2, argv=0xcfbe4090) at src/lincity-ng/main.cpp:465
(gdb) bt full
#0  Dialog::msgDialog(std::string, std::string) (this=0x80721120) at 
stl_list.h:155
        message = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x801a5b30 "È\035"}, static _S_empty_rep_storage = {0, 0, 751, 0}}
        extraString = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x801a5b30 "È\035"}, static _S_empty_rep_storage = {0, 0, 751, 0}}
        filename = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x7e4bd5ac "gui/allgone.xml"}, static _S_empty_rep_storage = {0, 0, 
751, 0}}
        myDialogComponent = {_M_ptr = 0x888e8440}
        noButton = (class Button *) 0x0
#1  0x1c00fc7f in Dialog (this=0x80721120, type=9) at 
src/lincity-ng/Dialog.cpp:77
        msg = {<std::iostream> = {<> = {<No data fields>}, <> = {<No data 
fields>}, <No data fields>},
  _M_stringbuf = {<> = {<No data fields>}, _M_string = {static npos = 
4294967295,
      _M_dataplus = {<std::allocator<char>> = {<No data fields>}, _M_p = 
0x3c004f2e "You lose."},
      static _S_empty_rep_storage = {0, 0, 751, 0}}}}
        message = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x801a5b30 "È\035"}, static _S_empty_rep_storage = {0, 0, 751, 0}}
        extraString = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x801a5b30 "È\035"}, static _S_empty_rep_storage = {0, 0, 751, 0}}
#2  0x1c0470cd in EconomyGraph::updateData() (this=0x8bce1200) at 
stl_alloc.h:652
        message = {static npos = 4294967295, _M_dataplus = 
{<std::allocator<char>> = {<No data fields>},
    _M_p = 0x880c15bc "You lose."}, static _S_empty_rep_storage = {0, 0, 751, 
0}}
        i = -809617028
        f = -nan(0x400000)
        h = -2145756368
        root = (class Component *) 0xcfbe3c50
#3  0x1c052be2 in print_stats () at src/lincity-ng/ScreenInterface.cpp:347
No locals.
#4  0x1c006bbc in execute_timestep () at src/lincity-ng/MainLincity.cpp:75
        oldTime = 233978
        now = 233978
        mStepTime = 2154959136
#5  0x1c02d142 in Game::run() (this=0x801a5fd0) at src/lincity-ng/Game.cpp:260
        gui_event = {type = UPDATE, mousepos = {x = 0, y = 0}, mousemove = {x = 
0, y = 0}, mousebutton = 1,
  keysym = {scancode = 40 '(', sym = 469981779, mod = 1006647229, unicode = 
50308}, inside = true,
  elapsedTime = 0.0289999992}
        ticks = 233958
        elapsedTime = -2.42043481e-39
        event = {type = 1 '\001', active = {type = 1 '\001', gain = 0 '\0', 
state = 6 '\006'}, key = {
    type = 1 '\001', which = 0 '\0', state = 6 '\006', keysym = {scancode = 0 
'\0', sym = SDLK_UNKNOWN,
      mod = KMOD_NONE, unicode = 0}}, motion = {type = 1 '\001', which = 0 
'\0', state = 6 '\006', x = 0,
    y = 0, xrel = 0, yrel = 0}, button = {type = 1 '\001', which = 0 '\0', 
button = 6 '\006', state = 0 '\0',
    x = 0, y = 0}, jaxis = {type = 1 '\001', which = 0 '\0', axis = 6 '\006', 
value = 0}, jball = {
    type = 1 '\001', which = 0 '\0', ball = 6 '\006', xrel = 0, yrel = 0}, jhat 
= {type = 1 '\001',
    which = 0 '\0', hat = 6 '\006', value = 0 '\0'}, jbutton = {type = 1 
'\001', which = 0 '\0',
    button = 6 '\006', state = 0 '\0'}, resize = {type = 1 '\001', w = 0, h = 
0}, expose = {type = 1 '\001'},
  quit = {type = 1 '\001'}, user = {type = 1 '\001', code = 0, data1 = 0x0, 
data2 = 0x0}, syswm = {
    type = 1 '\001', msg = 0x0}}
        fpsTicks = 233747
        lastticks = 233958
        frame = 8
#6  0x1c009723 in mainLoop () at memory:271
        menu = {_M_ptr = 0x81565240}
        game = {_M_ptr = 0x801a5fd0}



Follow-Ups:

Date: 2007-Dec-11 21:19
By: wolfgangb

Comment:
Bad regression which affects all platforms.

Quick fix: replace data/gui/allgone.xml by
http://svn.berlios.de/viewcvs/*checkout*/lincity-ng/trunk/data/gui/allgone.xml?rev=908

Fixed in SVN r1315.
-------------------------------------------------------

For detailed info, follow this link:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=12684&group_id=2929
_______________________________________________
Lincity-ng-devel mailing list
Lincity-ng-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/lincity-ng-devel

Reply via email to