Crash using knife tool on mesh with large number of vertices #55946

Closed
opened 2018-07-12 07:26:13 +02:00 by Kenneth D · 8 comments

System Information
Win 10
16GB Ram
GTX 980
Intel i7-5930K

Blender Version
Broken: 2.80 alpha 2018-07-11 21:13 build: d28d202 (July 12th daily)

Short description of error
Blender crashes when trying to use knife tool on a model with a large number of vertices.
My real world model has 260,513 vertices (CT scan)

Exact steps for others to reproduce the error
Open new blender session,
Delete existing cube
Add One Icosphere
Set subdivisions to 8 or 9
enter edit mode
deselect all
hit k for knife tool
draw line from one vertex across several edges
click to set other end of line
crash.

**System Information** Win 10 16GB Ram GTX 980 Intel i7-5930K **Blender Version** Broken: 2.80 alpha 2018-07-11 21:13 build: d28d202 (July 12th daily) **Short description of error** Blender crashes when trying to use knife tool on a model with a large number of vertices. My real world model has 260,513 vertices (CT scan) **Exact steps for others to reproduce the error** Open new blender session, Delete existing cube Add One Icosphere Set subdivisions to 8 or 9 enter edit mode deselect all hit k for knife tool draw line from one vertex across several edges click to set other end of line crash.
Author

Added subscriber: @CyanBC

Added subscriber: @CyanBC

Added subscriber: @deadpin

Added subscriber: @deadpin

Confirmed here as well on a somewhat smaller mesh -- monkey head subdivided to level 4 and applied (126,290 verts)

The issue is most likely due to a problem more easily spotted with debug builds: Assertion failure.

#if TRUST_NO_ONE
	assert(bytes_needed <= IMM_BUFFER_SIZE);
#endif

In my case bytes_needed is 5167152 but IMM_BUFFER_SIZE is a static 4194304. If I use a IcoSphere subdivided to level 8, we'd need 11+ megs for this buffer...

Occurs at:

blender.exe!immBegin(Gwn_PrimType prim_type, unsigned int vertex_len) Line 192	C
blender.exe!immBeginAtMost(Gwn_PrimType prim_type, unsigned int vertex_len) Line 252	C
blender.exe!knifetool_draw(const bContext * UNUSED_C, ARegion * UNUSED_ar, void * arg) Line 1162	C
blender.exe!ED_region_draw_cb_draw(const bContext * C, ARegion * ar, int type) Line 276	C
blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * ar, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1432	C
blender.exe!DRW_draw_view(const bContext * C) Line 1316	C
Confirmed here as well on a somewhat smaller mesh -- monkey head subdivided to level 4 and applied (126,290 verts) The issue is most likely due to a problem more easily spotted with debug builds: Assertion failure. ``` #if TRUST_NO_ONE assert(bytes_needed <= IMM_BUFFER_SIZE); #endif ``` In my case `bytes_needed` is 5167152 but `IMM_BUFFER_SIZE` is a static 4194304. If I use a IcoSphere subdivided to level 8, we'd need 11+ megs for this buffer... Occurs at: ``` blender.exe!immBegin(Gwn_PrimType prim_type, unsigned int vertex_len) Line 192 C blender.exe!immBeginAtMost(Gwn_PrimType prim_type, unsigned int vertex_len) Line 252 C blender.exe!knifetool_draw(const bContext * UNUSED_C, ARegion * UNUSED_ar, void * arg) Line 1162 C blender.exe!ED_region_draw_cb_draw(const bContext * C, ARegion * ar, int type) Line 276 C blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * ar, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1432 C blender.exe!DRW_draw_view(const bContext * C) Line 1316 C ```

Added subscribers: @fclem, @Jeroen-Bakker, @mont29

Added subscribers: @fclem, @Jeroen-Bakker, @mont29
Clément Foucault was assigned by Bastien Montagne 2018-07-25 15:23:52 +02:00

@Jeroen-Bakker, @fclem, I bet this is one of you guys code? Looks like you chose some too small max size here…

@Jeroen-Bakker, @fclem, I bet this is one of you guys code? Looks like you chose some too small max size here…

The thing is in this case we should not use IMM if the size of the buffer is user dependant. So that requires a bit of refactor.

The thing is in this case we should not use IMM if the size of the buffer is user dependant. So that requires a bit of refactor.

This issue was referenced by 3667a5402e

This issue was referenced by 3667a5402e3d548073b4a9c031868dd0e55ed72f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 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#55946
No description provided.