Hi,
I have a script running to power a small game, every I can't get past a few loops of the game without it throwing a Seg Fault - looking at the script with
Here is the most recent call back:
Thread 0x76f06010 (most recent call first):
File "/usr/lib/python3.5/http/cookiejar.py", line 950 in set_ok
File "/usr/lib/python3.5/http/cookiejar.py", line 1665 in extract_cookies
File "/home/pi/.local/lib/python3.5/site-packages/requests/cookies.py", line 132 in extract_cookies_to_jar
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 677 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 526 in request
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 679 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/adapters.py", line 533 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/cookies.py", line 132 in extract_cookies_to_jar
File "/usr/lib/python3.5/http/cookiejar.py", line 1669 in extract_cookies
File "/usr/lib/python3.5/http/cookiejar.py", line 1629 in make_cookies
File "/usr/lib/python3.5/http/cookiejar.py", line 1563 in _cookies_from_attrs_set
File "/usr/lib/python3.5/http/cookiejar.py", line 1462 in _normalized_cookie_tuples
File "/usr/lib/python3.5/socket.py", line 576 in readinto
File "/usr/lib/python3.5/http/client.py", line 915 in send
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/connection.py", line 182 in connect
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/connection.py", line 170 in _new_conn
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/util/connection.py", line 71 in create_connection
Segmentation fault
Has anyone come across this before? Happy to share script if required.
Thanks
I have a script running to power a small game, every I can't get past a few loops of the game without it throwing a Seg Fault - looking at the script with
faulthandler
it is showing the seg fault comes from the python 'requests' library. The script makes regular (every 2 second) http requests to check the state of the game which is store in a web app. The game waits for GPIO input from 6 sources using GPIO.add_event_detect
and once the event is detected it makes a post request and removes the event, this request is made which the game is making it's regular requests.Here is the most recent call back:
Thread 0x76f06010 (most recent call first):
File "/usr/lib/python3.5/http/cookiejar.py", line 950 in set_ok
File "/usr/lib/python3.5/http/cookiejar.py", line 1665 in extract_cookies
File "/home/pi/.local/lib/python3.5/site-packages/requests/cookies.py", line 132 in extract_cookies_to_jar
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 677 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 526 in request
File "/home/pi/.local/lib/python3.5/site-packages/requests/sessions.py", line 679 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/adapters.py", line 533 in send
File "/home/pi/.local/lib/python3.5/site-packages/requests/cookies.py", line 132 in extract_cookies_to_jar
File "/usr/lib/python3.5/http/cookiejar.py", line 1669 in extract_cookies
File "/usr/lib/python3.5/http/cookiejar.py", line 1629 in make_cookies
File "/usr/lib/python3.5/http/cookiejar.py", line 1563 in _cookies_from_attrs_set
File "/usr/lib/python3.5/http/cookiejar.py", line 1462 in _normalized_cookie_tuples
File "/usr/lib/python3.5/socket.py", line 576 in readinto
File "/usr/lib/python3.5/http/client.py", line 915 in send
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/connection.py", line 182 in connect
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/connection.py", line 170 in _new_conn
File "/home/pi/.local/lib/python3.5/site-packages/urllib3/util/connection.py", line 71 in create_connection
Segmentation fault
Has anyone come across this before? Happy to share script if required.
Thanks