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

Plugin don't work under Blender 2.9 - Apple Silicon M1 Version #183

Closed
miarchimi opened this issue Sep 12, 2021 · 16 comments
Closed

Plugin don't work under Blender 2.9 - Apple Silicon M1 Version #183

miarchimi opened this issue Sep 12, 2021 · 16 comments

Comments

@miarchimi
Copy link

I can install the plugin. But I think, its not full installed.
The Measurement-Settings under Screene-Properties are not visible.

If I click on Add Dimensions > Aligned (with selected edge), I get a error:

line 132, in call ret = _op_cal(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.shade_smooth.poll() failed, context is incorect

The plugin is not working

@kevancress
Copy link
Owner

Hey @miarchimi,

Thanks for the report. I'll look into it this afternoon.

Two things to check:

  1. I've found the most stable configuration is to be running the latest development version of MeasureIt_ARCH with Blender 2.93 or higher. There were some changes in blender API between 2.92 and 2.93 that may cause issues on versions 2.92 and lower

  2. Based on the error message above, there could be a conflict with another add-on, try disabling your other addons, and then re-enabling MeasureIt_ARCH. That might fix the issue.

If either of those solves it let me know!
Thanks!

@miarchimi
Copy link
Author

miarchimi commented Sep 14, 2021 via email

@miarchimi
Copy link
Author

Here the generated Python error log after trying to activate the plugin. This log is from the lates developer version version, here form GitHub

Python backtrace

File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_geometry.py", line 93 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_main.py", line 33 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "", line 228 in _call_with_frames_removed
File "", line 1058 in _handle_fromlist
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/init.py", line 76 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py", line 351 in enable
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/startup/bl_operators/userpref.py", line 439 in execute

@kevancress
Copy link
Owner

Hey @miarchimi

Thanks for posting the backtrace, that's really helpful. Best I can tell the crash is happening when Blender is trying to register the custom point shader I'm using in the add-on.

I'll do a quick once over of the shader code and see what might be causing the issue, I'd had some issues early on with the glsl shader code preforming oddly on Mac's and it makes sense that the M1 would have its own set of challenges in this area.

If you get a chance could you try running blender in gpu debug mode and try enabling the addon, this should give a more detailed log about what in the shader is causing the crash.

you'll have to start blender from the terminal https://docs.blender.org/manual/en/latest/advanced/command_line/launch/macos.html
with the argument "--debug-gpu"

Thanks!!!

@miarchimi
Copy link
Author

Hy Kevancress
First here the text output form the terminal and second the error log. I hope int helps you by finding the bug.
Cheers and have a nice weekend.
Michel

Last login: Sat Sep 18 16:48:19 on ttys001
xy@xy ~ % Blender --debug-gpu
Read prefs: /Users/xy/Library/Application Support/Blender/2.93/config/userpref.blend
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.shader): OVERLAY_shader_armature_sphere_410 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.shader): OVERLAY_shader_armature_sphere_397 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
addon_utils.disable: MeasureIt_ARCH-development not disabled
Modules Installed (MeasureIt_ARCH-development) from '/Users/xy/Desktop/MeasureIt_ARCH-development.zip' into '/Users/xy/Library/Application Support/Blender/2.93/scripts/addons'
M_ARCH import modules
Writing: /var/folders/q4/36r5ybsj6jbgnm889l_sjq200000gq/T/blender.crash.txt
zsh: segmentation fault Blender --debug-gpu
xy@xy ~ %

Blender 2.93.4, Commit date: 2021-08-31 09:23, Hash xy

bpy.data.window_managers["WinMan"].addon_search = "mea" # Property
bpy.context.space_data.system_bookmarks_active = 1 # Property
Modules Installed (MeasureIt_ARCH-development) from '/Users/xy/Desktop/MeasureIt_ARCH-development.zip' into '/Users/xy/Library/Application Support/Blender/2.93/scripts/addons' # Info

backtrace

