Blender 2.9 crashes when UNDO limit is reached #77441

Closed
opened 2020-06-05 15:15:58 +02:00 by Radu Popovici · 24 comments

System Information
Operating system: win 10
Graphics card: GTX 1070

Blender Version
Broken: (2.9.0 Alpha daily build)
Worked: (2.8.3)

Running a simple modal script where I am creating a new object and then cutting a new undo check point with bpy.ops.ed.undo_push()
It crashes when UNDO limit is reached

Exact steps for others to reproduce the error

  1. Change the UNDO limit in prefs to a small value(e.g. 5) if you don't want to click 30 times..
  2. Load the attached blend file
  3. Run the script attched from script window
  4. Click in viewport at least 5 times to match the numer of undos
    4 Crash..

Same problem if instead of bpy.ops.ed.undo_push() you return FINISHED from the modal op and add bl_options = {'REGISTER', 'UNDO'} to the op definition
So, this bug appears to be related to the undo system

Also, worth mentioning that running with 'blender -d' does not crash!!

**System Information** Operating system: win 10 Graphics card: GTX 1070 **Blender Version** Broken: (2.9.0 Alpha daily build) Worked: (2.8.3) Running a simple modal script where I am creating a new object and then cutting a new undo check point with bpy.ops.ed.undo_push() It crashes when UNDO limit is reached **Exact steps for others to reproduce the error** 1. Change the UNDO limit in prefs to a small value(e.g. 5) if you don't want to click 30 times.. 1. Load the attached blend file 2. Run the script attched from script window 3. Click in viewport at least 5 times to match the numer of undos 4 Crash.. Same problem if instead of bpy.ops.ed.undo_push() you return FINISHED from the modal op and add bl_options = {'REGISTER', 'UNDO'} to the op definition So, this bug appears to be related to the undo system Also, worth mentioning that running with 'blender -d' does not crash!!
Author

Added subscriber: @rpopovici

Added subscriber: @rpopovici

#77458 was marked as duplicate of this issue

#77458 was marked as duplicate of this issue

#77459 was marked as duplicate of this issue

#77459 was marked as duplicate of this issue

#77451 was marked as duplicate of this issue

#77451 was marked as duplicate of this issue
Author

Blend file..
crash_modal.blend

