[Gambas-user] Integer Bug

Benoit Minisini gambas at ...1...
Fri Dec 12 12:59:52 CET 2008


On vendredi 12 décembre 2008, L Jumadi wrote:
> I found integer bug in gambas. Please try ?54*41000000 in gambas
> console. The result is negative, maybe because 41000000 is converted
> to integer rather than long integer. I can solve it by use manual
> converting to ?54*clng(41000000) but I think it should converted
> automatically by interpreter, isn't it?

It should not, because checking an overflow is impossible in C, AFAIK. It 
would take far longer to check it than doing the operation. 

So I prefer let the programmer do the conversion explicitely.

> Another anomali (I am not search the detail yet) when I change gb.qt
> to gb.gtk: When I navigate between textbox with keyboard Tab it raise
> gambas error (it seems divide by zero) but rapidly another error raise
> (message box already open) and gambas close  with signal 11. I hope
> this little information can help to solve the problem, or may be I
> will investigate more deeply (cause my program already complex now) in
> later time. When I switch back to gb.qt everything normal again.

I need a piece of your project that raises the bug, and the way to reproduce 
it. Otherwise I cannot do anything.

You can help by running your project with valgrind and a gambas compiled from 
sources, and send me the valgrind output until the crash.

Regards,

-- 
Benoit Minisini




More information about the User mailing list