0 Blender 0x000000010ba47ec4 BLI_system_backtrace + 56
1 Blender 0x0000000104e08178 sig_handle_crash + 364
2 libsystem_platform.dylib 0x000000019430ec44 _sigtramp + 56
3 libGLProgrammability.dylib 0x00000001d649e6dc glpLLVMGetFunctionGlobalVariableUse + 112
4 libGLProgrammability.dylib 0x00000001d649e918 glpLLVMGetFunctionGlobalVariableUse + 684
5 libGLProgrammability.dylib 0x00000001d649e918 glpLLVMGetFunctionGlobalVariableUse + 684
6 libGLProgrammability.dylib 0x00000001d649e918 glpLLVMGetFunctionGlobalVariableUse + 684
7 libGLProgrammability.dylib 0x00000001d649e918 glpLLVMGetFunctionGlobalVariableUse + 684
8 libGLProgrammability.dylib 0x00000001d6499698 glpLLVMCGFindSamplersAndBuffers + 1380
9 libGLProgrammability.dylib 0x00000001d6498544 glpLLVMCGTopLevel + 2900
10 libGLProgrammability.dylib 0x00000001d64bf924 glpLinkProgram + 10388
11 libGLProgrammability.dylib 0x00000001d64d9598 ShLink + 208
12 GLEngine 0x00000001d6694a00 gleLinkProgram + 1212
13 GLEngine 0x00000001d6603cac glLinkProgramARB_Exec + 256
14 Blender 0x0000000109f21f64 _ZN7blender3gpu5debugL19debug_glLinkProgramEj + 44
15 Blender 0x0000000109f24d04 _ZN7blender3gpu8GLShader8finalizeEv + 96
16 Blender 0x0000000109f15994 GPU_shader_create_ex + 880
17 Blender 0x0000000109f15fe8 GPU_shader_create_from_python + 200
18 Blender 0x0000000106043c74 pygpu_shader__tp_new + 116
19 Blender 0x000000010a071aa4 type_call + 84
20 Blender 0x000000010a019084 _PyObject_MakeTpCall + 360
21 Blender 0x000000010a0eb25c call_function + 512
22 Blender 0x000000010a0e8c6c _PyEval_EvalFrameDefault + 23572
23 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
24 Blender 0x000000010a0e2f90 PyEval_EvalCode + 80
25 Blender 0x000000010a0dfde8 builtin_exec + 648
26 Blender 0x000000010a059d8c cfunction_vectorcall_FASTCALL + 248
27 Blender 0x000000010a0e8e6c _PyEval_EvalFrameDefault + 24084
28 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
29 Blender 0x000000010a019800 _PyFunction_Vectorcall + 256
30 Blender 0x000000010a0eb1fc call_function + 416
31 Blender 0x000000010a0e8b74 _PyEval_EvalFrameDefault + 23324
32 Blender 0x000000010a01987c function_code_fastcall + 112
33 Blender 0x000000010a0eb1fc call_function + 416
34 Blender 0x000000010a0e8b50 _PyEval_EvalFrameDefault + 23288
35 Blender 0x000000010a01987c function_code_fastcall + 112
36 Blender 0x000000010a0eb1fc call_function + 416
37 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448
38 Blender 0x000000010a01987c function_code_fastcall + 112
39 Blender 0x000000010a0eb1fc call_function + 416
40 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448
41 Blender 0x000000010a01987c function_code_fastcall + 112
42 Blender 0x000000010a01a844 object_vacall + 320
43 Blender 0x000000010a01a9d4 _PyObject_CallMethodIdObjArgs + 112
44 Blender 0x000000010a110eb0 PyImport_ImportModuleLevelObject + 1300
45 Blender 0x000000010a0e77cc _PyEval_EvalFrameDefault + 18292
46 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
47 Blender 0x000000010a0e2f90 PyEval_EvalCode + 80
48 Blender 0x000000010a0dfde8 builtin_exec + 648
49 Blender 0x000000010a059d8c cfunction_vectorcall_FASTCALL + 248
50 Blender 0x000000010a0e8e6c _PyEval_EvalFrameDefault + 24084
51 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
52 Blender 0x000000010a019800 _PyFunction_Vectorcall + 256
53 Blender 0x000000010a0eb1fc call_function + 416
54 Blender 0x000000010a0e8b74 _PyEval_EvalFrameDefault + 23324
55 Blender 0x000000010a01987c function_code_fastcall + 112
56 Blender 0x000000010a0eb1fc call_function + 416
57 Blender 0x000000010a0e8b50 _PyEval_EvalFrameDefault + 23288
58 Blender 0x000000010a01987c function_code_fastcall + 112
59 Blender 0x000000010a0eb1fc call_function + 416
60 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448
61 Blender 0x000000010a01987c function_code_fastcall + 112
62 Blender 0x000000010a0eb1fc call_function + 416
63 Blender 0x000000010a0e8bf0 PyEval_EvalFrameDefault + 23448
64 Blender 0x000000010a01987c function_code_fastcall + 112
65 Blender 0x000000010a01a844 object_vacall + 320
66 Blender 0x000000010a01a9d4 PyObject_CallMethodIdObjArgs + 112
67 Blender 0x000000010a110eb0 PyImport_ImportModuleLevelObject + 1300
68 Blender 0x000000010a0dee04 builtin___import
+ 108
69 Blender 0x000000010a05a610 cfunction_call + 84
70 Blender 0x000000010a01962c _PyObject_Call + 172
71 Blender 0x000000010a0e8e6c _PyEval_EvalFrameDefault + 24084
72 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
73 Blender 0x000000010a019800 _PyFunction_Vectorcall + 256
74 Blender 0x000000010a0eb1fc call_function + 416
75 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448
76 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
77 Blender 0x000000010a019800 _PyFunction_Vectorcall + 256
78 Blender 0x000000010a01a844 object_vacall + 320
79 Blender 0x000000010a01a9d4 _PyObject_CallMethodIdObjArgs + 112
80 Blender 0x000000010a110fc0 PyImport_ImportModuleLevelObject + 1572
81 Blender 0x000000010a0e77cc _PyEval_EvalFrameDefault + 18292
82 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
83 Blender 0x000000010a0e2f90 PyEval_EvalCode + 80
84 Blender 0x000000010a0dfde8 builtin_exec + 648
85 Blender 0x000000010a059d8c cfunction_vectorcall_FASTCALL + 248
86 Blender 0x000000010a0e8e6c _PyEval_EvalFrameDefault + 24084
87 Blender 0x000000010a0ec14c _PyEval_EvalCode + 3032
88 Blender 0x000000010a019800 _PyFunction_Vectorcall + 256
89 Blender 0x000000010a0eb1fc call_function + 416
90 Blender 0x000000010a0e8b74 _PyEval_EvalFrameDefault + 23324
91 Blender 0x000000010a01987c function_code_fastcall + 112
92 Blender 0x000000010a0eb1fc call_function + 416
93 Blender 0x000000010a0e8b50 _PyEval_EvalFrameDefault + 23288
94 Blender 0x000000010a01987c function_code_fastcall + 112
95 Blender 0x000000010a0eb1fc call_function + 416
96 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448
97 Blender 0x000000010a01987c function_code_fastcall + 112
98 Blender 0x000000010a0eb1fc call_function + 416
99 Blender 0x000000010a0e8bf0 _PyEval_EvalFrameDefault + 23448

Python backtrace

File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_geometry.py", line 93 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_main.py", line 33 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "", line 228 in _call_with_frames_removed
File "", line 1058 in _handle_fromlist
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/init.py", line 76 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py", line 351 in enable
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/startup/bl_operators/userpref.py", line 439 in execute

@miarchimi
Copy link
Author

I have an idea for the next version you could integrate at a future Version. A dynamic plan border for different paper formats as well as an orthographic camera with automatic correct settings to render a plan in correctly scale dimensions, e.g. 1:50, etc., and then this image could be printed true to scale.

@kevancress
Copy link
Owner

kevancress commented Sep 18, 2021

@miarchimi

Thanks for the logs that helps a lot! Looks like I had a couple of places in my shader code that were implicitly casting int's to floats, which I think was the source of the problem! can you give the latest development version a try and let me know if it works?

I like the Dynamic plan border idea, sounds great for making title blocks that adjust to fit a given paper size. The view settings in MeasureIt_ARCH do already have a paper size & scale setting for setting up true to scale drawing though!

@miarchimi
Copy link
Author

Sadly it still does not work ...

Last login: Sun Sep 19 19:11:01 on ttys000
xy@xy ~ % Blender --debug-gpu
Read prefs: /Users/xy/Library/Application Support/Blender/2.93/config/userpref.blend
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.shader): OVERLAY_shader_armature_sphere_410 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.shader): OVERLAY_shader_armature_sphere_397 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
addon_utils.disable: MeasureIt_ARCH-development not disabled
Modules Installed (MeasureIt_ARCH-development) from '/Users/xy/Desktop/MeasureIt_ARCH-development.zip' into '/Users/xy/Library/Application Support/Blender/2.93/scripts/addons'
M_ARCH import modules
Writing: /var/folders/q4/36r5ybsj6jbgnm889l_sjq200000gq/T/blender.crash.txt
zsh: segmentation fault Blender --debug-gpu
xy@xy ~ % Blender --debug-gpu
Read prefs: /Users/xy/Library/Application Support/Blender/2.93/config/userpref.blend
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
WARN (gpu.shader): OVERLAY_shader_armature_sphere_410 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.shader): OVERLAY_shader_armature_sphere_397 FragShader:
|
| Warning: extension 'GL_ARB_conservative_depth' is not supported

