Follow-up Comment #1, bug #17146 (project freeciv):

I believe I just ran into this with S2_3 (r19372) while trying to display the
city report (F4). This is in a game with the experimental ruleset, with cities
that were building Genetic Labs, which do not yet have sprites.

Backtrace below. I think the problem is an endemic failure to cope with NULL
returns from common functions like get_building_sprite(); see the inline
functions in gui-sdl/gui_tilespec.h, which invoke the GET_SURF() macro which
can dereference a NULL pointer.

I guess that it wouldn't be so hard to munge GET_SURF() to divert to a tiny,
preallocated SDL_Surface if it encounters a NULL pointer.


#0  real_info_city_report_dialog_update () at cityrep.c:504
        pImprove = 0x80b580
        pCity_iter = 0x868e350
        pCity = 0x8691210
        bg_color = {r = 255 '377', g = 255 '377', b = 255 '377', 
          unused = 136 '210'}
        pBuf = <value optimised out>
        pWindow = 0x2002650
        pStr = 0x7741260
        pText1 = 0x2021c70
        pText2 = 0x77969a0
        pText3 = 0x2002900
        pUnits_Icon = 0x20027a0
        pCMA_Icon = 0x7796a40
        pText4 = 0x77968d0
        pLogo = <value optimised out>
        togrow = <value optimised out>
        w = <value optimised out>
        count = 51
        ww = <value optimised out>
        hh = <value optimised out>
        name_w = 81
        prod_w = 52
        H = <value optimised out>
        cBuf = "24 00urns 00
Platformn(53/120) 00 00 00 00 00 00` 00 00 00 00 00 00 00` 00 00 00 00 00 00 
00260E 25 02 00 00 00 00
260231b", ' 00' <repeats 12 times>,
" 01 00 00 00 00 00 00 00 31? 00 00 00 00 00 00 30 00 00 00 00 00 00 00 30",
' 00' <repeats 23 times>, " 01 00 00 00 00 00 00"
        pName = <value optimised out>
        dst = {x = 768, y = 0, w = 0, h = 0}
        __FUNCTION__ = "real_info_city_report_dialog_update"
#1  0x000000000040d8c8 in cities_action_callback (pButton=0x6016bd0)
    at mapctrl.c:174
No locals.
#2  0x00000000004a0f5e in widget_pressed_action (pWidget=0x6016bd0)
    at widget.c:401
        ID = 100
#3  0x0000000000405be8 in gui_event_loop (pData=0x0, loop_action=0, 
    key_down_handler=<value optimised out>, 
    key_up_handler=<value optimised out>, 
    mouse_button_down_handler=<value optimised out>, 
    mouse_button_up_handler=<value optimised out>, 
    mouse_motion_handler=0x404ec0 <main_mouse_motion_handler>)
    at gui_main.c:675
        ID = 0
        tv = {tv_sec = 0, tv_usec = 0}
        civfdset = {fds_bits = {0 <repeats 16 times>}}
        t_current = <value optimised out>
        t_last_unit_anim = 16153
        t_last_map_scrolling = 16246
        real_timer_next_call = 16332
        result = 0
        schot_nr = 0
        schot = ' 00' <repeats 31 times>
        __FUNCTION__ = "gui_event_loop"
