pythonpython-3.xcomtypesfaulthandler

Python outputs Windows fatal exception: code 0x8001010


I have an automation test framework that is using unittest python framework under the hood. It has been producing a segmentation fault. I isolated it to the usage of a DLL library.

I ran my python program with faulthandler enabled to obtain more traceback information on the segmentation fault.

My program was spitting out a bunch of error's but continues to run.

Multiple errors popping up here

    tb_e = traceback.TracebackException(excType, value, tb, limit=length,
  File "C:\Python310\lib\traceback.py", line 502, in __init__
    self.stack = StackSummary.extract(
  File "C:\Python310\lib\traceback.py", line 379, in extract
    linecache.checkcache(filename)
  File "C:\Python310\lib\linecache.py", line 72, in checkcache
    stat = os.stat(fullname)
ValueError: stat: embedded null character in path

Finally, at the end of the run I got the output:

Windows fatal exception: code 0x80010108

Thread 0x0000b778 (most recent call first):
  File "C:\Python310\lib\site-packages\comtypes\__init__.py", line 185 in _shutdown
Windows fatal exception: code 0x80010108

Thread 0x0000b778 (most recent call first):
  File "C:\Python310\lib\site-packages\comtypes\__init__.py", line 185 in _shutdown

Googling shows error code 0x80010108 interpreted as Windows Update Error? This error is quite confusing to me because I am not doing a window's update during this time. How would I continue to debug this issue?


Solution

  • The described problem is very similar with this Open github issue: https://github.com/pywinauto/pywinauto/issues/858

    If you happen to use pywinauto, reading the thread may worth your time. It seems that there are certain python and windows version combinations which trigger the issue described above.

    To get rid of the problem you can try: