Drawing with make line tool in an empty scene results crash #89724

Closed
opened 2021-07-08 06:36:37 +02:00 by JINGZHI GAO · 8 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: blender/blender@84da05a8b8
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: Snap_Utilities_Line (6, 9, 20)
Author: Germano Cavalcante

Short description of error
[Under the front-focus view

Does not work properly Snap to outer vertices

If you delete all the grids in edit mode and use this function, you will get an error and crash.

Exact steps for others to reproduce the error

Error presentation.mp4


bpy.ops.object.editmode_toggle()  # Operator
bpy.data.window_managers["WinMan"].addon_search = "snap"  # Property
bpy.ops.mesh.select_all(action='DESELECT')  # Operator
bpy.ops.mesh.snap_utilities_line(wait_for_input=False)  # Operator
bpy.ops.mesh.select_all(action='SELECT')  # Operator
bpy.ops.mesh.delete(type='VERT')  # Operator
bpy.ops.mesh.select_all(action='DESELECT')  # Operator
bpy.ops.mesh.snap_utilities_line(wait_for_input=False)  # Operator
Python: Traceback (most recent call last):

File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\op_line.py", line 289, in modal
self.snap_obj, self.prevloc, self.location, self.type, self.bm, self.geom, self.len = snap_utilities(
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\common_utilities.py", line 190, in snap_utilities
snp_obj, loc, elem, elem_co, view_vector, orig, bm, bm_geom = get_snap_bm_geom(sctx, main_snap_obj, mcursor)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\common_utilities.py", line 104, in get_snap_bm_geom
r_snp_obj, r_loc, r_elem, r_elem_co = sctx.snap_get(mcursor, main_snap_obj)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\snap_context_l_init_.py", line 480, in snap_get
snap_obj, index = self.get_nearest_index(mval)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\snap_context_l_init
.py", line 184, in _get_nearest_index
rect = ((max(0, loc_curr[0] - self.threshold), min(self._snap_buffer.dimensions[0], loc_curr[0] + self.threshold)),

AttributeError: 'NoneType' object has no attribute 'dimensions'```
**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `blender/blender@84da05a8b8` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: Snap_Utilities_Line (6, 9, 20) Author: Germano Cavalcante **Short description of error** [Under the front-focus view Does not work properly Snap to outer vertices If you delete all the grids in edit mode and use this function, you will get an error and crash. **Exact steps for others to reproduce the error** [Error presentation.mp4](https://archive.blender.org/developer/F10216761/Error_presentation.mp4) --- ```# Blender 2.93.0, Commit date: 2021-06-02 11:21, Hash 84da05a8b806 bpy.ops.object.editmode_toggle() # Operator bpy.data.window_managers["WinMan"].addon_search = "snap" # Property bpy.ops.mesh.select_all(action='DESELECT') # Operator bpy.ops.mesh.snap_utilities_line(wait_for_input=False) # Operator bpy.ops.mesh.select_all(action='SELECT') # Operator bpy.ops.mesh.delete(type='VERT') # Operator bpy.ops.mesh.select_all(action='DESELECT') # Operator bpy.ops.mesh.snap_utilities_line(wait_for_input=False) # Operator Python: Traceback (most recent call last): ``` File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\op_line.py", line 289, in modal self.snap_obj, self.prevloc, self.location, self.type, self.bm, self.geom, self.len = snap_utilities( File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\common_utilities.py", line 190, in snap_utilities snp_obj, loc, elem, elem_co, view_vector, orig, bm, bm_geom = get_snap_bm_geom(sctx, main_snap_obj, mcursor) File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\common_utilities.py", line 104, in get_snap_bm_geom r_snp_obj, r_loc, r_elem, r_elem_co = sctx.snap_get(mcursor, main_snap_obj) File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\snap_context_l\__init__.py", line 480, in snap_get snap_obj, index = self._get_nearest_index(mval) File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\mesh_snap_utilities_line\snap_context_l\__init__.py", line 184, in _get_nearest_index rect = ((max(0, loc_curr[0] - self.threshold), min(self._snap_buffer.dimensions[0], loc_curr[0] + self.threshold)), ``` AttributeError: 'NoneType' object has no attribute 'dimensions'```
Author

Added subscriber: @LENS6

Added subscriber: @LENS6

#89813 was marked as duplicate of this issue

#89813 was marked as duplicate of this issue
JINGZHI GAO changed title from Snap_Utilities_Line 6.9.20 collapse to Snap_Utilities_Line 6.9.20(BUG) 2021-07-08 06:43:07 +02:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Pratik Borhade changed title from Snap_Utilities_Line 6.9.20(BUG) to Drawing with make line tool in an empty scene results crash 2021-07-08 07:31:40 +02:00
Germano Cavalcante self-assigned this 2021-07-08 17:13:34 +02:00

This issue was referenced by 1868f2511c

This issue was referenced by 1868f2511cf388a0fbf29736640102f96bcb2acd

This issue was referenced by 7884a7bbf9

This issue was referenced by 7884a7bbf9e2c9358609129ad8f4fca351d7f278

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscribers: @Dayar, @mano-wii

Added subscribers: @Dayar, @mano-wii
Sign in to join this conversation.
No Milestone
No project
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#89724
No description provided.