JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
557 stars 76 forks source link

Blender crashes - project load #56

Open dajuric opened 4 years ago

dajuric commented 4 years ago

There is a script test.py which only calls: bpy.ops.wm.open_mainfile(filepath=os.path.abspath("./myProject.blend"))

The evaluated file path is OK. While the call is being executed the following error happens:

Got GET: {'type': 'ping'}
127.0.0.1 - - [20/Dec/2019 07:23:45] "GET / HTTP/1.1" 200 -
Got POST: {'type': 'script', 'path': 'd:\\My Workspace\\test.py'}
127.0.0.1 - - [20/Dec/2019 07:23:45] "POST / HTTP/1.1" 200 -
Read blend: d:\My Workspace\myProject.blend
Error   : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FFC8A91FB74
Module  : c:\Program Files\Blender Foundation\Blender 2.81\python37.dll
The terminal process terminated with exit code: 11

after which, the Blender process crashes and test.py becomes read-only.

If a script is executed using a shell like: blender --background --python test.py everything executes OK

Mateusz-Grzelinski commented 3 days ago
import bpy, os

bpy.ops.wm.open_mainfile(filepath=os.path.abspath(r"E:\BlenderProjects\myProject.blend"))

I saved new file with blender 4.1 Results of run script:

I saved another file with 2.9. fails to open with the same version.

Therefore it might be related to #182 or simply issue with Blender itself. The second is more likely.