FPU Control Word

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

FPU Control Word

Postby hgourvest » Mon Feb 28, 2011 9:17 am

Hi,

Libcef use 0x27F as Control Word, so I have a problem using CEF with Delphi
because Delphi use a different Control Word: 0x1372.

For exemple I have this error calling CefDoMessageLoopWork:
Exception EZeroDivide in module libcef.dll at 008E8C49, Floating point division by zero.
I can also have AV errors ...

Actually I do that to fix it:

Code: Select all
{$IFNDEF CEF_MULTI_THREADED_MESSAGE_LOOP}
procedure CefDoMessageLoopWork;
var
  cw: Word;
begin
  if LibHandle > 0 then
  begin
     cw := Get8087CW;
     Set8087CW($27F);
     try
       cef_do_message_loop_work;
     finally
       Set8087CW(cw);
     end;
  end;
end;
{$ENDIF}


I don't know how to interpret this problem.
I suspect this to be related with other strange random issues I have (images don't display ...)
If you change the Control Word of the cefclient application with Delphi one, you should be able to reproduce the problems I have.

I guess other languages could have the same problem.

regards

Henri
hgourvest
Newbie
 
Posts: 7
Joined: Thu May 27, 2010 2:31 am

Re: FPU Control Word

Postby magreenblatt » Mon Feb 28, 2011 9:50 am

magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: kimcey, Majestic-12 [Bot] and 61 guests