Webbrowsing 64bit lazarus / 34-Windows ---------------------------------------------------------------------- Timewarp · 2012-08-26 19:41 I don't need this, just tested it for fun. Does 64bit TEvsWebbrowser work for anyone? It runs, but I'm getting crashes like "Control-C hit" or "Division by zero" when clicking links. I use 2.7.1 (32-bit works very well) Is there some way to debug, where these might come from? ---------------------------------------------------------------------- Phil · 2012-08-26 20:10 Quote from: Timewarp on August 26, 2012, 09:41:10 pmI don't need this, just tested it for fun. Does 64bit TEvsWebbrowser work for anyone? It runs, but I'm getting crashes like "Control-C hit" or "Division by zero" when clicking links. I use 2.7.1 (32-bit works very well) Is there some way to debug, where these might come from? I've never heard of TEvsWebbrowser. Where did you obtain source? Thanks. -Phil ---------------------------------------------------------------------- Timewarp · 2012-08-26 20:28 Quote from: Phil on August 26, 2012, 10:10:35 pmI've never heard of TEvsWebbrowser. Where did you obtain source?http://wiki.freepascal.org /LazActiveX#TActiveXContainer_early_binding or some threads bellow in this section. I think errors are separate problems. First one could be some x64 compiler bug, it doesn't show when running application outside IDE. Second one "divizion by zero" is fatal, makes browser unresponsive. ---------------------------------------------------------------------- BigChimp · 2012-08-27 04:47 Windows 64, that control-C hit and division by zero thing reminds me of the problems on Win64 FPC with exception handling in DLLs (e.g. when using an embedded database library). See e.g. here: http://bugs.freepascal.org/view.php?id=21581 and here for a more general one: http://bugs.freepascal.org/view.php?id=17280 A new exception handler mechanism, using Structured Exception Handling, is in testing on FPC trunk. You could try to recompile FPC with "-dTEST_WIN64_SEH", then recompile Lazarus (e.g. in fpcup, pass --fpcopt="-dTEST_WIN64_SEH"... and see if that fixes things. Of course, I might well be wrong and the problem could be with the ActiveX code, not the compiler. Thinking about it some more: I actually have no idea if 64 bit ActiveX is supported under Windows, but presumably it might be as Office nowadays also has a 64 bit version... that presumably still allows ActiveX usage... ---------------------------------------------------------------------- Timewarp · 2012-08-27 06:23 Quote from: BigChimp on August 27, 2012, 06:47:35 am- dTEST_WIN64_SEHBoth error messages are gone, but it still crashes when clicking links. Example lazarus homepage "Forum" link works, but left side "FAQ" I get "External: SIGFPE". Outside IDE "xxx has stopped working.." (Win7/64/Pro) -edit- Just tested to run exe in Win8 and it works much better. But still crashes sometimes ---------------------------------------------------------------------- ludob · 2012-08-27 07:18 Freepascal and Delphi use a floating point exception mask which is different from the default C mask. See http://wiki.lazarus.freepascal.org/SAPI for a workaround on win32. Win64 uses sse for floating point operations but the FPU mask still exists. Better use the SetExceptionMask function in the Math unit that handles both fpu and sse. http://www.freepascal.org/docs- html/rtl/math/setexceptionmask.html. Code: [Select]SetExceptionMask(GetExceptionMask + [exZeroDivide]); ---------------------------------------------------------------------- Timewarp · 2012-08-27 07:35 Quote from: ludob on August 27, 2012, 09:18:13 amCode: [Select]SetExceptionMask(GetExceptionMask + [exZeroDivide]);  That fixes it, thanks! I had already tried Set8087CW($133F); that does it in Delphi.