Hey all,

I have encountered a crash that I find rather perplexing, seemingly in  
iso3166.c:

> #0  0x93a0ab50 in __kill ()
> #1  0x93aa5c00 in abort ()
> #2  0x001e93d8 in assertion_failure (data=<value temporarily  
> unavailable, due to optimizations>) at fast_assert.c:104
> #3  0x001fbfc4 in iso3166_country_cc (code=0) at iso3166.c:423
> #4  0x00189e50 in render_sources (d=<value temporarily unavailable,  
> due to optimizations>, row=0, column=1) at fileinfo.c:284
> #5  0x0018a8f0 in fi_gui_source_show (key=0x5930a00) at fileinfo.c:371
> #6  0x0015839c in fi_gui_show_info (file=0x60e7dc0) at  
> downloads_common.c:1477
> #7  0x0015a730 in fi_gui_files_cursor_update () at  
> downloads_common.c:1514
> #8  0x001e2460 in cq_expire (cq=0xe0e140, ev=0x0) at cq.c:482
> #9  0x001e264c in cq_clock (cq=0xe0e140, elapsed=<value temporarily  
> unavailable, due to optimizations>) at cq.c:562
> #10 0x001e28cc in cq_heartbeat (cq=0xe0e140) at cq.c:613
> #11 0x001e28f0 in heartbeat_trampoline (p=<value temporarily  
> unavailable, due to optimizations>) at cq.c:624
> #12 0x007226d0 in g_timeout_dispatch ()
> #13 0x00721ac4 in g_main_dispatch ()
> #14 0x00723184 in g_main_iterate ()
> #15 0x007234cc in g_main_run ()
> #16 0x00596b38 in gtk_main ()
> #17 0x0016b5bc in main_gui_run (geometry_spec=<value temporarily  
> unavailable, due to optimizations>) at main.c:697
> #18 0x00003bc8 in main (argc=1, argv=0xbffff24c) at main.c:1667

ccflags='-pipe -W -Wall -Wformat=2 -Wno-shadow'

in frame 4:
d is 'unavailable due to optimizations';  row = 0, column = 1, and
{GtkCList}clist_download_sources = {container = {widget = {object =  
{klass = 0xd16020, flags = 77580, ref_count = 2, object_data =  
0x174eef8}, private_flags = 0, state = 0 '\0', saved_state = 0 '\0',
       name = 0xd21720 "clist_download_sources", style = 0x1022200,  
requisition = {width = 679, height = 27}, allocation = {x = 2, y = 2,  
width = 990, height = 199}, window = 0x0,
       parent = 0xd21540}, focus_child = 0x0, border_width = 0,  
need_resize = 0, resize_mode = 0, reallocate_redraws = 0,  
resize_widgets = 0x0}, flags = 780, row_mem_chunk = 0xd216b0,
   cell_mem_chunk = 0xd21860, freeze_count = 0, internal_allocation =  
{x = 0, y = 0, width = 990, height = 199}, rows = 1, row_center_offset  
= 12, row_height = 15, row_list = 0x3e61d7c,
   row_list_end = 0x3e61d7c, columns = 6, column_title_area = {x = 2,  
y = 2, width = 986, height = 22}, title_window = 0x0, column =  
0xd218a0, clist_window = 0x0, clist_window_width = 986,
   clist_window_height = 173, hoffset = 0, voffset = 0, shadow_type =  
GTK_SHADOW_IN, selection_mode = GTK_SELECTION_EXTENDED, selection =  
0x0, selection_end = 0x0, undo_selection = 0x0,
   undo_unselection = 0x0, undo_anchor = -1, button_actions =  
"\003\000\000\000", drag_button = 0 '\0', click_cell = {row = -1,  
column = -1}, hadjustment = 0xd214d0, vadjustment = 0xd21610,
   xor_gc = 0x0, fg_gc = 0x0, bg_gc = 0x0, cursor_drag = 0x0, x_drag =  
0, focus_row = 0, anchor = -1, anchor_state = GTK_STATE_SELECTED,  
drag_pos = -1, htimer = 0, vtimer = 0,
   sort_type = GTK_SORT_ASCENDING, compare = 0x60c310  
<default_compare>, sort_column = 0}


in frame 5:
row = 0,
i = 1, and
{struct download}key = {magic = DOWNLOAD_MAGIC, src_handle =  
2434507541, src_handle_valid = 1,
   error_str = "Requeued due to timeout at 10:41:53 - rescheduled for  
10:42:13 #1\00037:43 #0", '\0' <repeats 181 times>, status =  
GTA_DL_DONE, io_opaque = 0x0, rx = 0x0, bio = 0x0,
   server = 0x3552c80, list_idx = DL_LIST_STOPPED, file_info =  
0x454cd00, record_index = 4294967295, file_name = 0x60c1130 "pure  
ascii text]", file_size = 1218665, size = 1218665,
   skip = 0, pos = 1218665, range_end = 1218665, socket = 0x0,  
out_file = 0x0, overlap_size = 0, req = 0x0, buffers = 0x0, start_date  
= 1257262948, last_update = 1257262975,
   last_gui_update = 0, record_stamp = 1257262537, retry_after =  
1257262949, head_ping_sent = 1257262912, header_sent = {tv_sec =  
1257262948, tv_usec = 601382}, retries = 0,
   timeout_delay = 0, served_reqs = 0, mismatches = 0, header_read_eof  
= 0, data_timeouts = 0, remove_msg = 0x0, sha1 = 0x0, uri = 0x0,  
last_dmesh = 1257262948, ranges = 0x0, ranges_size = 0,
   sinkleft = 0, flags = 262153, cflags = 24, keep_alive = 1, push =  
0, always_push = 1, got_giv = 0, unavailable = 0, cproxy = 0x0,  
parq_dl = 0x0, browse = 0x0, thex = 0x0}


It would appear that iso316_country_cc os being passed a guint16 value  
of 0x0, and subsequently failing the assertion "g_assert(code <  
G_N_ELEMENTS(iso3166_countries))".  Which would not be possible,  
unless G_N_ELEMENTS(iso3166_countries) were (a) also zero, or (b)  
evaluated as a [negative] signed integer rather than an unsigned  
integer.  G_N_ELEMENTS is a very straightforwards macro that just  
divides the size of a static array by the size of array[0] to find the  
number of elements.  I checked the array in gdb and it seems to be  
properly defined, 5180 bytes for an array of 4 byte elements, yielding  
a count of 1295.

Option (b) should not be possible, given the size of the result.   
Which leaves (c) a bug in glib 1.2, (d) a bug in apple's gcc (powerpc- 
apple-darwin9-gcc-4.0.1), or (e) something I want to learn.

This crash has occurred once before in the past week;  I had not  
encountered it before then.  However, this may not be relevant to  
recent commits as it seems to be dependent on file data.

regards,
Matt




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to