Crash when creating a new object #93250

Closed
opened 2021-11-20 23:23:22 +01:00 by Erik Abrahamsson · 12 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.47

Blender Version
Broken: version: 3.1.0 Alpha, branch: master
Caused by 01df48a983

Short description of error
Crash when a new object is created with a spreadsheet view visible.

Exact steps for others to reproduce the error

  • Open Blender
  • Delete default Cube
  • Go to the Geometry Nodes workspace
  • Create a new object in the 3d view
**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.47 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master Caused by 01df48a983 **Short description of error** Crash when a new object is created with a spreadsheet view visible. **Exact steps for others to reproduce the error** - Open Blender - Delete default Cube - Go to the Geometry Nodes workspace - Create a new object in the 3d view
Author
Member

Added subscriber: @erik85

Added subscriber: @erik85

#93260 was marked as duplicate of this issue

#93260 was marked as duplicate of this issue
Member

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

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

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Yes, caused by 01df48a983

cc @HooglyBoogly

Yes, caused by 01df48a983 cc @HooglyBoogly
Member

Added subscriber: @tiles

Added subscriber: @tiles
Member

Added subscribers: @JulianEisel, @JacquesLucke

Added subscribers: @JulianEisel, @JacquesLucke
Member

May also need some feedback from @severin.

May also need some feedback from @severin.
Member

It seems the tree view code assumes there is always an old tree view around to retrieve the state from. That makes sense for the asset browser where it has been used so far, but I don't think it makes sense for the spreadsheet:

This is how I would expect to fix the issue:

diff --git a/source/blender/editors/interface/tree_view.cc b/source/blender/editors/interface/tree_view.cc
index e9d68a734d2..5fcf78dd565 100644
--- a/source/blender/editors/interface/tree_view.cc
+++ b/source/blender/editors/interface/tree_view.cc
@@ -111,7 +111,10 @@ void AbstractTreeView::update_from_old(uiBlock &new_block)
 
   uiTreeViewHandle *old_view_handle = ui_block_view_find_matching_in_old_block(
       &new_block, reinterpret_cast<uiTreeViewHandle *>(this));
-  BLI_assert(old_view_handle);
+  if (old_view_handle == nullptr) {
+    is_reconstructed_ = true;
+    return;
+  }
 
   AbstractTreeView &old_view = reinterpret_cast<AbstractTreeView &>(*old_view_handle);

However, the issue is also fixed by adding a poll function to the panel to make sure the old uiBlock never existed in the first place (which also makes the reconstruction not run, just in a different way).

I don't think the data set region panel should require a poll function necessarily, so I'll submit the above as a patch.

It seems the tree view code assumes there is always an old tree view around to retrieve the state from. That makes sense for the asset browser where it has been used so far, but I don't think it makes sense for the spreadsheet: This is how I would expect to fix the issue: ``` diff --git a/source/blender/editors/interface/tree_view.cc b/source/blender/editors/interface/tree_view.cc index e9d68a734d2..5fcf78dd565 100644 --- a/source/blender/editors/interface/tree_view.cc +++ b/source/blender/editors/interface/tree_view.cc @@ -111,7 +111,10 @@ void AbstractTreeView::update_from_old(uiBlock &new_block) uiTreeViewHandle *old_view_handle = ui_block_view_find_matching_in_old_block( &new_block, reinterpret_cast<uiTreeViewHandle *>(this)); - BLI_assert(old_view_handle); + if (old_view_handle == nullptr) { + is_reconstructed_ = true; + return; + } AbstractTreeView &old_view = reinterpret_cast<AbstractTreeView &>(*old_view_handle); ``` However, the issue is also fixed by adding a poll function to the panel to make sure the old `uiBlock` never existed in the first place (which also makes the reconstruction not run, just in a different way). I don't think the data set region panel should require a poll function necessarily, so I'll submit the above as a patch.

This issue was referenced by 77ddc6e350

This issue was referenced by 77ddc6e3500e4d736195202438df50190be85e5a
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Hans Goudey self-assigned this 2021-11-22 14:47:34 +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
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#93250
No description provided.