gotthardp / python-mercuryapi

Python wrapper for the ThingMagic Mercury API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random program exit

rihardiii opened this issue · comments

Hi,
My read program randomly quits.

x = 80905
[EPC(b'E20000196302003718405C2B')]
Start: 2020-02-10 14:20:14.658062
Now = 2020-02-11 13:07:33.756684
x = 80906
[EPC(b'E20000196302003718405C2B')]
Start: 2020-02-10 14:20:14.658062
Now = 2020-02-11 13:07:34.767924
x = 80907
[EPC(b'E20000196302003718405C2B')]
Start: 2020-02-10 14:20:14.658062
Now = 2020-02-11 13:07:35.783126
x = 80908
Traceback (most recent call last):
File "test.py", line 47, in
print(reader.read())
RuntimeError: Timeout

x is the times the tag was read
im using reader.read() in while True
Also im not the only one with this problem, my friend also has the same issue, and hasnt found the answer yet. using start_reading also the same issue, just faster...

I think i might have experienced the same error. Here's my stacktrace from GDB

Thread 4 "python3.6" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x756dd460 (LWP 17940)]
PyErr_SetObject (exception=exception@entry=<type at remote 0x2c7d9c>,
    value=value@entry='Timeout') at ../Python/errors.c:84
84          Py_XINCREF(value);
(gdb) bt
#0  PyErr_SetObject (exception=exception@entry=<type at remote 0x2c7d9c>,
    value=value@entry='Timeout') at ../Python/errors.c:84
#1  0x000953ca in PyErr_SetString (exception=<type at remote 0x2c7d9c>,
    string=0x76a40920 "Timeout") at ../Python/errors.c:157
#2  0x769cd81e in notify_exception_listeners ()
   from /usr/lib/python3/dist-packages/mercury.cpython-36m-arm-linux-gnueabihf.so
#3  0x769ce84a in ?? ()
   from /usr/lib/python3/dist-packages/mercury.cpython-36m-arm-linux-gnueabihf.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info threads
  Id   Target Id         Frame
  1    Thread 0x76fee210 (LWP 17930) "python3.6" __libc_do_syscall ()
    at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
  2    Thread 0x7681c460 (LWP 17938) "python3.6" __libc_do_syscall ()
    at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
  3    Thread 0x75ede460 (LWP 17939) "python3.6" __libc_do_syscall ()
    at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
* 4    Thread 0x756dd460 (LWP 17940) "python3.6" PyErr_SetObject (
    exception=exception@entry=<type at remote 0x2c7d9c>, value=value@entry='Timeout')
    at ../Python/errors.c:84