Blend file.. [crash_modal.blend](https://archive.blender.org/developer/F8579316/crash_modal.blend)

Added subscriber: @antoniov

Added subscriber: @antoniov

I had a similar crash drawing in grease pencil. Just open 2D template and start to draw...at some point you will get a crash. This is the crash log:

ucrtbased.dll!_aligned_free_dbg(void * block) Line 1975	C++
ucrtbased.dll!_aligned_free(void * block) Line 545	C++
blender.exe!aligned_free(void * ptr) Line 96	C
blender.exe!MEM_lockfree_freeN(void * vmemh) Line 124	C
blender.exe!BLO_memfile_free(MemFile * memfile) Line 66	C
blender.exe!BLO_memfile_merge(MemFile * first, MemFile * second) Line 95	C
blender.exe!memfile_undosys_step_free(UndoStep * us_p) Line 268	C
blender.exe!undosys_step_free_and_unlink(UndoStack * ustack, UndoStep * us) Line 225	C
blender.exe!undosys_stack_clear_all_first(UndoStack * ustack, UndoStep * us, UndoStep * us_exclude) Line 333	C
blender.exe!BKE_undosys_stack_limit_steps_and_memory(UndoStack * ustack, int steps, unsigned __int64 memory_limit) Line 449	C
blender.exe!ED_undo_push(bContext * C, const unsigned char * str) Line 107	C
blender.exe!ED_undo_push_op(bContext * C, wmOperator * op) Line 302	C
blender.exe!wm_operator_finished(bContext * C, wmOperator * op, const bool repeat, const bool store) Line 926	C
blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2050	C
blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2806	C
blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2854	C
blender.exe!wm_event_do_handlers(bContext * C) Line 3283	C
blender.exe!WM_main(bContext * C) Line 478	C
blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 530	C
[External Code]	
I had a similar crash drawing in grease pencil. Just open 2D template and start to draw...at some point you will get a crash. This is the crash log: ``` ucrtbased.dll!_aligned_free_dbg(void * block) Line 1975 C++ ucrtbased.dll!_aligned_free(void * block) Line 545 C++ blender.exe!aligned_free(void * ptr) Line 96 C blender.exe!MEM_lockfree_freeN(void * vmemh) Line 124 C blender.exe!BLO_memfile_free(MemFile * memfile) Line 66 C blender.exe!BLO_memfile_merge(MemFile * first, MemFile * second) Line 95 C blender.exe!memfile_undosys_step_free(UndoStep * us_p) Line 268 C blender.exe!undosys_step_free_and_unlink(UndoStack * ustack, UndoStep * us) Line 225 C blender.exe!undosys_stack_clear_all_first(UndoStack * ustack, UndoStep * us, UndoStep * us_exclude) Line 333 C blender.exe!BKE_undosys_stack_limit_steps_and_memory(UndoStack * ustack, int steps, unsigned __int64 memory_limit) Line 449 C blender.exe!ED_undo_push(bContext * C, const unsigned char * str) Line 107 C blender.exe!ED_undo_push_op(bContext * C, wmOperator * op) Line 302 C blender.exe!wm_operator_finished(bContext * C, wmOperator * op, const bool repeat, const bool store) Line 926 C blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2050 C blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2806 C blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2854 C blender.exe!wm_event_do_handlers(bContext * C) Line 3283 C blender.exe!WM_main(bContext * C) Line 478 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 530 C [External Code] ```
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

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

Changed status from 'Needs Triage' to: 'Resolved'
Hans Goudey self-assigned this 2020-06-05 15:31:16 +02:00
Member

Thanks for the report. I'm guessing this is the same issue as #77396.

This should be fixed with 67b17684e6, which will be in the next daily build.

I'm going to close this as resolved, but please comment here if there's still an issue with the next build!

Thanks for the report. I'm guessing this is the same issue as #77396. This should be fixed with 67b17684e6, which will be in the next daily build. I'm going to close this as resolved, but please comment here if there's still an issue with the next build!
Member

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

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

Nevermind, my bad, just saw the comment from Antonio.

Nevermind, my bad, just saw the comment from Antonio.

@HooglyBoogly I compiled the code five minutes ago, so not sure that commit fix the bug.

@HooglyBoogly I compiled the code five minutes ago, so not sure that commit fix the bug.

Added subscriber: @DarkKnight

Added subscriber: @DarkKnight

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

@antoniov your backtrace looks terribly similar to the issue fixed in 67b17684e6...

In any case, I cannot reproduce with current master (neither debug build with ASAN, nor release one), so am going to ask for a confirmation first here. :)

@antoniov your backtrace looks terribly similar to the issue fixed in 67b17684e6... In any case, I cannot reproduce with current master (neither debug build with ASAN, nor release one), so am going to ask for a confirmation first here. :)
Author

@mont29 thanks. I can't reproduce this one either with the latest build. I have another thus, related to undoing and object linking to the scene. But i think is better to open another task for that one if I can reproduce it..

@mont29 thanks. I can't reproduce this one either with the latest build. I have another thus, related to undoing and object linking to the scene. But i think is better to open another task for that one if I can reproduce it..

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'

Indeed, lets keep an issue per task. ;)

Thanks, closing then.

Indeed, lets keep an issue per task. ;) Thanks, closing then.
Author

new issue probably related #77557

new issue probably related #77557

Added subscribers: @Jewls, @mano-wii, @Fuzzy_mane

Added subscribers: @Jewls, @mano-wii, @Fuzzy_mane

Added subscribers: @Low_Polygon42, @ankitm

Added subscribers: @Low_Polygon42, @ankitm

Added subscribers: @Imth1, @Alaska

Added subscribers: @Imth1, @Alaska
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#77441
No description provided.