Bmesh Crash on opening a file #49467

Closed
opened 2016-09-27 18:40:23 +02:00 by Aaron Carlisle · 37 comments
Member

System Information
Windows 10
Intel HD 4600

Blender Version
Broken: Latest Master
Worked: (optional)

Short description of error
Upon opening https://cloud.blender.org/p/gallery/57e5084f0fcf294119c5055c

you get the following backtrace with a debug build:

    20: BLI_system_backtrace - 0x28B81040
    19: mesh_vert_canon - 0x280E4F00
    18: interp_vmesh - 0x280E5C00
    17: adj_vmesh - 0x280E7DD0
    16: bevel_build_rings - 0x280E8B30
    15: build_vmesh - 0x280EC120
    14: BM_mesh_bevel - 0x280DD510
    13: applyModifier - 0x27FDE120
    12: modwrap_applyModifier - 0x283585B0
    11: mesh_calc_modifiers - 0x28535C80
    10: mesh_build_data - 0x28538310
    9: makeDerivedMesh - 0x2852DE50
    8: BKE_object_handle_data_update - 0x286C4F80
    7: BKE_object_handle_update_ex - 0x284AED00
    6: scene_update_object_func - 0x283B4160
    5: task_scheduler_thread_run - 0x28BDE9B0
    4: sched_get_priority_max - 0x5E2D12FD
    3: sched_get_priority_max - 0x5E2D12FD
    2: sched_get_priority_max - 0x5E2D12FD
    1: BaseThreadInitThunk - 0x824A80E0
    0: RtlUserThreadStart - 0x8378C580
    BLI_assert failed: C:UsersAaronBlenderDevblender-gitblendersourceblenderbmeshtoolsbmesh_bevel.c:2079, mesh_vert_canon(), at '0 <= i && i <= n && 0 <= j && j <= ns && 0 <= k && k <= ns'

Exact steps for others to reproduce the error
Open https://cloud.blender.org/p/gallery/57e5084f0fcf294119c5055c

**System Information** Windows 10 Intel HD 4600 **Blender Version** Broken: Latest Master Worked: (optional) **Short description of error** Upon opening https://cloud.blender.org/p/gallery/57e5084f0fcf294119c5055c you get the following backtrace with a debug build: ``` 20: BLI_system_backtrace - 0x28B81040 19: mesh_vert_canon - 0x280E4F00 18: interp_vmesh - 0x280E5C00 17: adj_vmesh - 0x280E7DD0 16: bevel_build_rings - 0x280E8B30 15: build_vmesh - 0x280EC120 14: BM_mesh_bevel - 0x280DD510 13: applyModifier - 0x27FDE120 12: modwrap_applyModifier - 0x283585B0 11: mesh_calc_modifiers - 0x28535C80 10: mesh_build_data - 0x28538310 9: makeDerivedMesh - 0x2852DE50 8: BKE_object_handle_data_update - 0x286C4F80 7: BKE_object_handle_update_ex - 0x284AED00 6: scene_update_object_func - 0x283B4160 5: task_scheduler_thread_run - 0x28BDE9B0 4: sched_get_priority_max - 0x5E2D12FD 3: sched_get_priority_max - 0x5E2D12FD 2: sched_get_priority_max - 0x5E2D12FD 1: BaseThreadInitThunk - 0x824A80E0 0: RtlUserThreadStart - 0x8378C580 BLI_assert failed: C:UsersAaronBlenderDevblender-gitblendersourceblenderbmeshtoolsbmesh_bevel.c:2079, mesh_vert_canon(), at '0 <= i && i <= n && 0 <= j && j <= ns && 0 <= k && k <= ns' ``` **Exact steps for others to reproduce the error** Open https://cloud.blender.org/p/gallery/57e5084f0fcf294119c5055c
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @Blendify

Added subscriber: @Blendify

#50400 was marked as duplicate of this issue

#50400 was marked as duplicate of this issue
Author
Member

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey
Howard Trickey was assigned by Bastien Montagne 2016-09-28 08:29:54 +02:00

Added subscriber: @howardt

