Page 1 of 1
boost change at end of match: crash
Posted: Tue Apr 18, 2006 4:49 pm
by atd
I change boost at the end of a live game and it doesn't appear on the screen. After closing I get the following error:
Code: Select all
** (bygfoot:2746): WARNING **: live_game_create_unit: called after end of match.
Segmentatie fout
Is reproduceble in every game (no save game needed)
Posted: Tue Apr 18, 2006 7:43 pm
by idcarlos
Hi!
What is your bygfoot version?
This bug should be pached in January, after reporting this bug (1.9.5)...
http://bygfoot.sourceforge.net/forum/vi ... .php?t=566
If this happend ind the last version I'll work with it in the weekend.
Un saludo
Carlos
---------------Edited-------------
Oppps it's a bug. I'm looking it
Posted: Tue Apr 18, 2006 11:00 pm
by idcarlos
Hi.
I can't see the error
In the function live_game_calculate_fixture live_game_create_unit is called in a do-while
Code: Select all
do
{
live_game_create_unit();
live_game_evaluate_unit(&last_unit);
}
while(last_unit.event.type != LIVE_GAME_EVENT_END_MATCH &&
stat0 != STATUS_LIVE_GAME_PAUSE &&
stat0 != STATUS_LIVE_GAME_CHANGE);
But the error happend when live_game_create_unit is called if the live game is finnished.
Code: Select all
if(uni(unis->len - 1).event.type == LIVE_GAME_EVENT_END_MATCH)
{
g_warning("live_game_create_unit: called after end of match.\n");
return;
}
Why? How?
live_game_get_break() can end a game, but is called at the end of live_game_create_unit must end the main do-while...
I need a Visual Basic version of bygfoot...
Posted: Wed Apr 19, 2006 4:12 pm
by atd
This bug appeared in 1.9.5
Posted: Wed Apr 19, 2006 5:04 pm
by gyboth
i've fixed the bug in cvs. thanks for reporting.
i'd forgotten to check for the end of the live game in the callback for the boost and style meters. the code looks like this now:
Code: Select all
if(event->type != GDK_BUTTON_PRESS ||
g_array_index(usr(stat2).live_game.units, LiveGameUnit,
usr(stat2).live_game.units->len -1).event.type ==
LIVE_GAME_EVENT_END_MATCH)
return FALSE;
in on_eventbox_lg_style_button_press_event() and on_eventbox_lg_boost_button_press_event() (both in misc_callbacks.c) instead of just
Code: Select all
if(event->type != GDK_BUTTON_PRESS)
return FALSE;
gyözö
Posted: Fri Apr 21, 2006 9:10 am
by idcarlos
Thanks!
I need to read something about GTK objects andd events
Maybe one day I can write "C programer" in my Curriculum Vitae, maybe near "High level of English"
,