fireeye/pywintrace

Exception in ProcessTrace function

yehudaeitam opened this issue · 2 comments

Hey,
First of all, it's a great library. It's helped me a lot.
I ported the library to python 2.7, and maybe this is part of the problem (but it does not look like this is the problem).
The library is working good when its standalone code, but when I try to use it within an exists project there is problems.
In some cases there is an exception on:

if tdh.ERROR_SUCCESS != et.ProcessTrace(ct.byref(trace_handle), 1, None, None):
within _run function inside etw.py

according to MSDN this function not supposed to raise exceptions so I think it's from ctypes.
The exception is not constant but the most common exceptions are "access violation writing 0xE09269EA" (or another address) or "access violation reading 0x00000000."

If you are getting an access violation the memory being written to/read from is inaccessible for that operation. See:

There are a lot of reasons that could happen, but a common one is dereferencing a null pointer - which looks like what is happening in the second case.

Closing issue.