WARN (gpu.debug): source/blender/gpu/opengl/gl_debug.cc:177 init_gl_callbacks: Failed to hook OpenGL debug callback. Use fallback debug layer.
M_ARCH import modules
Writing: /var/folders/q4/36r5ybsj6jbgnm889l_sjq200000gq/T/blender.crash.txt
zsh: segmentation fault Blender --debug-gpu
xy@xy ~ %

Bildschirmfoto 2021-09-19 um 19 13 39

Python backtrace

File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_geometry.py", line 93 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/measureit_arch_main.py", line 33 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "", line 228 in _call_with_frames_removed
File "", line 1058 in _handle_fromlist
File "/Users/xy/Library/Application Support/Blender/2.93/scripts/addons/MeasureIt_ARCH-development/init.py", line 76 in
File "", line 228 in _call_with_frames_removed
File "", line 790 in exec_module
File "", line 680 in _load_unlocked
File "", line 986 in _find_and_load_unlocked
File "", line 1007 in _find_and_load
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py", line 351 in enable
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/startup/bl_operators/userpref.py", line 439 in execute

@kevancress
Copy link
Owner

Ahh darn!

Looks like it's still crashing at the point shader. I did some more cleanup to the shader code, removing some unnecessary global variables, hopefully that fixes it!

If you could download the latest development version and give it a test that would be amazing, much appreciated!

(I should really see if I can get an M1 Mac so I can test on my end)

@miarchimi
Copy link
Author

Yeah ... 👍 now it works. Great job, thanks a lot!
Best Greetings
Michel

Screenshot-M1-and-Beasurelt_ARCH

@miarchimi
Copy link
Author

I test now a little bit the Tool. I think it works stable.

Some questions I have:

  1. How can I set dimensions easy inside or outside of a e.g. Wall at creation-time?
    For example with Checkboxes named like (top, bottom, left, right)
    On the other hand I have to modify each dimension afterward over the "tweak-distance-field" afterwards ...

  2. How can I rotate dashes 90°?

Bildschirmfoto 2021-09-20 um 13 59 05

Thanks so log that I generally works.

Greetings Michel

@kevancress
Copy link
Owner

Hey @miarchimi

  1. Pressing Tab while selecting the tweak distance gizmo will flip the dimension to the outside.

agfadgdas

I like the idea of the top/bottom left/right checkboxes though. right now the dimension placement always defaults to pointing away from the surface normals of the edge its attached to, (or defaults to top and left if there are no surfaces)

  1. No way to rotate the dashes currently. I'll look into adding that

@kevancress
Copy link
Owner

@miarchimi Going to close this thread for now and open two more for the feature requests.

@miarchimi
Copy link
Author

I tested the plugin a little more. I inserted dimension lines and deleted them again. Then the selection was by a empty field from which I wanted to delete. Then an error appeared. Now I have two dimensions in the 3D window, but they no longer appear in the list. So now I have noch chance to delete this measurements any more. Is there a workaround to delete such measurements on an other way? A button that cleans up the arrays would also be good if such unexpected errors occur.

Error-delete-measurement

@kevancress
Copy link
Owner

Hey @miarchimi

There is an option to delete all if this happens:
delete all

It's odd that the dimensions weren't deleted properly the first time, were any error reported when initially deleting the dimensions from the list?

@miarchimi
Copy link
Author

The error is also displayed if the list empty and you clicked on delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

No branches or pull requests

2 participants