Maniphest T67217

Undo steps limiting crash with sculpt and texture painting
Closed, ResolvedBUG

Assigned To
Campbell Barton (campbellbarton)
Authored By
Julien Kaspar (JulienKaspar)
Jul 19 2019, 12:13 PM
Tags
  • BF Blender
  • Blender Studio
Subscribers
Alem Omerovic (alempkht)
Alex (SpectreFirst)
Alex (xrlm)
Alexander Santos (alexanderferreira)
Ammar (aalfouzan)
AntoineR (S_Jockey)
Aristotelis (aristotle)
45 More Subscribers

Description

System Information
Operating system: Linux-4.13.0-46-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 384.130

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-17 07:56, hash: rBf8a70db55654

Short description of error
I don't know when this started happening but since yesterday when I sculpted again, Blender randomly crashes every 10-15 min.
This might happen when I undo, switch my brush, place a stroke. Anything really.
I talked with Sebastian Parlorg and apparently it might be tied to allocating memory.
Here's what the Debug Blender terminal said right before the crash.

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
je_large_dalloc (tsdn=0x7ffff7fc2778, extent=0x0) at src/large.c:347
347     src/large.c: No such file or directory.
#0 0x000000000302ec92 in je_large_dalloc (tsdn=0x7ffff7fc2778, extent=0x0) at src/large.c:347
#1 0x0000000002b48d28 in MEM_lockfree_freeN (vmemh=0x7fff59530d48) at /media/data/blender_guest/blender_master/intern/guardedalloc/intern/mallocn_lockfree_impl.c:157
#2 0x0000000004e0712c in BLO_memfile_free (memfile=0x7fffa9948908) at /media/data/blender_guest/blender_master/source/blender/blenloader/intern/undofile.c:62
#3 0x0000000004e071f5 in BLO_memfile_merge (first=0x7fffa9948908, second=0x7fff7e393108)
at /media/data/blender_guest/blender_master/source/blender/blenloader/intern/undofile.c:92
#4 0x0000000004e06f02 in memfile_undosys_step_free (us_p=0x7fffe0902a08) at /media/data/blender_guest/blender_master/source/blender/editors/undo/memfile_undo.c:123
#5 0x0000000004e31a0c in undosys_step_free_and_unlink (ustack=0x7fffdffe5938, us=0x7fffe0902a08)
at /media/data/blender_guest/blender_master/source/blender/blenkernel/intern/undo_system.c:221
#6 0x0000000004e31f86 in undosys_stack_clear_all_first (ustack=0x7fffdffe5938, us=0x7fff5ed05008)
at /media/data/blender_guest/blender_master/source/blender/blenkernel/intern/undo_system.c:322
#7 0x0000000004e32642 in BKE_undosys_stack_limit_steps_and_memory (ustack=0x7fffdffe5938, steps=255, memory_limit=0)
at /media/data/blender_guest/blender_master/source/blender/blenkernel/intern/undo_system.c:440
#8 0x0000000004e05045 in ED_undo_push (C=0x7ffff2d85308, str=0xb1948bf "Radial Control") at /media/data/blender_guest/blender_master/source/blender/editors/undo/ed_undo.c:92
#9 0x0000000004e05995 in ED_undo_push_op (C=0x7ffff2d85308, op=0x7fffe085c2c8) at /media/data/blender_guest/blender_master/source/blender/editors/undo/ed_undo.c:290
#10 0x0000000002db82a3 in wm_operator_finished (C=0x7ffff2d85308, op=0x7fffe085c2c8, repeat=false, store=true)
at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:982
#11 0x0000000002dbb506 in wm_handler_operator_call (C=0x7ffff2d85308, handlers=0x7fffe0f64998, handler_base=0x7fff61d29ad8, event=0x7fff939d6788, properties=0x0)
at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:2217
#12 0x0000000002dbd411 in wm_handlers_do_intern (C=0x7ffff2d85308, event=0x7fff939d6788, handlers=0x7fffe0f64998)
at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:2897
#13 0x0000000002dbd59e in wm_handlers_do (C=0x7ffff2d85308, event=0x7fff939d6788, handlers=0x7fffe0f64998)
at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:2945
#14 0x0000000002dbe823 in wm_event_do_handlers (C=0x7ffff2d85308) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_event_system.c:3323
#15 0x0000000002db17e2 in WM_main (C=0x7ffff2d85308) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm.c:417
#16 0x00000000027044f6 in main (argc=1, argv=0x7fffffffe668) at /media/data/blender_guest/blender_master/source/creator/creator.c:500

Revisions and Commits

rB Blender

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Alex (SpectreFirst) added a subscriber: Alex (SpectreFirst).EditedJul 22 2019, 2:53 PM