Added subscriber: @howardt

@howardt backtrace seems to point to Bevel issue?

@howardt backtrace seems to point to Bevel issue?
Member

Yes, it is triggering a "shouldn't happen" assert in Bevel. I fixed a similar problem to this recently. Will try to fix this soon.

Yes, it is triggering a "shouldn't happen" assert in Bevel. I fixed a similar problem to this recently. Will try to fix this soon.
Author
Member

Any news?

Any news?
Author
Member

Added subscriber: @SteffenD

Added subscriber: @SteffenD

The Blenderman file is still crashing all the Buildbot builds on opening while official 2.78c can open it. Is this a regression of some sort?

The Blenderman file is still crashing all the Buildbot builds on opening while official 2.78c can open it. Is this a regression of some sort?

All 2.8 Buildbot builds also crash.

All 2.8 Buildbot builds also crash.
Member

Looking at this again now. For reference, here's a simpler file that causes the assert failure (in mesh_vert_canon): arm_simpler.blend

Looking at this again now. For reference, here's a simpler file that causes the assert failure (in mesh_vert_canon): [arm_simpler.blend](https://archive.blender.org/developer/F598791/arm_simpler.blend)

This issue was referenced by 8be9d68dd4

This issue was referenced by 8be9d68dd42d6831675356bfa0e1bf9274680df3
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Fixed this now. Sorry for the long delay. Fixed in master; the 2.8 branch should update in a day or two when merge from 2.78 to 2.8 happens.

Fixed this now. Sorry for the long delay. Fixed in master; the 2.8 branch should update in a day or two when merge from 2.78 to 2.8 happens.

Thanks for taking care of this. I just compiled the very latest master and the Blenderman.blend still crashes Blender here.

Thanks for taking care of this. I just compiled the very latest master and the Blenderman.blend still crashes Blender here.
Member

Hmm. Can you see if the code you compiled includes commit 8be9d68dd4 ? (git log in the blender source directory should show it).

Hmm. Can you see if the code you compiled includes commit 8be9d68dd4 ? (git log in the blender source directory should show it).

According to the build number in the splashscreen, yes.
And the bmesh_bevel.c source also contains the latest changes.

According to the build number in the splashscreen, yes. And the bmesh_bevel.c source also contains the latest changes.
Author
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author
Member

I am going to re-open this then... I can recompile later today and test as long as my render finishes.

I am going to re-open this then... I can recompile later today and test as long as my render finishes.
Member

I cannot reproduce a crash. Maybe I don't have all the same build settings. Can someone who gets a crash paste a stack backtrace? I am wondering if the crash is still in bevel, or whether it is somewhere else now.

I cannot reproduce a crash. Maybe I don't have all the same build settings. Can someone who gets a crash paste a stack backtrace? I am wondering if the crash is still in bevel, or whether it is somewhere else now.

I justed tested it again and found that my own VS2015 builds and the official Buildbot VS2015 builds crash while the VS2013 builds from the Buildbot don't.

I justed tested it again and found that my own VS2015 builds and the official Buildbot VS2015 builds crash while the VS2013 builds from the Buildbot don't.
Member

Thanks. Do you have a stack backtrace? At any rate, I will try with VS2017 which I have at home and see what happens with that.

Thanks. Do you have a stack backtrace? At any rate, I will try with VS2017 which I have at home and see what happens with that.

No, sorry, no backtrace. I'm not a coder, I'm just glad I can compile Blender myself ;)

No, sorry, no backtrace. I'm not a coder, I'm just glad I can compile Blender myself ;)
Author
Member

@SteffenD to make a debug build on windows just run make 2015 full debug this will give a backtrace after crashing. I would test but my machine is busy rendering still.

@SteffenD to make a debug build on windows just run `make 2015 full debug` this will give a backtrace after crashing. I would test but my machine is busy rendering still.
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

for what it's worth, i can't repro on win7, with either the buildbot or my own builds....

for what it's worth, i can't repro on win7, with either the buildbot or my own builds....

Added subscriber: @debris

Added subscriber: @debris

