Closed aantn closed 3 years ago
Hi,
What OS/Python version are you using? (with minor version info)
Could you provide a simple test script to reproduce the issue. E.x: I am running following script and could not see any issue on Python 2.7.16
on Ubuntu 64-bit:
import yappi
import time
def foo():
time.sleep(0.1)
n = 0
while (n < 5):
yappi.start()
foo()
yappi.stop()
yappi.get_func_stats().print_all()
n += 1
Your example doesn't reproduce the issue for me either. This example with multithreading does:
import yappi
import time
import thread
def foo():
while 1:
time.sleep(0.1)
n = 0
thread.start_new(foo, ())
while True:
yappi.start()
time.sleep(0.15)
yappi.stop()
yappi.get_func_stats().print_all()
I have fixed the issue in #72 .
Thanks for reporting!
On Python 2.7 when constantly calling start/stop/get_func_stats I repeatedly see the following error:
SystemError: NULL object passed to Py_BuildValue
Any idea what could be causing this?