Crash after multiple Undo/redo after switching between Edit mode and Object mode #80377

Closed
opened 2020-09-02 13:39:12 +02:00 by Filip Kokoška · 16 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Radeon RX 580 Series ATI Technologies Inc. 4.5.14736 Core Profile Context 20.8.1 27.20.2001.13001

Blender Version
Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: 0330d1af29
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender crash after pressing Undo or Redo shortcuts on keyboard multiple times. It happens later, after switching between Edit mode and Object mode a few times.
Happened on both functions, but only when there is an actual step to Undo/Redo.

Exact steps for others to reproduce the error

  • Start Blender with the basic cube
  • Switch between Object mode and Edit mode 10-20 times
  • Start pressing Ctrl+Z (Undo) multiple times, continue with pressing Shift+Ctrl+Z (Redo) later (..or do 2nd step more times so it crashes on Undo)

undo_redo.mp4

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: Radeon RX 580 Series ATI Technologies Inc. 4.5.14736 Core Profile Context 20.8.1 27.20.2001.13001 **Blender Version** Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `0330d1af29` Worked: (newest version of Blender that worked as expected) **Short description of error** Blender crash after pressing Undo or Redo shortcuts on keyboard multiple times. It happens later, after switching between Edit mode and Object mode a few times. Happened on both functions, but only when there is an actual step to Undo/Redo. **Exact steps for others to reproduce the error** - Start Blender with the basic cube - Switch between Object mode and Edit mode 10-20 times - Start pressing Ctrl+Z (Undo) multiple times, continue with pressing Shift+Ctrl+Z (Redo) later (..or do 2nd step more times so it crashes on Undo) [undo_redo.mp4](https://archive.blender.org/developer/F8832916/undo_redo.mp4)
Author

Added subscriber: @WuTangH

Added subscriber: @WuTangH

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I can confirm a consistent crash after redoing twice.
The backtrace shows that the problem involves the interface:

Exception thrown: read access violation.
but->poin was 0x68.
>	blender.exe!ui_but_value_get(uiBut * but) Line 2384	C

 	blender.exe!ui_but_is_pushed_ex(uiBut * but, double * value) Line 2008	C
 	blender.exe!ui_but_update_select_flag(uiBut * but, double * value) Line 2093	C
 	blender.exe!ui_but_update_ex(uiBut * but, const bool validate) Line 3555	C
 	blender.exe!ui_but_update(uiBut * but) Line 3723	C
 	blender.exe!ui_but_update_and_icon_set(uiBut * but, int icon) Line 4778	C
 	blender.exe!uiDefIconBut(uiBlock * block, int type, int retval, int icon, int x, int y, short width, short height, void * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5163	C
 	blender.exe!uiDefIconButBit(uiBlock * block, int type, int bit, int retval, int icon, int x, int y, short width, short height, void * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5199	C
 	blender.exe!uiDefIconButBitS(uiBlock * block, int type, int bit, int retval, int icon, int x, int y, short width, short height, short * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5386	C
 	blender.exe!uiTemplateEditModeSelection(uiLayout * layout, bContext * C) Line 146	C
 	blender.exe!uiTemplateHeader3D_mode(uiLayout * layout, bContext * C) Line 238	C
 	blender.exe!UILayout_template_header_3D_mode_call(bContext * C, ReportList * reports, PointerRNA * _ptr, ParameterList * _parms) Line 3423	C
 	blender.exe!RNA_function_call(bContext * C, ReportList * reports, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 7573	C
 	blender.exe!pyrna_func_call(BPy_FunctionRNA * self, _object * args, _object * kw) Line 6292	C
 	python37_d.dll!_PyObject_FastCallKeywords(_object * callable, _object * const * stack, __int64 nargs, _object * kwnames) Line 199	C
 	python37_d.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4621	C
 	python37_d.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3095	C
 	python37_d.dll!function_code_fastcall(PyCodeObject * co, _object * const * args, __int64 nargs, _object * globals) Line 283	C
 	python37_d.dll!_PyFunction_FastCallKeywords(_object * func, _object * const * stack, __int64 nargs, _object * kwnames) Line 408	C
 	python37_d.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4617	C
 	python37_d.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3125	C
 	python37_d.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * const * args, __int64 argcount, _object * const * kwnames, _object * const * kwargs, __int64 kwcount, int kwstep, _object * const * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 3930	C
 	python37_d.dll!_PyFunction_FastCallDict(_object * func, _object * const * args, __int64 nargs, _object * kwargs) Line 376	C
 	python37_d.dll!PyObject_Call(_object * callable, _object * args, _object * kwargs) Line 226	C
 	blender.exe!bpy_class_call(bContext * C, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 8463	C
 	blender.exe!header_draw(const bContext * C, Header * hdr) Line 722	C
 	blender.exe!ED_region_header_layout(const bContext * C, ARegion * region) Line 3016	C
 	blender.exe!ED_region_header(const bContext * C, ARegion * region) Line 3079	C
 	blender.exe!view3d_header_region_draw(const bContext * C, ARegion * region) Line 1117	C
 	blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 532	C
 	blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 700	C
 	blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 826	C
 	blender.exe!wm_draw_update(bContext * C) Line 1027	C
 	blender.exe!WM_main(bContext * C) Line 489	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 531	C
 	[External Code]	

Perhaps the problem is more internal but for now I will direct the bug to the interface team.

I can confirm a consistent crash after redoing twice. The backtrace shows that the problem involves the interface: ``` Exception thrown: read access violation. but->poin was 0x68. ``` ```lines > blender.exe!ui_but_value_get(uiBut * but) Line 2384 C blender.exe!ui_but_is_pushed_ex(uiBut * but, double * value) Line 2008 C blender.exe!ui_but_update_select_flag(uiBut * but, double * value) Line 2093 C blender.exe!ui_but_update_ex(uiBut * but, const bool validate) Line 3555 C blender.exe!ui_but_update(uiBut * but) Line 3723 C blender.exe!ui_but_update_and_icon_set(uiBut * but, int icon) Line 4778 C blender.exe!uiDefIconBut(uiBlock * block, int type, int retval, int icon, int x, int y, short width, short height, void * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5163 C blender.exe!uiDefIconButBit(uiBlock * block, int type, int bit, int retval, int icon, int x, int y, short width, short height, void * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5199 C blender.exe!uiDefIconButBitS(uiBlock * block, int type, int bit, int retval, int icon, int x, int y, short width, short height, short * poin, float min, float max, float a1, float a2, const unsigned char * tip) Line 5386 C blender.exe!uiTemplateEditModeSelection(uiLayout * layout, bContext * C) Line 146 C blender.exe!uiTemplateHeader3D_mode(uiLayout * layout, bContext * C) Line 238 C blender.exe!UILayout_template_header_3D_mode_call(bContext * C, ReportList * reports, PointerRNA * _ptr, ParameterList * _parms) Line 3423 C blender.exe!RNA_function_call(bContext * C, ReportList * reports, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 7573 C blender.exe!pyrna_func_call(BPy_FunctionRNA * self, _object * args, _object * kw) Line 6292 C python37_d.dll!_PyObject_FastCallKeywords(_object * callable, _object * const * stack, __int64 nargs, _object * kwnames) Line 199 C python37_d.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4621 C python37_d.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3095 C python37_d.dll!function_code_fastcall(PyCodeObject * co, _object * const * args, __int64 nargs, _object * globals) Line 283 C python37_d.dll!_PyFunction_FastCallKeywords(_object * func, _object * const * stack, __int64 nargs, _object * kwnames) Line 408 C python37_d.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4617 C python37_d.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3125 C python37_d.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * const * args, __int64 argcount, _object * const * kwnames, _object * const * kwargs, __int64 kwcount, int kwstep, _object * const * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 3930 C python37_d.dll!_PyFunction_FastCallDict(_object * func, _object * const * args, __int64 nargs, _object * kwargs) Line 376 C python37_d.dll!PyObject_Call(_object * callable, _object * args, _object * kwargs) Line 226 C blender.exe!bpy_class_call(bContext * C, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 8463 C blender.exe!header_draw(const bContext * C, Header * hdr) Line 722 C blender.exe!ED_region_header_layout(const bContext * C, ARegion * region) Line 3016 C blender.exe!ED_region_header(const bContext * C, ARegion * region) Line 3079 C blender.exe!view3d_header_region_draw(const bContext * C, ARegion * region) Line 1117 C blender.exe!ED_region_do_draw(bContext * C, ARegion * region) Line 532 C blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 700 C blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 826 C blender.exe!wm_draw_update(bContext * C) Line 1027 C blender.exe!WM_main(bContext * C) Line 489 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 531 C [External Code] ``` Perhaps the problem is more internal but for now I will direct the bug to the interface team.

Added subscriber: @JerBot

Added subscriber: @JerBot

I am also experiencing a constant crash in Edit mode, after multiple undo & redos, in Blender 2.83.5.

Attached is one of my crash logs, which all appear to be similar. hammerhead_geo_153_gums.crash.txt

I am also experiencing a constant **crash in Edit mode, after multiple undo & redos**, in Blender 2.83.5. Attached is one of my crash logs, which all appear to be similar. [hammerhead_geo_153_gums.crash.txt](https://archive.blender.org/developer/F8848137/hammerhead_geo_153_gums.crash.txt)
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

In #80377#1008764, @mano-wii wrote:

I can confirm a consistent crash after redoing twice.

Setting status to Confirmed then

> In #80377#1008764, @mano-wii wrote: > > I can confirm a consistent crash after redoing twice. Setting status to `Confirmed` then

Added subscriber: @dfelinto

Added subscriber: @dfelinto

I can reproduce with the following:

  • Tab
  • Tab
  • Tab
  • Tab
  • Ctrl + Z (undo)
  • Shift Ctrl + Z (redo)
I can reproduce with the following: * Tab * Tab * Tab * Tab * Ctrl + Z (undo) * Shift Ctrl + Z (redo)
Bastien Montagne was assigned by Dalai Felinto 2020-09-11 16:37:51 +02:00

Hi Bastien, this doesn't happen with the old undo, so I think you may like it (also super easy to reproduce, see my previous comment).

Hi Bastien, this doesn't happen with the old undo, so I think you may like it (also super easy to reproduce, see my previous comment).
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Hmm, it tries to add the vert/edge/face selection mode toggle even though edit mode was just exited. Reason being that CTX_data_edit_object() returns a non-NULL pointer, but we can't get the edit-mesh:

blender/software/dev/default/src/source/blender/editors/space_view3d/view3d_header.c:146:11: runtime error: member access within null pointer of type 'struct BMEditMesh'
Hmm, it tries to add the vert/edge/face selection mode toggle even though edit mode was just exited. Reason being that `CTX_data_edit_object()` returns a non-`NULL` pointer, but we can't get the edit-mesh: ``` blender/software/dev/default/src/source/blender/editors/space_view3d/view3d_header.c:146:11: runtime error: member access within null pointer of type 'struct BMEditMesh' ```
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

As far as I can tell this task is a duplicate of this one: #78392 ([2.83.5, 2.90, 2.91] Crash on undo/ redo after changing modes)

EDIT: Looking at that task again, it's over a month old, and the steps to recreate it are exactly the same, so I'll close this as a duplicate.

As far as I can tell this task is a duplicate of this one: #78392 ([2.83.5, 2.90, 2.91] Crash on undo/ redo after changing modes) EDIT: Looking at that task again, it's over a month old, and the steps to recreate it are exactly the same, so I'll close this as a duplicate.
Member

Closed as duplicate of #78392

Closed as duplicate of #78392
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
7 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#80377
No description provided.