How to resolve python3 Error: Segmentation fault (core dumped) when use while loop in thread
Dec 21, 2021
my python3 script needs to run while loop in background by thread.
But when I run thread with while loop I get Error: Segmentation fault (core dumped). I resolved this error by change from thread to pyqt Qtimer
Example script below
from PyQt5.QtCore import QTimer
def my_check_process_function():
print(“check process”)
timer=QTimer()
timer.timeout.connect(my_check_process_function)
timer.start(3000)
if you got hang when you use qtimer check my article : https://medium.com/@chuanchudabut/how-to-simple-run-python3-thread-in-pyqt5-qtimer-780a492eca4