BlenderKit crashes Blender startup if no active internet connection available #88901

Closed
opened 2021-06-06 23:45:54 +02:00 by Tom Freudenberg · 27 comments

System Information
Operating system: macOS-11.3.1-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Apple 4.1 Metal - 71.5.9

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: blender/blender@84da05a8b8
Error was introduced in 9f4246767a
Worked: 2.93.0 (MacOS-Intel), 2.93.0 (MacOS-ARM)

Addon Information
Name: BlenderKit Online Asset Library (2, 93, 0)
Author: Vilem Duha, Petr Dlouhy

Short description of error
Blender crashes on startup, if BlenderKit Addon is activated and no internet connection is active (wireless deactivated).
Could be reproduced on both Intel and ARM versions for MacOS M1.
No crash if Wireless or LAN connection is enabled and active before Blender launch.
No crash if BlenderKit Addon is disabled in Blender preferences.

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]

  • Activate BlenderKit Addon in Blender, then close Blender.
  • Disable both WLAN (and LAN) connection on MacOS (via the menu bar).
  • Start Blender.
  • Blender loads the welcome screen, then crashes.

Enable WLAN or LAN connection again and restart Blender -> Blender loads as expected and Blenderkit can be accessed.

System Crash report: blender293_crash.txt

Verification that BlenderKit Addon is the root cause:

  • Disable BlenderKit add-on in Blender preferences, close Blender, disable WLAN and LAN connection
  • Start Blender

Blender starts and loads the welcome screen without crash

Please don't hesitate to ask for more tests if needed.

**System Information** Operating system: macOS-11.3.1-arm64-arm-64bit 64 Bits Graphics card: Apple M1 Apple 4.1 Metal - 71.5.9 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `blender/blender@84da05a8b8` Error was introduced in 9f4246767a Worked: 2.93.0 (MacOS-Intel), 2.93.0 (MacOS-ARM) **Addon Information** Name: BlenderKit Online Asset Library (2, 93, 0) Author: Vilem Duha, Petr Dlouhy **Short description of error** Blender crashes on startup, if BlenderKit Addon is activated and no internet connection is active (wireless deactivated). Could be reproduced on both Intel and ARM versions for MacOS M1. No crash if Wireless or LAN connection is enabled and active before Blender launch. No crash if BlenderKit Addon is disabled in Blender preferences. **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] - Activate BlenderKit Addon in Blender, then close Blender. - Disable both WLAN (and LAN) connection on MacOS (via the menu bar). - Start Blender. - Blender loads the welcome screen, then crashes. # Enable WLAN or LAN connection again and restart Blender -> Blender loads as expected and Blenderkit can be accessed. System Crash report: [blender293_crash.txt](https://archive.blender.org/developer/F10160238/blender293_crash.txt) Verification that BlenderKit Addon is the root cause: - Disable BlenderKit add-on in Blender preferences, close Blender, disable WLAN and LAN connection - Start Blender # Blender starts and loads the welcome screen without crash Please don't hesitate to ask for more tests if needed.

Added subscriber: @snowflake089

Added subscriber: @snowflake089

#92086 was marked as duplicate of this issue

#92086 was marked as duplicate of this issue

#90112 was marked as duplicate of this issue

#90112 was marked as duplicate of this issue

#89524 was marked as duplicate of this issue

#89524 was marked as duplicate of this issue

blender/blender#89095 was marked as duplicate of this issue

blender/blender#89095 was marked as duplicate of this issue

#89057 was marked as duplicate of this issue

#89057 was marked as duplicate of this issue

blender/blender#89003 was marked as duplicate of this issue

blender/blender#89003 was marked as duplicate of this issue

#88916 was marked as duplicate of this issue

#88916 was marked as duplicate of this issue

Added subscriber: @CreepUA

Added subscriber: @CreepUA

Added subscriber: @j6m8

Added subscriber: @j6m8

Added subscribers: @VilemDuha, @rjg

Added subscribers: @VilemDuha, @rjg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

@VilemDuha You seem to have implemented an infinite recursion as described in the merged ticket blender/blender#89003 and as indicated by the crash log in this ticket.

