import traceback\r
import time\r
import threading\r
-from ctypes import *\r
+from ctypes import windll, oledll\r
+import ctypes.wintypes\r
import winUser\r
from logHandler import log\r
\r
except:\r
pass\r
\r
+@ctypes.WINFUNCTYPE(ctypes.wintypes.LONG, ctypes.c_void_p)\r
+def crashHandler(exceptionInfo):\r
+ # An exception might have been set for this thread.\r
+ # Clear it so that it doesn't get raised in this function.\r
+ ctypes.pythonapi.PyThreadState_SetAsyncExc(threading.currentThread().ident, None)\r
+ import core\r
+ core.restart()\r
+ return 1 # EXCEPTION_EXECUTE_HANDLER\r
+\r
def initialize():\r
"""Initialize the watchdog.\r
"""\r
if isRunning:\r
raise RuntimeError("already running") \r
isRunning=True\r
+ # Catch application crashes.\r
+ windll.kernel32.SetUnhandledExceptionFilter(crashHandler)\r
oledll.ole32.CoEnableCallCancellation(None)\r
_coreAliveEvent.set()\r
_resumeEvent.set()\r
- In Mozilla Gecko (e.g. Firefox) Heading levels are now announced when using object navigation.\r
- Text formatting can now be reported when using browse mode in Mozilla Gecko (e.g. Firefox and Thunderbird). (#394)\r
- Text with underline and/or strikethrough can now be detected and reported in standard IAccessible2 text controls such as in Mozilla applications.\r
+- NVDA will now restart itself if it crashes.\r
\r
\r
== Bug Fixes ==\r