Edge loops crashing blender (exeeding IMM_BUFFER_SIZE) #68950

Closed
opened 2019-08-21 06:47:42 +02:00 by Olin · 12 comments

Operating system: Windows 10
Graphics card: AMD R9 270

Broken: 2.80
Worked: (optional)

Adding edge loops to cylinder completely crashes after a certain point

Based on the default startup or an attached .blend file (as simple as possible).
Delete the underappreciated default cube
add cylinder
set subdivisions to 500 in the little f9 menu
add edge loops with Ctrl+R and scroll up to increase number until blender just dies.
look at your beautiful desktop

Could not test with the absolutely latest blender because isp is having troubles but some nice people on reddit say they can reproduce it

Attached video shows me demonstrating.2019-08-20 22-07-03.mp4

Reddit Thread that started this all: https://www.reddit.com/r/blender/comments/ct4o6o/nice/

Operating system: Windows 10 Graphics card: AMD R9 270 Broken: 2.80 Worked: (optional) Adding edge loops to cylinder completely crashes after a certain point Based on the default startup or an attached .blend file (as simple as possible). Delete the underappreciated default cube add cylinder set subdivisions to 500 in the little f9 menu add edge loops with Ctrl+R and scroll up to increase number until blender just dies. look at your beautiful desktop Could not test with the absolutely latest blender because isp is having troubles but some nice people on reddit say they can reproduce it Attached video shows me demonstrating.[2019-08-20 22-07-03.mp4](https://archive.blender.org/developer/F7677211/2019-08-20_22-07-03.mp4) Reddit Thread that started this all: https://www.reddit.com/r/blender/comments/ct4o6o/nice/
Author

Added subscriber: @Ferret-1

Added subscriber: @Ferret-1

#69372 was marked as duplicate of this issue

#69372 was marked as duplicate of this issue

Added subscriber: @deadpin

Added subscriber: @deadpin

It looks like the vertex buffer limit has been exceeded which triggers an assert inside gpu_immediate.c (debug build)

Bumping to 6mb allows a 500 vertex cylinder to be edge-ring'd 500 times. The operator soft-max for cylinder creation and loop cut and slide are both 500 (gpu_immediate is used to draw the new edge-rings during the interactive portion of the operator while scrolling the mouse). The limit can still be exceeded if the user goes out of their way to exceed the cylinder max (e.g. a 2000 vert cylinder and then mouse-wheeling loop cuts again)

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

...
blender.exe!immBegin(GPUPrimType prim_type, unsigned int vertex_len) Line 215	C
blender.exe!EDBM_preselect_edgering_draw(EditMesh_PreSelEdgeRing * psel, const float[4] * matrix) Line 175	C
blender.exe!ringsel_draw(const bContext * UNUSED_C, ARegion * UNUSED_ar, void * arg) Line 105	C
blender.exe!ED_region_draw_cb_draw(const bContext * C, ARegion * ar, int type) Line 279	C
It looks like the vertex buffer limit has been exceeded which triggers an assert inside gpu_immediate.c (debug build) Bumping to 6mb allows a 500 vertex cylinder to be edge-ring'd 500 times. The operator soft-max for cylinder creation and loop cut and slide are both 500 (gpu_immediate is used to draw the new edge-rings during the interactive portion of the operator while scrolling the mouse). The limit can still be exceeded if the user goes out of their way to exceed the cylinder max (e.g. a 2000 vert cylinder and then mouse-wheeling loop cuts again) ``` #if TRUST_NO_ONE assert(bytes_needed <= IMM_BUFFER_SIZE); #endif ... blender.exe!immBegin(GPUPrimType prim_type, unsigned int vertex_len) Line 215 C blender.exe!EDBM_preselect_edgering_draw(EditMesh_PreSelEdgeRing * psel, const float[4] * matrix) Line 175 C blender.exe!ringsel_draw(const bContext * UNUSED_C, ARegion * UNUSED_ar, void * arg) Line 105 C blender.exe!ED_region_draw_cb_draw(const bContext * C, ARegion * ar, int type) Line 279 C ```
Member

Added subscribers: @fclem, @lichtwerk

Added subscribers: @fclem, @lichtwerk
Member

Can confirm what @deadpin said (thx investigating!)

Will raise awareness to @fclem [not sure this should be handled more gracefully, but will put on low prio for now...]

Can confirm what @deadpin said (thx investigating!) Will raise awareness to @fclem [not sure this should be handled more gracefully, but will put on low prio for now...]
Philipp Oeser changed title from Edge loops crashing blender to Edge loops crashing blender (exeeding IMM_BUFFER_SIZE) 2019-08-21 10:59:35 +02:00

This should be fixed by issuing multiple draw commands if the number of verts is too high.

This is an easy fix for a newcomer so I would leave it to someone else.

This should be fixed by issuing multiple draw commands if the number of verts is too high. This is an easy fix for a newcomer so I would leave it to someone else.
Huseyin Karakullukcu self-assigned this 2019-08-22 20:09:26 +02:00

@fclem Is making IMM_BUFFER_SIZE stretchable, a better solution or not? I think it fixes this problem very easily with small amount code change.

@fclem Is making IMM_BUFFER_SIZE stretchable, a better solution or not? I think it fixes this problem very easily with small amount code change.

@imgeself If codechange is minimal I think it's a good solution.

@imgeself If codechange is minimal I think it's a good solution.
Member

Added subscribers: @0xB4DA55, @AbidMaqbool, @MarcinTwarowski

Added subscribers: @0xB4DA55, @AbidMaqbool, @MarcinTwarowski

This issue was referenced by 6222cb575f

This issue was referenced by 6222cb575fa51184ad8929aa097939d1dd1c92bc

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
6 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#68950
No description provided.