crash with border select (many objects) #43785

Closed
opened 2015-02-23 12:32:12 +01:00 by Ronny G · 13 comments

System Information
ubuntu 14.04, 630gt, 4930k 4.5ghz

Blender Version
Broken: 2.73.5, 26f9a92

Exact steps for others to reproduce the error

  1. open the blend file
  2. border select around all empties
  3. crash

warning this blend contains 43200 empties!

empties.blend

**System Information** ubuntu 14.04, 630gt, 4930k 4.5ghz **Blender Version** Broken: 2.73.5, 26f9a92 **Exact steps for others to reproduce the error** 1. open the blend file 2. border select around all empties 3. crash **warning this blend contains 43200 empties!** [empties.blend](https://archive.blender.org/developer/F145402/empties.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @nudelZ

Added subscriber: @nudelZ
Author

ok found something

  • with "opengl select" nothing happens (no selection) but with "occlusion queries" it crashes

ok found something - > with "opengl select" nothing happens (no selection) but with "occlusion queries" it crashes

Added subscriber: @mib2berlin

Added subscriber: @mib2berlin

Can verify on:

Opensuse 13.2/64
Intel i5 3770K
GTX 760 4 GB (Display)
GTX 560Ti 1.28 GB 448 Cores
Driver 346.29

With opengl select border select does not work, hotkey a do.

Cheers, mib

Can verify on: Opensuse 13.2/64 Intel i5 3770K GTX 760 4 GB (Display) GTX 560Ti 1.28 GB 448 Cores Driver 346.29 With opengl select border select does not work, hotkey a do. Cheers, mib
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

It works if you zoom in a bit, so I'd guess it's either an issue with the high amount of objects, or just another presicion issue :/

It works if you zoom in a bit, so I'd guess it's either an issue with the high amount of objects, or just another presicion issue :/
Antonis Ryakiotakis was assigned by Julian Eisel 2015-02-23 13:45:20 +01:00
Member

Eek, just noticed I'm getting a "Too many objects in select buffer" error, so seems like this is a limit of the OGL selection methods?

Eek, just noticed I'm getting a "Too many objects in select buffer" error, so seems like this is a limit of the OGL selection methods?

Added subscribers: @Psy-Fi, @ideasman42

Added subscribers: @Psy-Fi, @ideasman42

@Psy-Fi, looks like this is just missing multiply checking buffer bounds P205: Fix for #43785

diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index 35a39b2..d51d0da 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -180,6 +180,7 @@ unsigned int GPU_select_end(void)
 		hits = glRenderMode(GL_RENDER);
 	}
 	else {
+		const unsigned int bufsize_4x = g_query_state.bufsize * 4;
 		int i;
 
 		if (g_query_state.query_issued) {
@@ -191,7 +192,7 @@ unsigned int GPU_select_end(void)
 			glGetQueryObjectuivARB(g_query_state.queries- [x], GL_QUERY_RESULT_ARB, &result);
 			if (result > 0) {
 				if (g_query_state.mode != GPU_SELECT_NEAREST_SECOND_PASS) {
-					if (hits < g_query_state.bufsize) {
+					if (hits < bufsize_4x) {
 						g_query_state.buffer[hits * 4] = 1;
 						g_query_state.buffer[hits * 4 + 1] = 0xFFFF;
 						g_query_state.buffer[hits * 4 + 2] = 0xFFFF;

note. there are a few of buffer[4 * MAXPICKBUF]; these should be made into buffer[MAXPICKBUF]; if this patch is applied.

@Psy-Fi, looks like this is just missing multiply checking buffer bounds [P205: Fix for #43785](https://archive.blender.org/developer/P205.txt) ```diff diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c index 35a39b2..d51d0da 100644 --- a/source/blender/gpu/intern/gpu_select.c +++ b/source/blender/gpu/intern/gpu_select.c @@ -180,6 +180,7 @@ unsigned int GPU_select_end(void) hits = glRenderMode(GL_RENDER); } else { + const unsigned int bufsize_4x = g_query_state.bufsize * 4; int i; if (g_query_state.query_issued) { @@ -191,7 +192,7 @@ unsigned int GPU_select_end(void) glGetQueryObjectuivARB(g_query_state.queries- [x], GL_QUERY_RESULT_ARB, &result); if (result > 0) { if (g_query_state.mode != GPU_SELECT_NEAREST_SECOND_PASS) { - if (hits < g_query_state.bufsize) { + if (hits < bufsize_4x) { g_query_state.buffer[hits * 4] = 1; g_query_state.buffer[hits * 4 + 1] = 0xFFFF; g_query_state.buffer[hits * 4 + 2] = 0xFFFF; ``` note. there are a few of `buffer[4 * MAXPICKBUF];` these should be made into `buffer[MAXPICKBUF];` if this patch is applied.

This issue was referenced by 50e9868abe

This issue was referenced by 50e9868abe11bd2ed0173b7a51cf129d77e4389e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 50e9868abe.

Closed by commit 50e9868abe.
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
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#43785
No description provided.