[Lazarus] Gtk2 division by 0 in themes fix
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jul 15 19:50:42 CEST 2008
On Tue, 15 Jul 2008 15:51:42 +0200
Ales Katona <almindor at gmail.com> wrote:
> I noticed you added a Set8087CW() to fix this problem, but it doesn't
> work for me, at least on amd64 with trackbar.
>
> I made a simple pure gtk+ C and pascal 1:1 program to test this and
> found out that setting $1332 or $133f doesn't help at all.
>
> Setting via math unit (SetExceptionMask(GetExceptionMask +
> exZeroDivide) however does fix it. It's good enough to do this around
> gtk_main() too it seems (for the trackbar at least).
>
> I think the best thing to do here is to use the Math unit functions
> and Set/Unset the exZeroDivide mask before/after gtk_main.
>
> Again, the Set8087CW change didn't fix it on amd64/gtk2 (and possibly
> introduced various issues for math users).
Thanks for the hint.
Changed in 15785.
Mattias
More information about the Lazarus
mailing list