domlysz / BlenderGIS

Blender addons to make the bridge between Blender and geographic data
GNU General Public License v3.0
7.63k stars 1.34k forks source link

BlenderGIS clashing with Armory using latest Blender build #173

Closed rossoe closed 3 years ago

rossoe commented 5 years ago

Considering Blender have frozen API updates on 2.8, I thought I'd push to the latest Blender build.

Previously I had BlenderGIS working alongside Armory plugin. But I now get the following error which crashes blender to desktop without it even starting up.

F:\Blender\blender-2.80.0-git.e1d1899e7290-windows64>blender -d Switching to fully guarded memory allocator. Blender 2.80 (sub 72) Build: 25/05/2019 07:44 Windows Release argv[0] = blender argv[1] = -d Read prefs: C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend read file Version 280 sub 39 date unknown hash unknown found bundled python: F:\Blender\blender-2.80.0-git.e1d1899e7290-windows64\2.80\python blo_find_main: added new lib C:\Users\rosso\Documents\Armory\armsdk//armory/blender/data/arm_data.blend read file C:\Users\rosso\Documents\Armory\armsdk\armory\blender\data\arm_data.blend Version 279 sub 1 date unknown hash

Traceback (most recent call last): File "C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlenderGIS-Blender28\operators\nodes_terrain_analysis_reclassify.py", line 160, in scene_update if bpy.context.depsgraph.id_type_updated('MATERIAL'): #not sure if it's the best way to do this check AttributeError: 'Context' object has no attribute 'depsgraph'

..... after a hundred or so of above Traceback's it then spits out:

Fatal Python error: Cannot recover from stack overflow.

Current thread 0x000010f4 (most recent call first): File "F:\Blender\Armory28\armsdk//armory/blender\arm\handlers.py", line 19 in on_depsgraph_update_post

I can install each of the plugins independently without issue on latest Blender build. and soon as I revert to an April build of Blender they also work fine together.

domlysz commented 5 years ago

Must be fixed now

https://github.com/domlysz/BlenderGIS/commit/59191438d3c39acb6d9b0dbe9e36f766ed93ebce

rossoe commented 5 years ago

Thanks domlysz, it seems to have jumped to new error now:

F:\Blender\blender-2.80.0-git.f18373a9ab1a-windows64>blender -d Switching to fully guarded memory allocator. Blender 2.80 (sub 72) Build: 25/05/2019 17:21 Windows Release argv[0] = blender argv[1] = -d Read prefs: C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend read file Version 280 sub 39 date unknown hash unknown found bundled python: F:\Blender\blender-2.80.0-git.f18373a9ab1a-windows64\2.80\python blo_find_main: added new lib F:\Blender\Armory28\armsdk//armory/blender/data/arm_data.blend read file F:\Blender\Armory28\armsdk\armory\blender\data\arm_data.blend Version 279 sub 1 date unknown hash Traceback (most recent call last): File "C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlenderGIS-Blender28\operators\nodes_terrain_analysis_reclassify.py", line 156, in scene_update depsgraph = bpy.context.evaluated_depsgraph_get() RecursionError: maximum recursion depth exceeded while calling a Python object Fatal Python error: Cannot recover from stack overflow.

Current thread 0x000041c4 (most recent call first): File "C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlenderGIS-Blender28\operators\nodes_terrain_analysis_reclassify.py", line 156 in scene_update

domlysz commented 5 years ago

ok I've disable the incriminated part of code while waiting to find a solution

rossoe commented 5 years ago

alright, interested to know what the Blender devs are up to with latest tweaks to make plugins clash in this way?

just so you know the latest message following your last push is:

F:\Blender\blender-2.80.0-git.f18373a9ab1a-windows64>blender -d Switching to fully guarded memory allocator. Blender 2.80 (sub 72) Build: 25/05/2019 17:21 Windows Release argv[0] = blender argv[1] = -d Read prefs: C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend read file Version 280 sub 39 date unknown hash unknown found bundled python: F:\Blender\blender-2.80.0-git.f18373a9ab1a-windows64\2.80\python blo_find_main: added new lib F:\Blender\Armory28\armsdk//armory/blender/data/arm_data.blend read file F:\Blender\Armory28\armsdk\armory\blender\data\arm_data.blend Version 279 sub 1 date unknown hash Traceback (most recent call last): File "C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlenderGIS-Blender28\operators\nodes_terrain_analysis_reclassify.py", line 167, in scene_update if obj != activeObj: RecursionError: maximum recursion depth exceeded in comparison Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00000e8c (most recent call first): File "C:\Users\rosso\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\BlenderGIS-Blender28\operators\nodes_terrain_analysis_reclassify.py", line 167 in scene_update File "F:\Blender\Armory28\armsdk//armory/blender\arm\handlers.py", line 19 in on_depsgraph_update_post

Just to confirm steps to replicate:

  1. Install Armory following the 'Using Armory as add-on' steps found here
  2. click 'Update SDK' in Armory preferences to get latest dev release
  3. Download latest GDAL and Numpy & install following this
  4. Install BlenderGIS for 2.8
  5. Select GDAL for projection and image engine in preferences
  6. restart Blender and it will fail to start with above error.
domlysz commented 5 years ago

ok seems the issue is related to some recent updates related to dependency graph api: https://devtalk.blender.org/t/20-may-2019/7242 https://developer.blender.org/rBe693918d40741b0839cea84d2e0c386cc262e0c3

Instantiate multiple handlers for checking dependency graph updates causes the conflict. I've opened a new issue : https://developer.blender.org/T65155

Wait and see

rossoe commented 5 years ago

I saw the latest updates on blender ticket - It's curious how these plugins work ok with each other on an April build of Blender2.8 - would it help if I found the exact build version ref to compare? I assume the older one's can still be downloaded?

rossoe commented 5 years ago

So I tested installing more recent Blender build (5th July) and latest version of Armory (30th June). and I'm not getting any errors.

But that was sticking with the version of BlenderGIS from 23/03/19

I have not tried with latest version on github because I know you made a more recent tweak "disable depsgraph call" so I was wary to use the latest.