Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The addon freezes Blender when it tries to load it. #12

Open
inkoalawetrust opened this issue Sep 25, 2022 · 7 comments
Open

The addon freezes Blender when it tries to load it. #12

inkoalawetrust opened this issue Sep 25, 2022 · 7 comments
Labels
bug Addon bugs

Comments

@inkoalawetrust
Copy link

I'm not sure how this is happening, but ever since today, the addon has caused my Blender installation to freeze. It causes Blender to hang when it tries to load it on startup, or if you try enabling it on the preferences window. Even trying to open my previous versions of 2.93 and 3.2 caused the same problem. The only way to stop the freezing was for me to remove it from the scripts folder so Blender can't find it and load it while it's using my main config.

I have no idea why that is happening, or why it spontaneously begun just today. But it did make me think that somehow my userpref.blend file was retroactively corrupted.

Here is the script of the addon from the appdata scripts folder for 3.3, along with my preferences file too. In case that can help you troubleshoot this bizarre bug.

Prefs and addon.zip

@abrasic abrasic added the bug Addon bugs label Sep 25, 2022
@abrasic
Copy link
Owner

abrasic commented Sep 25, 2022

Hi, thanks for your report and I apologize for the issue you've been facing. Unfortunately, I have not been able to reproduce it so far.

From the zip you provided, it appears you aren't using the latest version (you are using 1.7.1, the latest is 1.8.0). It's also important to note that an active internet connection is required in order for the add-on to properly make calls to the RPC, otherwise blender will hang until a connection is made (this also includes on startup).

Perhaps you've been having connection issues lately? Make sure you're properly able to connect to discord.com, and ensure that no firewalls are somehow blocking in/out traffic from the Discord client and Blender.

After ensuring your connection and if it still fails to load, what GPU(s) are you using? This may not sound relevant to the problem, although the script also grabs your GPU name as a display option on startup which would be the only other thing I would believe to cause a crash.

Thanks

@inkoalawetrust
Copy link
Author

Installing the latest version seems to not cause Blender to freeze, also keep in mind that this just happened completely out of nowhere, and had never occurred before.

From the zip you provided, it appears you aren't using the latest version (you are using 1.7.1, the latest is 1.8.0). It's also important to note that an active internet connection is required in order for the add-on to properly make calls to the RPC, otherwise blender will hang until a connection is made (this also includes on startup).

Perhaps you've been having connection issues lately? Make sure you're properly able to connect to discord.com, and ensure that no firewalls are somehow blocking in/out traffic from the Discord client and Blender.

Nah, I was not having any connection issues when that begun, especially with Discord, since I was actively asking people on Discord if they have any idea what could be causing this sudden freezing.

That being said, the addon freezing the entire program if there is no internet connection sounds like a massive bug in itself. What if somebody is in a location without reliable internet, and their connection begins cutting off while they are working on a project ?

As for my GPU, it's a Gigabyte RTX 2060.

@abrasic
Copy link
Owner

abrasic commented Sep 25, 2022 via email

@inkoalawetrust
Copy link
Author

Nothing weird is being logged on the console when enabling the addon, even when I reinstall the old 1.7.1 version and re-enable it.

reloading addon: blendpresence 1664131923.744588 1664131928.8932683 'C:\\Users\\inkoalawetrust\\AppData\\Roaming\\Blender Foundation\\Blender\\3.3\\scripts\\addons\\blendpresence\\__init__.py'
Modules Installed () from 'C:\\Users\\inkoalawetrust\\Documents\\Blender Plugins\\blendpresence1.7.1.zip' into 'C:\\Users\\inkoalawetrust\\AppData\\Roaming\\Blender Foundation\\Blender\\3.3\\scripts\\addons'
module changed on disk: 'C:\\Users\\inkoalawetrust\\AppData\\Roaming\\Blender Foundation\\Blender\\3.3\\scripts\\addons\\blendpresence\\__init__.py' reloading...
[BP] Connected!

@Davilarek
Copy link

Davilarek commented Jan 26, 2023

just experienced same issue. I launched blender with debug mode, and seen nothing weird. I got angry and just smashed ctrl-c to exit. But then a traceback said something about this addon. Full traceback here:

Traceback (most recent call last):
  File "C:\Users\davil\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blendpresence\__init__.py", line 67, in updatePresenceTimer
    updatePresence()
  File "C:\Users\davil\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blendpresence\__init__.py", line 357, in updatePresence
    rpcClient.update(
  File "C:\Users\davil\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blendpresence\pypresence\presence.py", line 34, in update
    return self.loop.run_until_complete(self.read_output())
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\base_events.py", line 628, in run_until_complete
    self.run_forever()
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\base_events.py", line 595, in run_forever
    self._run_once()
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\base_events.py", line 1845, in _run_once
    event_list = self._selector.select(timeout)
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\windows_events.py", line 439, in select
    self._poll(timeout)
  File "F:\Program Files\Blender\3.3\python\lib\asyncio\windows_events.py", line 788, in _poll
    status = _overlapped.GetQueuedCompletionStatus(self._iocp, ms)
KeyboardInterrupt

It seems to get stuck on function updatePresenceTimer.

EDIT: Some info:

  • GTX 1050 Ti
  • Windows 10
  • Blender 3.3 LTS
  • Discord is running

@abrasic
Copy link
Owner

abrasic commented Jan 26, 2023

I have been able to replicate a freezing issue on latest software some while ago, however this was a time where Discord services were slow, thus causing the presence to freeze the client until the Discord RPC responded.

While most freezes end up to be an issue on pypresence's end, Most of the freezing problems will most likely be fixed if (a) I get the time to make the functions asynchronous and (b) I write better error handling; both of which are planned for the next release.

@ScrubN
Copy link

ScrubN commented Jul 26, 2023

As of recent, this plugin seems to inconsistently cause Blender to completely lock up during plugin init.

I tested Blender versions 3.2-3.6.1 using plugin version 1.7.1, all of which exhibit the lock up. By launching Blender via a terminal, I was able to abort loading the plugin with ctrl + c showing the culprit is the RPC connector.
image

While most freezes end up to be an issue on pypresence's end

Based on the stacktrace it seems this is the case for me. For some stupid reason pypresence does not have a maximum iteration count when trying to connect to discord.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addon bugs
Projects
None yet
Development

No branches or pull requests

4 participants