Huh, this is very strange - I have found a way to reproduce that problem with 100% consistency on 4a5e046c923f from 2019-07-16 with just a default Cube with no additioanl subdivisions or modifiers and no Dyntopo, using only one Sculpt brush and one Rotate tool in Edit Mode but I cannot reproduce it in latest 45ae9edbd5ac from 2019-07-21. Just in case, here is how to reproduce this on an older build:

  1. Start Blender.
  2. Ctrl+Tab to Sculpt Mode on a default Cube. Do 10 strokes with default Sculpt brush, you have to press and release the mouse at least 10 times.
  3. Ctrl+Tab to Edit Mode. Switch to Rotate tool and rotate your selected mesh 10 times by pressing and releasing the mouse.
  4. Ctrl+Tab to Sculpt Mode. Do another 10 strokes on it with default Sculpt brush, you have to press and release the mouse at least 10 times.
  5. Ctrl+Tab to Edit Mode and Blender will crash.
  6. The same thing was reproducible with other modes as well, for example, if you switch to Vertex Paint instead of Edit Mode and do the same 10 strokes trick, after a few sessions of switching to and from Sculpt Mode Blender will crash as well.
  7. For some reason I cannot reproduce the same exact thing if I start old Blender from blender_debug_log but it's 100% reproducible on regular start.
Brecht Van Lommel (brecht) merged a task: T67378: sculpt to object/ shutdown.Jul 22 2019, 2:54 PM
Brecht Van Lommel (brecht) added a subscriber: Jakob Leitner (CGJ).
Brecht Van Lommel (brecht) added a comment.Jul 22 2019, 2:59 PM

T67424#730246 and T67443#730264 have instructions on how to reproduce the issue too.

The commit that caused this problem was reverted and the latest build from builder.blender.org should no longer have the problem.

But the original issue that this commit was supposed to fix is back now, so we that is fixed we need to verify that following these instructions there is no crash.

Alex (SpectreFirst) added a comment.EditedJul 22 2019, 5:15 PM

Did some testing on 45ae9edbd5ac from 2019-07-21 on Intel Core i7, 8 Gb RAM, AMD Radeon HD 7700, Windows 7 x64:

https://developer.blender.org/T67424#730246

  • Spent nearly half an hour sculpting, moving vertices in Edit Mode, painting weights and vertex colors on a default Sphere while switching between modes once in a while and everything seems to work fine.
  • Also tried Multires (which still doesn't work properly when switching subdivisions and still doesn't show textures and vertex colors in Sculpt Mode but that is another case) and Dyntopo, everything seems to be working fine.

https://developer.blender.org/T67443#730264
This was reproducible on my side the same exact way as the other one but right now I can paint and switch modes for 10 minutes without any problems.

EDIT: I was able to reproduce the text block crach from the text editor on 2019-07-21 build. I have no idea what causes this but if you type a long string into a text block, rename the block and press Undo it will still crash. Also tried combo - typed long string, renamed the text block, moved light in 3D View, pressed Undo several times and Blender crashed when it reached text block renaming step so the problem is most likely somewhere in that area. -d mode gave me the same exception_access_violation error.

Other than that I was unable to reproduce mode switching crash. My Undo Steps was set to 2 all the time but that didn't seem to affect anything - I was able to undo once in a while with no problems. My system is Windows so I cannot verify if any of these problems persist on other systems.

Sebastian Parborg (zeddb) merged a task: T67388: Crash.Jul 22 2019, 5:45 PM
Sebastian Parborg (zeddb) added subscribers: SEth KInstle (Scuinox), Massimiliano Puliero (mmaaxx), dark999 (dark999).
Campbell Barton (campbellbarton) mentioned this in rB0a0e2dd8a2ce: Fix T67040: Undo crashes after renaming.Jul 23 2019, 5:18 AM
Campbell Barton (campbellbarton) merged a task: T67486: crash while paint mode.Jul 23 2019, 5:20 AM
Campbell Barton (campbellbarton) merged a task: T67481: crash while sculpting.
Campbell Barton (campbellbarton) merged a task: T67479: Crash during sculpture.
Campbell Barton (campbellbarton) added a subscriber: hongsungwoo (hongkoon).
Campbell Barton (campbellbarton) added a subscriber: pierre (puya).
Campbell Barton (campbellbarton) added a subscriber: Roman Moreno (Mancho).
Brecht Van Lommel (brecht) merged a task: T67503: Crash in sculpt mode with dyntopo.Jul 23 2019, 4:04 PM
Brecht Van Lommel (brecht) merged a task: T67469: Blender 2.8 Rc2 : Dyntopo to Edit mode Crash. .
Brecht Van Lommel (brecht) merged a task: T67498: Blender crashes during sculpting.
Brecht Van Lommel (brecht) added subscribers: Malinguaggi (Voguart), Ammar (aalfouzan).
Brecht Van Lommel (brecht) added subscribers: AntoineR (S_Jockey), Israel Picanço Lenzi (Mahou).
Brecht Van Lommel (brecht) added subscribers: Karol Szczerba (Baszczer), ronan ducluzeau (zeauro).
Brecht Van Lommel (brecht) added a subscriber: Konstantin (bokoa).
Brecht Van Lommel (brecht) added subscribers: eric (westingtyler), Germano Cavalcante (mano-wii).
Campbell Barton (campbellbarton) added a subscriber: Ingrid Sanassée (MlleDR).
Malinguaggi (Voguart) added a comment.EditedJul 24 2019, 2:01 PM

