carve boolean modifier make some files impossible to open or very unstable.
Open, ConfirmedPublic

Description

System Information
Win 7 x64

Blender Version
Broken: 2.79 testbuild2 VS2015 (VS2013 opens as well as Linux versions)

Short description of error
Some carve modifier makes complex files impossible to open. Changing them to Bmesh mode make those files to work again.

Exact steps for others to reproduce the error
I couldn't make a file to reproduce the error. What is sure is that the object in this file makes the original file to not open in VS2015 builds and prints a lot of memory leaks on Linux with ASAN.


When this object is removed or changed to bmesh in the boolean modifier option, the file opens again on VS2015 builds.
Even on 2013 builds, the original file with this object is very unstable. It randomly but often crashes at render start or end or when undoing.

Details

Type
Bug
Sergey Sharybin (sergey) triaged this task as "Confirmed" priority.

I can confirm the issue, but only happens in release build done with MSVC 2015. It doesn't even happen in RelWithDebInfo configuration, which makes it really hard to troubleshoot.

@LazyDodo (LazyDodo), Can you check whether you can reproduce the issue and get some usable backtrace?

Note that the crash on file open is only on VS2015 release, but instability is in VS2013 = official release too. It just happens randomly during a material change or an undo or a final render start or whatever part of memory was corrupted.

I can open it with VS 2015 build (blender-2.78-edc6bec-win64-vc14.zip). Using parameter -d. I changed the modifier type to Carve and save it.

I can open it and do some extrude to test undo/redo and also render it fine (although I cancelled halfway because it takes too long). Its my own VS 2015 build of e982ebd Blender.

Although as a note, the first time I change the modifier to Carve, rotating the scene become slugging. After 30 sec or something, its fine. Subsequent opening the file with modifier already set to Carve, rotating the scene just fine.

@mathieu menuet (bliblubli), please define what exact instability is and how to reproduce it.

@Sergey Sharybin (sergey) T51975 shows variants of bug that pops up when this carve object is in scene. Sometime, some part of the mesh (the box containing the vegetables) was missing, sometime the textures were pink, sometime the shader got white. Most of the time hitting F12 would segfault. Sometime it succeeded, but the segfault appeared just after render finished (couldn't even save the file).
@Fable Fox (fablefox) debug builds indeed are working. Of course, replacing carve with bmesh also makes the file stable again.
To more easily the bugs and crash, you have to:

  • open with VS2013 buildbots
  • append everything in the file attached into a very complex scene (there must be something to corrupt in memory, so many shaders, lot of meshes, etc. make crash more often)
  • duplicate in place ( location may be important to trigger the bug) what you appended to make the probability of crash higher (the overflows are more likely to produce a crash if many part of memory are overwritten/corrupted, so duplicate it a hundred time if it doesn't crash)
  • then try to render, undo, etc...

This part of the scene was modeledin november last year and wasn't touched since then. The bugs and crash happened more often as scene complexity increased.