Operating system: MacOS Big Sur
Graphics card: -
Short description of error
When an HTTP request fails repeatedly in the try/catch on line 36 of blenderkit/rerequests.py, it recurses infinitely, causing a crash of Blender.
The change responsible is (I believe) this patch:
28 def rerequest(method, url, **kwargs): 29 # first get any additional args from kwargs 30 immediate = False 31 if kwargs.get('immediate'): 32 immediate = kwargs['immediate'] 33 kwargs.pop('immediate') 34 # first normal attempt 35 try: 36 response = requests.request(method, url, **kwargs) 37 except: 38 return rerequest(method, url, **kwargs) ...
Exact steps for others to reproduce the error
- Enable Blenderkit
- Go to your favorite coffeeshop and connect to their janky wifi, but don't log in
- Encounter HTTPS request failures (i.e. not a complete 401 HTTP response, but an actual failure)
- Let Blenderkit recurse itself to death
Increment a counter and only recurse N times before failing. Ideally, we should also wait a few sec before retrying each time, since this causes immediate, extremely-deep recursion as-is.