Thank you and congratulations for this quick and effective intervention for the problem "T67580: Regular crashes when working in Sculpting window." and "T67498: Blender crashes during sculpting."
I downloaded the latest version of July 24 blender-2.80-b63f0266a056-win64.zip and it works very well, again Congratulations to the team!

Germano Cavalcante (mano-wii) added a subscriber: 阮征 (ORyanO).
Brecht Van Lommel (brecht) merged a task: T67621: Object to Edit mode crashes on RC-2.Jul 25 2019, 12:40 AM
Brecht Van Lommel (brecht) merged a task: T67616: Seemingly random crashes with a noticeable pattern.
Brecht Van Lommel (brecht) added subscribers: Tad Wimer (ToadsterSoft), Gavin Scott (Zoot).
Brecht Van Lommel (brecht) added subscribers: Frederic Kneier (Elendur), Demeter Dzadik (Mets), Sami Vuorenpää (samvuo), Tiago Piloto (Articci).
Brecht Van Lommel (brecht) added a subscriber: Finn Bear (finnb).
Brecht Van Lommel (brecht) added a subscriber: Aristotelis (aristotle).
Brecht Van Lommel (brecht) merged a task: T67564: Crashed while sculpting.Jul 25 2019, 12:47 AM
Brecht Van Lommel (brecht) added subscribers: Zohaib Butt (zohaibcheetah), Eitan Traurig (EitanSomething).
Brecht Van Lommel (brecht) added a subscriber: Wilbur Jaywright (zargulthewizard).
Brecht Van Lommel (brecht) merged a task: T67554: Random Crashing.Jul 25 2019, 1:49 AM
Brecht Van Lommel (brecht) added a subscriber: Darryl (darrylsh).
Campbell Barton (campbellbarton) added a subscriber: Konrad (Czteryk).
Israel Picanço Lenzi (Mahou) added a comment.EditedJul 25 2019, 7:48 AM

Still crashing when changing mode on blender-2.80.0-git.bfe580642f46.
Steps->
Open Blender
Delete Cube
Create UV Sphere
Texture Paint
On Active Tool menu, create a texture Base Color with default settings.
Start to paint and changing to Edit several times with Tab shortcut.
After some time blender crash.
Record time: 30 Seconds

I'm unable to crash with Sculpt and tab smashing.

Marcin Twarowski (Tvaroog) removed a subscriber: Marcin Twarowski (Tvaroog).Jul 25 2019, 8:04 AM
hongsungwoo (hongkoon) removed a subscriber: hongsungwoo (hongkoon).Jul 25 2019, 8:46 AM
Campbell Barton (campbellbarton) added a comment.Jul 25 2019, 9:20 AM

@Israel Picanço Lenzi (Mahou) could you open a separate report?

I tried redoing this bug but couldn't. Could you check if this happens more often with the number of undo steps lowered to around 5?

Israel Picanço Lenzi (Mahou) added a comment.Jul 25 2019, 9:35 AM

Actually it doesn't, it's pretty random, I tried several times changing undo steps from 36 to 5 and the reverse, the time to crash it's literally random and don't seems to be influenciated by the undo steps, I will create a separate report.

Demeter Dzadik (Mets) removed a subscriber: Demeter Dzadik (Mets).Jul 25 2019, 10:28 AM
Demeter Dzadik (Mets) mentioned this in T67660: crashes while sculpting.Jul 25 2019, 1:38 PM
Sebastian Parborg (zeddb) merged a task: T67660: crashes while sculpting.Jul 29 2019, 6:36 PM
Sebastian Parborg (zeddb) added subscribers: Paul (Comrade_crunchy), Demeter Dzadik (Mets).
Sebastian Parborg (zeddb) merged a task: T67651: blender crash while entering sculpt mode and exiting it.
Sebastian Parborg (zeddb) added subscribers: Lindy (Enalya), Marcin Twarowski (Tvaroog), Levon Harutunian (Levonbuck).
Sebastian Parborg (zeddb) added a subscriber: Sergey (3005box).
Sebastian Parborg (zeddb) added a subscriber: wissam (wissammax).