Maniphest T93250

Crash when creating a new object
Closed, Resolved

Assigned To
Hans Goudey (HooglyBoogly)
Authored By
Erik Abrahamsson (erik85)
Nov 20 2021, 11:23 PM
Tags
  • BF Blender
  • User Interface
Subscribers
Erik Abrahamsson (erik85)
Hans Goudey (HooglyBoogly)
Jacques Lucke (JacquesLucke)
Julian Eisel (Severin)
Pratik Borhade (PratikPB2123)
Reiner Prokein (tiles)

Description

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 rB01df48a98394: Refactor: Port spreadsheet data set to UI tree view

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

Revisions and Commits

rB Blender
D13301

Related Objects

Mentioned In
T93260: Crash to desktop with adding a primitive in Geometry Nodes workspace
Mentioned Here
rB01df48a98394: Refactor: Port spreadsheet data set to UI tree view

Event Timeline

Erik Abrahamsson (erik85) created this task.Nov 20 2021, 11:23 PM
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Nov 21 2021, 10:33 AM
Pratik Borhade (PratikPB2123) added projects: Geometry Nodes, Nodes & Physics.
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).
Pratik Borhade (PratikPB2123) triaged this task as High priority.Nov 21 2021, 11:09 AM
Pratik Borhade (PratikPB2123) updated the task description.
Pratik Borhade (PratikPB2123) added a subscriber: Hans Goudey (HooglyBoogly).

Yes, caused by rB01df48a98394: Refactor: Port spreadsheet data set to UI tree view

cc @Hans Goudey (HooglyBoogly)

Pratik Borhade (PratikPB2123) added a subscriber: Reiner Prokein (tiles).
Jacques Lucke (JacquesLucke) added subscribers: Julian Eisel (Severin), Jacques Lucke (JacquesLucke).Nov 21 2021, 11:25 AM

May also need some feedback from @Julian Eisel (Severin).

Hans Goudey (HooglyBoogly) added a comment.Nov 21 2021, 5:23 PM

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.

Hans Goudey (HooglyBoogly) edited projects, added User Interface; removed Nodes & Physics, Geometry Nodes.Nov 21 2021, 5:26 PM
Hans Goudey (HooglyBoogly) closed this task as Resolved by committing rB77ddc6e3500e: Fix T93250: Crash in spreadsheet tree view after recent commit.Nov 22 2021, 2:47 PM
Hans Goudey (HooglyBoogly) claimed this task.
Hans Goudey (HooglyBoogly) added a commit: rB77ddc6e3500e: Fix T93250: Crash in spreadsheet tree view after recent commit.