Bug#402715: gnome-hearts crashes on startup

Torbj|rn Andersson d91tan at Update.UU.SE
Tue Dec 12 09:58:10 CET 2006


Package: gnome-hearts
Version: 0.1.3-1
Severity: grave

Hi,

I've already commented on this in bug #396043, but I'm afraid that it will 
get lost there, what with the Etch freeze, and my problem doesn't appear 
to be quite the same as that one anyway (though it may have been 
introduced by the fix for it).

Basically, as soon as I try to start gnome-hearts, it crashes, rendering 
the package completely unusable for me. The reason for the crash appears 
to be the way load_card_styles() in hearts.c works. It assembles a hash 
table of all the available card styles, and then calls:

     g_hash_table_foreach(game_card_styles, card_style_add, NULL);

This NULL pointer is passed as the 'first_style' parameter to 
card_style_add(), where it's dereferenced like this:

     if (*first_style == NULL)
         *first_style = g_string_new(value);

This, of course, causes a crash. So what it probably *should* say 
instead is something like this:

     g_hash_table_foreach(game_card_style, card_style_add, &first_style);

Incidentally, this is pretty much what it says in the original version of 
card_style_add(), before the Debian-specific patches have been applied, 
except that card_style_add is cast to a GHFunc. The patched line is 
identical to what it looked like in 0.1.2, though, so I guess the Debian 
patch just wasn't correctly updated to 0.1.3.

Sincerely,

Torbjörn Andersson



More information about the Pkg-gnome-maintainers mailing list