Crash - Outliner: Enter edit mode dot CTRL click #119384

Closed
opened 2024-03-12 15:43:54 +01:00 by Daniel Gryningstjerna · 5 comments

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-03-12 10:25, hash: 6a016ce25599
Worked: broken in 4.0 also, not sure if it every worked

Short description of error
Ctrl clicking the instanced meshes in the outliner crahes blender if one of the instances already is in edit mode.

Exact steps for others to reproduce the error
Ctrl click the dot on the Suzanne.001
image

**Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-03-12 10:25, hash: `6a016ce25599` Worked: broken in 4.0 also, not sure if it every worked **Short description of error** Ctrl clicking the instanced meshes in the outliner crahes blender if one of the instances already is in edit mode. **Exact steps for others to reproduce the error** Ctrl click the dot on the Suzanne.001 ![image](/attachments/d2f3f20b-1d23-4dad-851f-1e38e1eecc51)
Daniel Gryningstjerna added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-03-12 15:43:55 +01:00
Daniel Gryningstjerna changed title from Outliner: Enter edit mode dot CTRL click Crash to Crash - Outliner: Enter edit mode dot CTRL click 2024-03-12 15:45:22 +01:00
Member

Can confirm, will check

Can confirm, will check
Philipp Oeser added
Status
Confirmed
Module
User Interface
and removed
Status
Needs Triage
labels 2024-03-12 16:07:34 +01:00
Member

The dot should probably not show in the first place, will put on my desk

The dot should probably not show in the first place, will put on my desk
Philipp Oeser self-assigned this 2024-03-12 16:32:11 +01:00
Member

Fix is up, see !119416 , will actually set to High prio since it is a crasher

Fix is up, see !119416 , will actually set to High prio since it is a crasher
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2024-03-13 11:56:16 +01:00
Member

!119416 is apparently not the right solution, will step down for now...

!119416 is apparently not the right solution, will step down for now...
Philipp Oeser removed their assignment 2024-03-14 11:09:39 +01:00
Member

@JulianEisel There are many different states and corner cases in here that I am probably just missing something.

But in Outliner the item in question makes it through various checks in outliner_draw_mode_column_toggle and gets to the end, where everything gets a mode toggle. In this case it is seen as NOT currently in edit mode so it gets that DOT icon.

But it is in edit mode, so when you click the button we get to do_outliner_item_editmode_toggle and we then try to exit edit mode. So seems like one area of code is thinking this is not in edit mode while another thinks otherwise. So the simplest (but possibly wrong) way to avoid this is just this:

diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 5b56a5cb62d..b8addb626fc 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -2178,20 +2178,23 @@ static void outliner_draw_mode_column_toggle(uiBlock *block,
   const bool object_data_shared = (ob->data == ob_active->data);
   draw_active_icon = draw_active_icon || object_data_shared;
 
   int icon;
   const char *tip;
   if (draw_active_icon) {
     icon = UI_icon_from_object_mode(ob_active->mode);
     tip = object_data_shared ? TIP_("Change the object in the current mode") :
                                TIP_("Remove from the current mode");
   }
+  else if (BKE_object_is_in_editmode(ob)) {
+    return;
+  }
   else {
     icon = ICON_DOT;
     tip = TIP_(
         "Change the object in the current mode\n"
         "* Ctrl to add to the current mode");
   }
   UI_block_emboss_set(block, UI_EMBOSS_NONE_OR_STATUS);
   uiBut *but = uiDefIconBut(block,
                             UI_BTYPE_ICON_TOGGLE,
                             0,
@JulianEisel There are many different states and corner cases in here that I am probably just missing something. But in Outliner the item in question makes it through various checks in `outliner_draw_mode_column_toggle` and gets to the end, where everything gets a mode toggle. In this case it is seen as NOT currently in edit mode so it gets that DOT icon. But it **is** in edit mode, so when you click the button we get to `do_outliner_item_editmode_toggle` and we then try to exit edit mode. So seems like one area of code is thinking this is not in edit mode while another thinks otherwise. So the simplest (but possibly wrong) way to avoid this is just this: ```Diff diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 5b56a5cb62d..b8addb626fc 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2178,20 +2178,23 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, const bool object_data_shared = (ob->data == ob_active->data); draw_active_icon = draw_active_icon || object_data_shared; int icon; const char *tip; if (draw_active_icon) { icon = UI_icon_from_object_mode(ob_active->mode); tip = object_data_shared ? TIP_("Change the object in the current mode") : TIP_("Remove from the current mode"); } + else if (BKE_object_is_in_editmode(ob)) { + return; + } else { icon = ICON_DOT; tip = TIP_( "Change the object in the current mode\n" "* Ctrl to add to the current mode"); } UI_block_emboss_set(block, UI_EMBOSS_NONE_OR_STATUS); uiBut *but = uiDefIconBut(block, UI_BTYPE_ICON_TOGGLE, 0, ```
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2024-03-21 14:53:59 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-22 18:26:46 +01:00
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
3 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#119384
No description provided.