Guest User

Untitled

a guest
Apr 25th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. How to debug division by zero exception in Internet Explorer?
  2. Exception EZeroDivide in module mshtml.dll at 00378B89.
  3. Floating point division by zero.
  4.  
  5. Exception raised by object: TEmbeddedWB
  6.  
  7.  
  8. Full Exception Details:
  9. EZeroDivide
  10. ExceptionCode: 0xC000008E (EXCEPTION_FLT_DIVIDE_BY_ZERO)
  11. The thread tried to divide a floating-point value by a floating-point divisor of zero.
  12. ExceptionFlags: 0x00000002
  13. ExceptionAddress: 0x574C8B89
  14. Parameters: (0x00000000)
  15. EXCEPTION_RECORD: nil
  16. Message: Floating point division by zero
  17.  
  18.  
  19. Stack Trace:
  20. [574C8B89] Unknown function at DllGetClassObject + $FF033
  21. [004CA61E] OleCtrls.TOleControl.WndProc (Line 2171, "olectrls.pas" + 12) + $10
  22. [006CF62A] EmbeddedWB.TEmbeddedWB.WBWndProc (Line 1492, "EmbeddedWB.pas" + 31) + $8
  23. [0046200C] Forms.StdWndProc (Line 1459, "Forms.pas" + 8) + $0
  24. [0046D2A2] Forms.TApplication.IsKeyMsg (Line 6588, "Forms.pas" + 20) + $1E
  25. [0046D43F] Forms.TApplication.ProcessMessage (Line 6626, "Forms.pas" + 9) + $2A
  26. [0046D4AB] Forms.TApplication.HandleMessage (Line 6649, "Forms.pas" + 1) + $6
  27. [0046938C] Forms.TCustomForm.ShowModal (Line 4692, "Forms.pas" + 22) + $5
  28. [007D72AD] FMain.TfrmMain.actControlPanelExecute (Line 566, "FMain.pas" + 5) + $5
  29. [00424AF5] Classes.TBasicAction.Execute (Line 8077, "Classes.pas" + 3) + $9
  30. [00455369] ActnList.TContainedAction.Execute + $31
  31. [0045B6AE] Menus.TMenuItem.Click (Line 1738, "Menus.pas" + 9) + $8
  32. [0045CD71] Menus.TMenu.DispatchCommand (Line 2446, "Menus.pas" + 5) + $5
  33.  
  34. ModLoad: 00000000`75360000 00000000`75372000 C:Windowssyswow64DEVOBJ.dll
  35. ModLoad: 00000000`71940000 00000000`719fa000 C:WindowsSysWOW64d2d1.dll
  36. ModLoad: 00000000`715e0000 00000000`716ea000 C:WindowsSysWOW64DWrite.dll
  37. ModLoad: 00000000`71870000 00000000`718f3000 C:WindowsSysWOW64dxgi.dll
  38. ModLoad: 00000000`74fb0000 00000000`74fdd000 C:Windowssyswow64WINTRUST.dll
  39. ModLoad: 00000000`71db0000 00000000`71ddc000 C:WindowsSysWOW64d3d10_1.dll
  40. ModLoad: 00000000`71900000 00000000`7193a000 C:WindowsSysWOW64d3d10_1core.dll
  41. ModLoad: 00000000`6e5c0000 00000000`6e6ec000 C:WindowsSysWOW64D3D10Warp.dll
  42. ModLoad: 00000000`6d480000 00000000`6d63b000 C:WindowsSysWOW64jscript9.dll
  43. ModLoad: 00000000`714f0000 00000000`714fb000 C:WindowsSysWOW64msimtf.dll
  44. ModLoad: 00000000`6f080000 00000000`6f0ab000 C:WindowsSysWOW64msls31.dll
  45. ModLoad: 00000000`082c0000 00000000`082fc000 C:WindowsSysWOW64Oleacc.dll
  46. ModLoad: 00000000`613e0000 00000000`6140e000 C:WindowsSysWOW64MLANG.dll
  47. ModLoad: 00000000`62bb0000 00000000`62cb2000 C:WindowsSysWOW64d3d10.dll
  48. ModLoad: 00000000`62b70000 00000000`62ba3000 C:WindowsSysWOW64d3d10core.dll
  49. (834.d04): Unknown exception - code c000008e (first chance)
  50.  
  51. procedure TfrmControlPanel.FormCreate(Sender: TObject);
  52. begin
  53. FSaved8087CW := Default8087CW; // Save this because Set8087CW changes it.
  54. Set8087CW($027F); //restore later using Set8087CW(FSaved8087CW);
  55. //$027F comes from http://msdn.microsoft.com/en-us/library/ms235300.aspx
  56.  
  57. {
  58. Scrolling in browser was causing floating point exceptions
  59.  
  60. http://stackoverflow.com/questions/9472265/how-to-debug-division-by-zero-exception-in-internet-explorer
  61.  
  62. What it boils down to is that MS habitually compile their code with FP exceptions masked.
  63. Embarcadero tools habitually unmask them. Thus the MS code is written assuming that FP exceptions
  64. will not be raised and is not resilient to them. To deal with that you have to mask the exceptions
  65. before calling into the MS code. If your app does not floating point then just mask the exceptions
  66. at start up and be done with it. Call Set8087CW($027F) at start up and you are good to go.
  67.  
  68. Default8087CW: $1332 = 0001 0011 0011 0010
  69. New 8087CW: $027F = 0000 0010 0111 1111
  70. ...I RCPC ..MM MMMM
  71.  
  72. Bit 0: Invalid Operation (IM) |
  73. Bit 1: Denormal Operand (DM) |
  74. Bit 2: Zero Divide (ZM) | Exception Masks (Bits 0..5)
  75. Bit 3: Overflow (OM) | When one of these mask bits is set, its corresponding x87 FPU
  76. Bit 4: Underflow (UM) | floating-point exception is blocked from being generated
  77. Bit 5: Precision (PM) |
  78. Bit 6: (reserved)
  79. Bit 7: (reserved)
  80. Bit 8: +Precision Control (PC) 00=Single Precision (24 bits), 10=Double Precision (53 bits), 11=Double Extended Precision (64 bits), 01=reserved
  81. Bit 9: /
  82. Bit 10: + Rounding Control (RC)
  83. Bit 11: /
  84. Bit 12: Infinity Control | not meaningful for anything past the 80287 math coprocessor
  85. Bit 13: (reserved)
  86. Bit 14: (reserved)
  87. Bit 15: (reserved)
  88. }
Advertisement
Add Comment
Please, Sign In to add comment