Using undo after adding an object in edit mode to an object hidden in viewport causes a crash #72097
Labels
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#72097
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 399.24
Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash:
26bd5ebd42
Worked: (optional)
Short description of error
Adding a mesh to a hidden object in edit mode, followed by an undo causes Blender to crash.
Exact steps for others to reproduce the error
Added subscriber: @IKU
#73431 was marked as duplicate of this issue
#72480 was marked as duplicate of this issue
#72458 was marked as duplicate of this issue
Added subscriber: @MaciejJutrzenka
tried selever times both on linux and windows 10 can't reproduce.. can u make short video showing this? i might reproduce wrongly the steps
Crush reportto Hide object while editing. UNDO crashHide object while editing. UNDO crashto Hide object while editing followed by UNDO causes crashAdded subscriber: @rjg
I can reproduce this issue on Windows. The crash is caused by the attempt to print the warning in
ED_undo_object_set_active_or_warn()
. The following stack trace was created from a build off0e7fd4ad6
Hide object while editing followed by UNDO causes crashto Using undo after adding an object in edit mode to an object hidden in viewport causes a crashAdded subscriber: @esminis
Issue happens in mesh_undosys_step_decode because us->elems / us->elems_len is empty. It is empty because hidden objects are not added to MeshUndoStep (in this case it is currently selected object).
I have implemented initial solution that disables hiding object when it is in edit mode, but it is still not a complete solution (need feedback from someone with better knowledge of internals):
#72097.patch
Added subscriber: @zazizizou
I don't think that's a desired solution. Doing the same steps above for bones gives a warning but not a crash, so it should be possible to do undo for meshes without a crash.
Also, you might find the intro into how to submit a patch useful: https://wiki.blender.org/wiki/Process/Contributing_Code
From how blender works it seems to me that disabling "Hide object" while you are editing it is most logical solution.
Which of those do you think would be desired solution:
Added subscriber: @QUANTED
Added subscriber: @Gasased
Added subscriber: @Tryfast
Added subscriber: @ankitm
@rjg see if this: #73234 and the one linked to it: #73416 are related to it.
Campbell:
#73234 seems to be different bug, plus it happens only on Blender 2.82 (on Blender 2.81 I have it does not happen), reason is that no undo is done (this bug happens when undo is executed on hidden objects)
Depending on what solution is chosen for this bug it might also solve #73234 as it fails at same place and due to similar reasons.
Added subscriber: @mano-wii
Changed status from 'Confirmed' to: 'Resolved'
I reproduced this bug in the informed version, but not the latest daily build, so it appears the bug has been fixed already.
Please try the latest daily build: https://builder.blender.org/download/
If the problem persists, we can re-open the report.