Closed risa2000 closed 5 years ago
Getting the exact same error here every time I save a script and this plug-in attempts to auto-reload my addon module. I hope this is just due to a simple API change. Help, Jacques, help! People at work depend on me.
Edit: I did a bit of debugging myself (I'm not a programmer mind you.) and it appears that the line causing the exception is line 16 in addons_update.py: bpy.ops.preferences.addon_disable(module=self.module_name) As soon as that line is executed, Blender crashes. The module_name string correct, so it must be the function itself. (Calling it from Blender's own python console works just fine btw.) That's all I can do to help.
I can confirm the issue. Unfortunately, I'm not entirely sure how to solve this correctly yet...
The issue is that the scripts run in a timer, which is context independent. However, e.g. when calling an operator, Blender always accesses some stuff in the context currently. It's unclear to me whether this is something I can completely fix in the addon, or if we need a better API for it in Blender.
Unfortunately, that means that the Run Script
operator won't work for a while now....
Looks like this is the same issue as the "Reload Addons" action as well -- Issue #38
Hopefully a proper fix can be found soon :-/
Sergey may have just fixed this on Blender's side: https://developer.blender.org/T65806
Try again with a recent git build of Blender and see if this one is fixed too (Issue #38 seems to be now)
Tested with the recent build (from the 20th of June), the exception is still there:
> Executing task in folder openvr: d:\Dev\blender-2.80.0-git.d30f72dfd8ac-windows64\blender.exe --python C:\Users\risa\.vscode\extensions\jacqueslucke.blender-development-0.0.12\pythonFiles\launch.py <
Read prefs: C:\Users\risa\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: d:\Dev\blender-2.80.0-git.d30f72dfd8ac-windows64\2.80\python
[]
* Serving Flask app "Blender Server" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:8695/ (Press CTRL+C to quit)
Sending: {'type': 'setup', 'blenderPort': 8695, 'ptvsdPort': 8573, 'blenderPath': 'd:\\Dev\\blender-2.80.0-git.d30f72dfd8ac-windows64\\blender.exe', 'scriptsFolder': 'd:\\Dev\\blender-2.80.0-git.d30f72dfd8ac-windows64\\2.80\\scripts', 'addonPathMappings': []}
Waiting for debug client.
Debug client attached.
Got GET: {'type': 'ping'}
127.0.0.1 - - [20/Jun/2019 12:08:16] "GET / HTTP/1.1" 200 -
Got POST: {'type': 'script', 'path': 'd:\\Work\\python\\test\\script ad90770d6d.py'}
127.0.0.1 - - [20/Jun/2019 12:08:16] "POST / HTTP/1.1" 200 -
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF7E9A88EE0
Module : d:\Dev\blender-2.80.0-git.d30f72dfd8ac-windows64\blender.exe
The terminal process terminated with exit code: 11
Seems to be fixed for me as well.
@risa2000 Your build is from yesterday. This fix has been committed today. Please try tomorrows buildbot build.
Besides that, a better solution is still necessary...
Just to let you know, do not wait for me. I will be away from the keyboard for week or so, starting tomorrow, so I will not be able to test it.
Just tested it. The issue has been fixed. Excellent!
HI, Issue still there for me on blender 2.82a , vscode 1.43.1 and Blender development 0.0.12
I have been trying to make the add-on running with the recent build (
blender-2.80.0-git.030c7df19da9-windows64
), but even when running just the "empty" script (created by the add-on) the commandBlender: Run Script
triggers an exception in Blender and shuts it down.Blender: Start
outputs:following
Blender: Run Script
leads to:The file
script 58e9321aae.py
is the default one:I saw it first on Blender version few days old, so I updated the fresh one today, but the error remains the same.