In #49467#434665, @LazyDodo wrote:
for what it's worth, i can't repro on win7, with either the buildbot or my own builds....

Did you also try the VS2015 builds? The VS2013 builds don't crash for me.

> In #49467#434665, @LazyDodo wrote: > for what it's worth, i can't repro on win7, with either the buildbot or my own builds.... Did you also try the VS2015 builds? The VS2013 builds don't crash for me.
Member

Yes, used a 2015/x64 buildbot from yesterday, and and build (2015/x64/debug) from master today.

Yes, used a 2015/x64 buildbot from yesterday, and and build (2015/x64/debug) from master today.
Member

After some more testing, i got the buildbot and my local release version to crash, but not my debug build... :(

After some more testing, i got the buildbot and my local release version to crash, but not my debug build... :(
Member

I could not get it to crash with my vs2017 release or debug builds. I did try the buildbot 2015/x64/release build, and it crashed, but I don't know how to get a symbol file for this so couldn't get a meaningful stack trace. I have a strong suspicion that the problem now is not with bevel, but somewhere else.

I could not get it to crash with my vs2017 release or debug builds. I did try the buildbot 2015/x64/release build, and it crashed, but I don't know how to get a symbol file for this so couldn't get a meaningful stack trace. I have a strong suspicion that the problem now is not with bevel, but somewhere else.
Member

after some convincing i had the release build put out a stracktrace

>	blender.exe!carve::geom3d::fitPlane<carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> >,carve::mesh::Face<3>::vector_mapping>(carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> > begin, carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> > end, carve::mesh::Face<3>::vector_mapping adapt, carve::geom::plane<3> & plane) Line 60	C++

 	blender.exe!carve::mesh::Face<3>::recalc() Line 279	C++
 	blender.exe!carve_addMesh(ImportMeshData * import_data, CarveMeshImporter * mesh_importer) Line 640	C++
 	blender.exe!carve_mesh_from_dm(Object * object, DerivedMesh * dm, const DMArrays * dm_arrays) Line 699	C
 	blender.exe!NewBooleanDerivedMesh(DerivedMesh * dm, Object * ob, DerivedMesh * dm_select, Object * ob_select, int int_op_type) Line 758	C
 	blender.exe!applyModifier_carve(ModifierData * md, Object * ob, DerivedMesh * derivedData, ModifierApplyFlag flag) Line 394	C
 	blender.exe!mesh_calc_modifiers(Scene * scene, Object * ob, float[3] * inputVertexCos, const bool useRenderParams, int useDeform, const bool need_mapping, unsigned __int64 dataMask, const int index, const bool useCache, const bool build_shapekey_layers, const bool allow_gpu, DerivedMesh * * r_deform, DerivedMesh * * r_final) Line 2060	C
 	blender.exe!mesh_build_data(Scene * scene, Object * ob, unsigned __int64 dataMask, const bool build_shapekey_layers, const bool need_mapping) Line 2633	C
 	blender.exe!makeDerivedMesh(Scene * scene, Object * ob, BMEditMesh * em, unsigned __int64 dataMask, const bool build_shapekey_layers) Line 2727	C
 	blender.exe!BKE_object_handle_data_update(EvaluationContext * eval_ctx, Scene * scene, Object * ob) Line 204	C
 	blender.exe!BKE_object_handle_update_ex(EvaluationContext * eval_ctx, Scene * scene, Object * ob, RigidBodyWorld * rbw, const bool do_proxy_update) Line 2650	C
 	blender.exe!scene_update_object_func(TaskPool * pool, void * taskdata, int threadid) Line 1517	C
 	blender.exe!task_scheduler_thread_run(void * thread_p) Line 414	C
 	pthreadVC2.dll!000007feeabb627b()	Unknown
 	pthreadVC2.dll!000007feeabb8eb7()	Unknown
 	pthreadVC2.dll!000007feeabb9102()	Unknown
 	[External Code]	
after some convincing i had the release build put out a stracktrace ``` > blender.exe!carve::geom3d::fitPlane<carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> >,carve::mesh::Face<3>::vector_mapping>(carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> > begin, carve::mesh::detail::list_iter_t<carve::mesh::Edge<3> > end, carve::mesh::Face<3>::vector_mapping adapt, carve::geom::plane<3> & plane) Line 60 C++ blender.exe!carve::mesh::Face<3>::recalc() Line 279 C++ blender.exe!carve_addMesh(ImportMeshData * import_data, CarveMeshImporter * mesh_importer) Line 640 C++ blender.exe!carve_mesh_from_dm(Object * object, DerivedMesh * dm, const DMArrays * dm_arrays) Line 699 C blender.exe!NewBooleanDerivedMesh(DerivedMesh * dm, Object * ob, DerivedMesh * dm_select, Object * ob_select, int int_op_type) Line 758 C blender.exe!applyModifier_carve(ModifierData * md, Object * ob, DerivedMesh * derivedData, ModifierApplyFlag flag) Line 394 C blender.exe!mesh_calc_modifiers(Scene * scene, Object * ob, float[3] * inputVertexCos, const bool useRenderParams, int useDeform, const bool need_mapping, unsigned __int64 dataMask, const int index, const bool useCache, const bool build_shapekey_layers, const bool allow_gpu, DerivedMesh * * r_deform, DerivedMesh * * r_final) Line 2060 C blender.exe!mesh_build_data(Scene * scene, Object * ob, unsigned __int64 dataMask, const bool build_shapekey_layers, const bool need_mapping) Line 2633 C blender.exe!makeDerivedMesh(Scene * scene, Object * ob, BMEditMesh * em, unsigned __int64 dataMask, const bool build_shapekey_layers) Line 2727 C blender.exe!BKE_object_handle_data_update(EvaluationContext * eval_ctx, Scene * scene, Object * ob) Line 204 C blender.exe!BKE_object_handle_update_ex(EvaluationContext * eval_ctx, Scene * scene, Object * ob, RigidBodyWorld * rbw, const bool do_proxy_update) Line 2650 C blender.exe!scene_update_object_func(TaskPool * pool, void * taskdata, int threadid) Line 1517 C blender.exe!task_scheduler_thread_run(void * thread_p) Line 414 C pthreadVC2.dll!000007feeabb627b() Unknown pthreadVC2.dll!000007feeabb8eb7() Unknown pthreadVC2.dll!000007feeabb9102() Unknown [External Code] ```

@LazyDodo, do you mind testing this patch P479: Snippet for #49467

diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index f86d8b99f3c..3a0b19fac87 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -368,8 +368,17 @@ static DerivedMesh *applyModifier_carve(
 		return derivedData;
 
 	dm = get_dm_for_modifier(bmd->object, flag);
+	if (!DM_is_valid(derivedData)) {
+		printf("Invalid DerivedData!\n");
+		return derivedData;
+	}
 
 	if (dm) {
+		if (!DM_is_valid(dm)) {
+			printf("Invalid dm!\n");
+			return derivedData;
+		}
+
 		DerivedMesh *result;
 
 		/* when one of objects is empty (has got no faces) we could speed up

and see if both DM are valid?

@LazyDodo, do you mind testing this patch [P479: Snippet for #49467](https://archive.blender.org/developer/P479.txt) ``` diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index f86d8b99f3c..3a0b19fac87 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -368,8 +368,17 @@ static DerivedMesh *applyModifier_carve( return derivedData; dm = get_dm_for_modifier(bmd->object, flag); + if (!DM_is_valid(derivedData)) { + printf("Invalid DerivedData!\n"); + return derivedData; + } if (dm) { + if (!DM_is_valid(dm)) { + printf("Invalid dm!\n"); + return derivedData; + } + DerivedMesh *result; /* when one of objects is empty (has got no faces) we could speed up ``` and see if both DM are valid?

Closed as duplicate of #51540

Closed as duplicate of #51540

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Carve has known crashes and isn't maintained, one reason bmesh boolean was developed.

Carve has known crashes and isn't maintained, one reason bmesh boolean was developed.
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
9 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#49467
No description provided.