JacquesLucke / blender_vscode

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

The "Blender: Reload Addon" action causes an access violation with recent version of Blender #38

Closed jessey-git closed 4 years ago

jessey-git commented 5 years ago

Starting with the bug here in case this addon is hooking into something it's not supposed to now?

Steps:

Git bisect blames the following commit: bbaa1bffe9dbc35d2791b83d0014ccb4ffb6087a

The AV looks like:

Exception thrown: read access violation.
scene was nullptr.

blender.exe!BKE_view_layer_default_view(const Scene * scene) Line 107   C
blender.exe!CTX_data_view_layer(const bContext * C) Line 1011   C
blender.exe!rna_Context_view_layer_get(PointerRNA * ptr) Line 155   C
blender.exe!Context_view_layer_get(PointerRNA * ptr) Line 160   C
blender.exe!RNA_property_pointer_get(PointerRNA * ptr, PropertyRNA * prop) Line 3723    C
blender.exe!pyrna_prop_to_py(PointerRNA * ptr, PropertyRNA * prop) Line 1538    C
blender.exe!pyrna_struct_getattro(BPy_StructRNA * self, _object * pyname) Line 4220 C
[External Code] 
blender.exe!py_timer_execute(unsigned __int64 UNUSED_uuid, void * user_data) Line 67    C
blender.exe!execute_functions_if_necessary() Line 121   C
blender.exe!BLI_timer_execute(...) Line 147 C
blender.exe!wm_event_do_notifiers(bContext * C) Line 416    C
blender.exe!WM_main(bContext * C) Line 423  C
blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 502  C
MLDMatt commented 5 years ago

Same for me, the recent blender versions will terminate as soon as vs code tries to reload the addons. Reloading them manually still works though, so the issue must come from the "Blender: Relaod Addon"-command.

SavMartin commented 5 years ago

Same happens to me.

jessey-git commented 5 years ago

Sergey may have just fixed this on Blender's side: https://developer.blender.org/T65806

A new git build works for me again!