[gcompris-devel] Re: `Divide by zero' bug...

Bruno Coudoin bcoudoin at anfora.fr
Tue Oct 9 01:24:10 UTC 2001


le lun 08-10-2001 at 21:32 Herman Bruyninckx a écrit :
> On 8 Oct 2001, Bruno Coudoin wrote:
> 
> > > angle = M_PI/2 - atanf(new_y/new_x) + ((new_x<0) ? M_PI : 0.0);
> > >
> > I am afraid to touch this code. I had some trouble to write it and one
> > french guy named Yann dirson. He also does the debian packaging for
> > gcompris.
> > Anyway, I'll check new_x can't be 0
> 
> But it reality it is allowed to be zero! This means the angle is 90
> degrees which is physically okay. And which is also okay for
> atan2(y,x), in which either y or x can be zero. (But not both.)
> 
OK, can you please give me the correct answer. Is just changing atanf by
atan2 enough?

> > > The crash error, however, still remains...
> > >
> > Sory for that.
> 
> Yes :-) I have been trying other things, but I didn't find the error.
> Moreover, the error doesn't occur at the same places
> deterministically... Is it possible that the arguments in
> ``gnome_canvas_item_set'' can give problems on 64 bit architectures?
> (The arguments are given as ``(double)4'' for example, which is of
> different size on 32 and 64 architectures...
> 
Have you tried to trace the crash?
start gcompris with gdb
then if you find that it crashed in a gnome library, get it, compile it
(with debug enebled) install it and rerun gcompris with gdb, this will
show you the crash point.

> > On my side, I just submitted the trace of the frequent crash that occurs
> > in gcompris, especially when you change board.
> > I found that it crashes in gdk-pixbuf.
> > I changed to gtk-pixbuf from imlib at some point in the development. It
> > could be that it is also when instability came.
> 
> I have other programs that have similar problems (gabber, galeon, ...)
> and I cannot locate the precise problem. It has something to do with
> one of the gtk shared libraries, but I cannot find out which one, or
> which version is giving the troubles... I will be glad if you could
> tell me :-)
> 
> Another thing I noticed when my daughter was playing with the
> paratrooper lat night: the whole thing works modulo the screen width
> (i.e., if Tux jumps out of the plane near the right hand border of the
> screeen (moving to the right) then he reappears at the left hand
> border. My daughter was confused about this...
I did it on purpose, at higher level with a lot of wind it is the only
way to win ;)  I understand it is confusing but on other hand I am
limited by the width of the screen. I tested both with my child bacause
it was not originally possible to wrap but the wrapping has helped the
overral usability especilly with a lot of wind.

> Another thing in this board: Tux falls quite slowly, and often the
> kids see quickly that he will not reach the boat, and they want to
> interrupt the falling and try again; could it be possible to implement
> such an interrupt?
> Ans maybe two separate buttons would be more intuitive, instead of the
> two space bar clocks? One button with a jumping pinguin, the other
> with an opening parachute...
Correct. Perhaps I could map these to :
click on the plane => jump
click on tux => open
click on the thumb => ok or abort

Please, give your daughter this cheat code, when flying, she can adjust
the speed with the up/down arrow key ;)


> 
> 
> Best regards,
> 
> Herman
-- 
Bruno Coudoin
ANFORA - http://www.anfora.fr
Tel: (33)5 61 00 34 67





More information about the Gcompris-devel mailing list