@VilemDuha You seem to have implemented an infinite recursion as described in the merged ticket blender/blender#89003 and as indicated by the crash log in this ticket.

Migrating comment from https://developer.blender.org/T89003:

Just tested that the following patch resolves this:

--- rerequests.py	2021-06-09 10:55:53.000000000 -0400
+++ rerequests.patch.py	2021-06-09 10:58:54.000000000 -0400
@@ -24,6 +24,7 @@
 import logging
 bk_logger = logging.getLogger('rerequests')

+DEFAULT_MAX_RETRIES = 10

 def rerequest(method, url, **kwargs):
     # first get any additional args from kwargs
@@ -31,11 +32,14 @@
     if kwargs.get('immediate'):
         immediate = kwargs['immediate']
         kwargs.pop('immediate')
+    retries_remaining = kwargs.get("retries", DEFAULT_MAX_RETRIES)
     # first normal attempt
     try:
         response = requests.request(method, url, **kwargs)
-    except:
-        return rerequest(method, url, **kwargs)
+    except Exception as e:
+        if retries_remaining <= 0:
+            raise e
+        return rerequest(method, url, retries=retries_remaining - 1, **kwargs)

     bk_logger.debug(url+ str( kwargs))
     bk_logger.debug(response.status_code)
Migrating comment from https://developer.blender.org/T89003: Just tested that the following patch resolves this: ``` --- rerequests.py 2021-06-09 10:55:53.000000000 -0400 +++ rerequests.patch.py 2021-06-09 10:58:54.000000000 -0400 @@ -24,6 +24,7 @@ import logging bk_logger = logging.getLogger('rerequests') +DEFAULT_MAX_RETRIES = 10 def rerequest(method, url, **kwargs): # first get any additional args from kwargs @@ -31,11 +32,14 @@ if kwargs.get('immediate'): immediate = kwargs['immediate'] kwargs.pop('immediate') + retries_remaining = kwargs.get("retries", DEFAULT_MAX_RETRIES) # first normal attempt try: response = requests.request(method, url, **kwargs) - except: - return rerequest(method, url, **kwargs) + except Exception as e: + if retries_remaining <= 0: + raise e + return rerequest(method, url, retries=retries_remaining - 1, **kwargs) bk_logger.debug(url+ str( kwargs)) bk_logger.debug(response.status_code) ```
Jordan Matelsky was assigned by Pratik Borhade 2021-06-09 19:50:14 +02:00

Added subscriber: @audiobunnyrepairs

Added subscriber: @audiobunnyrepairs

Added subscribers: @FastKapa, @PratikPB2123, @Zandman

Added subscribers: @FastKapa, @PratikPB2123, @Zandman
Pratik Borhade changed title from BlenderKit crashes Blender startup if no active internet connection available (MacOS) to BlenderKit crashes Blender startup if no active internet connection available 2021-06-13 09:08:33 +02:00

Added subscriber: @flyway

Added subscriber: @flyway

Since this can lead to a crash and is still not fixed in the 2.93 branch, I'm raising the priority to high.

Since this can lead to a crash and is still not fixed in the 2.93 branch, I'm raising the priority to high.
Collaborator

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Collaborator

I asked @Jeroen-Bakker to merge the commits which fix the problem into 2.93 master before 2.93.2 comes out.

I asked @Jeroen-Bakker to merge the commits which fix the problem into 2.93 master before 2.93.2 comes out.

Added subscriber: @Rohit7725

Added subscriber: @Rohit7725

Added subscriber: @Asteroidskyline

Added subscriber: @Asteroidskyline

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Hi @VilemDuha is this already fixed in the latest 2.93 LTS? Can we close it?

Hi @VilemDuha is this already fixed in the latest 2.93 LTS? Can we close it?

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscriber: @BuuGraphic

Added subscriber: @BuuGraphic

Detach[Alt+LMB] operation is now Detach only for the actively selected node
Is it possible to select multiple nodes and detach them as before?

Detach[Alt+LMB] operation is now Detach only for the actively selected node Is it possible to select multiple nodes and detach them as before?
Sign in to join this conversation.
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#88901
There is no content yet.