Recent

Author Topic: [SOLVED] EDivByZero when mouse move in window (custom gui binding)  (Read 2443 times)

kieski

  • Newbie
  • Posts: 2
Hello,
I tried to make a FPC binding for the IUP gui toolkit. It is working well, if you don't mind the fact that moving the mouse inside the window makes it crash.
The program throw a SIGFPE, EDivByZero: Division by zero and  Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. (apparently it isn't revelant)

Clicking on buttons to open another dialog is ok.
The same program in C doesn't crash.

I compiled myself the library and there was no error;
FPC returns no error nor warnings at compilation.

Do you have any idea about this ? I searched but found nothing about this behavior.

Here are the units and the program just in case :
iupdef.pas : http://pastebin.com/a3rjTCqe
iupkey.pas : http://pastebin.com/Z91dyaDn
iup.pas : http://pastebin.com/FxJbRtvW
program.pas : http://pastebin.com/PWBF4UGh
« Last Edit: May 05, 2016, 02:30:19 pm by kieski »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: EDivByZero when mouse move in window (custom gui binding)
« Reply #1 on: May 04, 2016, 11:44:40 pm »
Call Math.SetExceptionMask with exZeroDivide in one of the set elements. C doesn't set any mask by default, FPC sets according to platform.

kieski

  • Newbie
  • Posts: 2
Re: EDivByZero when mouse move in window (custom gui binding)
« Reply #2 on: May 05, 2016, 02:30:03 pm »
Thanks, it works now!

 

TinyPortal © 2005-2018