HELL YEAH! I think i have found the problem!
In eg\WinApi\HID.py after the HID Plugin is started, it causes a disconnect of the iMON Device... The Device automatically reconnects itselfs, but HID.py does NOT wait for this reconnect, so the following-code runs into an exception...
Code: Select all
#initializing finished
try:
self.handle = handle;
self.initialized = True
rc, newBuf = win32file.ReadFile(handle, n, self._overlappedRead)
if eg.debugLevel:
print self.getName() + "init done. Entering loop"
self.lockObject.release()
while not self.abort:
if rc == 997: #error_io_pending
win32event.WaitForSingleObject(self._overlappedRead.hEvent, win32event.INFINITE)
buf = newBuf
try:
win32event.ResetEvent(self._overlappedRead.hEvent)
rc, newBuf = win32file.ReadFile(handle, n, self._overlappedRead)
...which causes the Events are NOT readed from the iMON Device.
BUT: If u insert a time.sleep(10) at line 264 to wait for the automatic reconnect...
Code: Select all
def run(self):
#open file/device
try:
eg.log.Print("Before")
time.sleep(10)
eg.log.Print("After")
... it works like a charm.
NOW i have to find out WHY the device disconnects itself at HID start...
@Bartman: I really could need your help now.