#4  0x00000000004062f2 in ui_main (argc=1, argv=0x7fff8af0b618)
    at gui_main.c:1057
        __Net_User_Event = {type = 24 ' 30', active = {type = 24 ' 30', 
            gain = 0 ' 00', state = 0 ' 00'}, key = {type = 24 ' 30', 
            which = 0 ' 00', state = 0 ' 00', keysym = {scancode = 1 ' 01', 
              sym = SDLK_UNKNOWN, mod = KMOD_NONE, unicode = 0}}, motion = {
            type = 24 ' 30', which = 0 ' 00', state = 0 ' 00', x = 1, 
            y = 0, xrel = 0, yrel = 0}, button = {type = 24 ' 30', 
            which = 0 ' 00', button = 0 ' 00', state = 0 ' 00', x = 1, 
            y = 0}, jaxis = {type = 24 ' 30', which = 0 ' 00', 
            axis = 0 ' 00', value = 1}, jball = {type = 24 ' 30', 
            which = 0 ' 00', ball = 0 ' 00', xrel = 1, yrel = 0}, jhat = {
            type = 24 ' 30', which = 0 ' 00', hat = 0 ' 00', 
            value = 0 ' 00'}, jbutton = {type = 24 ' 30', which = 0 ' 00', 
            button = 0 ' 00', state = 0 ' 00'}, resize = {type = 24 ' 30', 
            w = 1, h = 0}, expose = {type = 24 ' 30'}, quit = {
            type = 24 ' 30'}, user = {type = 24 ' 30', code = 1, 
            data1 = 0x0, data2 = 0x0}, syswm = {type = 24 ' 30', msg = 0x0}}
        __GGZ_User_Event = {type = 24 ' 30', active = {type = 24 ' 30', 
            gain = 182 '266', state = 240 '360'}, key = {type = 24 ' 30', 
            which = 182 '266', state = 240 '360', keysym = {
              scancode = 2 ' 02', sym = SDLK_UNKNOWN, mod = KMOD_NONE, 
              unicode = 0}}, motion = {type = 24 ' 30', which = 182 '266', 
            state = 240 '360', x = 2, y = 0, xrel = 0, yrel = 0}, button = {
            type = 24 ' 30', which = 182 '266', button = 240 '360', 
            state = 138 '212', x = 2, y = 0}, jaxis = {type = 24 ' 30', 
            which = 182 '266', axis = 240 '360', value = 2}, jball = {
            type = 24 ' 30', which = 182 '266', ball = 240 '360', xrel = 2, 
            yrel = 0}, jhat = {type = 24 ' 30', which = 182 '266', 
            hat = 240 '360', value = 138 '212'}, jbutton = {
            type = 24 ' 30', which = 182 '266', button = 240 '360', 
            state = 138 '212'}, resize = {type = 24 ' 30', w = 2, h = 0}, 
          expose = {type = 24 ' 30'}, quit = {type = 24 ' 30'}, user = {
            type = 24 ' 30', code = 2, data1 = 0x0, data2 = 0x0}, syswm = {
            type = 24 ' 30', msg = 0x0}}
        __Anim_User_Event = {type = 24 ' 30', active = {type = 24 ' 30', 
            gain = 0 ' 00', state = 0 ' 00'}, key = {type = 24 ' 30', 
            which = 0 ' 00', state = 0 ' 00', keysym = {scancode = 3 ' 03', 
              sym = SDLK_UNKNOWN, mod = KMOD_NONE, unicode = 0}}, motion = {
            type = 24 ' 30', which = 0 ' 00', state = 0 ' 00', x = 3, 
            y = 0, xrel = 0, yrel = 0}, button = {type = 24 ' 30', 
            which = 0 ' 00', button = 0 ' 00', state = 0 ' 00', x = 3, 
            y = 0}, jaxis = {type = 24 ' 30', which = 0 ' 00', 
            axis = 0 ' 00', value = 3}, jball = {type = 24 ' 30', 
            which = 0 ' 00', ball = 0 ' 00', xrel = 3, yrel = 0}, jhat = {
            type = 24 ' 30', which = 0 ' 00', hat = 0 ' 00', 
            value = 0 ' 00'}, jbutton = {type = 24 ' 30', which = 0 ' 00', 
            button = 0 ' 00', state = 0 ' 00'}, resize = {type = 24 ' 30', 
            w = 3, h = 0}, expose = {type = 24 ' 30'}, quit = {
            type = 24 ' 30'}, user = {type = 24 ' 30', code = 3, 
            data1 = 0x0, data2 = 0x0}, syswm = {type = 24 ' 30', msg = 0x0}}
        __Info_User_Event = {type = 24 ' 30', active = {type = 24 ' 30', 
            gain = 0 ' 00', state = 0 ' 00'}, key = {type = 24 ' 30', 
            which = 0 ' 00', state = 0 ' 00', keysym = {scancode = 5 ' 05', 
              sym = SDLK_UNKNOWN, mod = KMOD_NONE, unicode = 0}}, motion = {
            type = 24 ' 30', which = 0 ' 00', state = 0 ' 00', x = 5, 
            y = 0, xrel = 0, yrel = 0}, button = {type = 24 ' 30', 
            which = 0 ' 00', button = 0 ' 00', state = 0 ' 00', x = 5, 
            y = 0}, jaxis = {type = 24 ' 30', which = 0 ' 00', 
            axis = 0 ' 00', value = 5}, jball = {type = 24 ' 30', 
            which = 0 ' 00', ball = 0 ' 00', xrel = 5, yrel = 0}, jhat = {
            type = 24 ' 30', which = 0 ' 00', hat = 0 ' 00', 
            value = 0 ' 00'}, jbutton = {type = 24 ' 30', which = 0 ' 00', 
            button = 0 ' 00', state = 0 ' 00'}, resize = {type = 24 ' 30', 
            w = 5, h = 0}, expose = {type = 24 ' 30'}, quit = {
            type = 24 ' 30'}, user = {type = 24 ' 30', code = 5, 
            data1 = 0x0, data2 = 0x0}, syswm = {type = 24 ' 30', msg = 0x0}}
        __Flush_User_Event = {type = 24 ' 30', active = {type = 24 ' 30', 
            gain = 0 ' 00', state = 0 ' 00'}, key = {type = 24 ' 30', 
            which = 0 ' 00', state = 0 ' 00', keysym = {scancode = 6 ' 06', 
              sym = SDLK_UNKNOWN, mod = KMOD_NONE, unicode = 0}}, motion = {
            type = 24 ' 30', which = 0 ' 00', state = 0 ' 00', x = 6, 
            y = 0, xrel = 0, yrel = 0}, button = {type = 24 ' 30', 
            which = 0 ' 00', button = 0 ' 00', state = 0 ' 00', x = 6, 
            y = 0}, jaxis = {type = 24 ' 30', which = 0 ' 00', 
            axis = 0 ' 00', value = 6}, jball = {type = 24 ' 30', 
            which = 0 ' 00', ball = 0 ' 00', xrel = 6, yrel = 0}, jhat = {
            type = 24 ' 30', which = 0 ' 00', hat = 0 ' 00', 
            value = 0 ' 00'}, jbutton = {type = 24 ' 30', which = 0 ' 00', 
            button = 0 ' 00', state = 0 ' 00'}, resize = {type = 24 ' 30', 
            w = 6, h = 0}, expose = {type = 24 ' 30'}, quit = {
            type = 24 ' 30'}, user = {type = 24 ' 30', code = 6, 
            data1 = 0x0, data2 = 0x0}, syswm = {type = 24 ' 30', msg = 0x0}}
        __pMap_Scroll_User_Event = {type = 24 ' 30', active = {
            type = 24 ' 30', gain = 0 ' 00', state = 0 ' 00'}, key = {
            type = 24 ' 30', which = 0 ' 00', state = 0 ' 00', keysym = {
              scancode = 7 'a', sym = SDLK_UNKNOWN, mod = KMOD_NONE, 
              unicode = 0}}, motion = {type = 24 ' 30', which = 0 ' 00', 
            state = 0 ' 00', x = 7, y = 0, xrel = 0, yrel = 0}, button = {
            type = 24 ' 30', which = 0 ' 00', button = 0 ' 00', 
            state = 0 ' 00', x = 7, y = 0}, jaxis = {type = 24 ' 30', 
            which = 0 ' 00', axis = 0 ' 00', value = 7}, jball = {
            type = 24 ' 30', which = 0 ' 00', ball = 0 ' 00', xrel = 7, 
            yrel = 0}, jhat = {type = 24 ' 30', which = 0 ' 00', 
            hat = 0 ' 00', value = 0 ' 00'}, jbutton = {type = 24 ' 30', 
            which = 0 ' 00', button = 0 ' 00', state = 0 ' 00'}, resize = {
            type = 24 ' 30', w = 7, h = 0}, expose = {type = 24 ' 30'}, 
          quit = {type = 24 ' 30'}, user = {type = 24 ' 30', code = 7, 
            data1 = 0x0, data2 = 0x0}, syswm = {type = 24 ' 30', msg = 0x0}}
#5  0x000000000042832f in client_main (argc=<value optimised out>, 
    argv=0x7fff8af0b618) at client_main.c:509
        i = 1
        loglevel = LOG_NORMAL
        ui_options = <value optimised out>
        ui_separator = 16
        option = <value optimised out>
        user_tileset = false
        fatal_assertions = -1
        __FUNCTION__ = "client_main"
#6  0x00007f580c483c4d in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#7  0x0000000000404999 in _start ()
No symbol table info available.


(file #12493)
    _______________________________________________________

Additional Item Attachment:

File name: freeciv-T0231-Y01655-manual.sav.bz2 Size:66 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17146>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to