Joining multires objects crash #57537

Closed
opened 2018-10-31 12:51:27 +01:00 by Julien Kaspar · 7 comments
Member

Blender Version
Broken: 14e1dfda4e1

Short description of error
When joining two objects, both with a multires modifier, Blender immediately crashes.

**Blender Version** Broken: 14e1dfda4e1 **Short description of error** When joining two objects, both with a multires modifier, Blender immediately crashes.
Author
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Sergey Sharybin was assigned by Jacques Lucke 2018-10-31 13:01:50 +01:00

Only happens when the multires modifier actually has subdivisions.

To reproduce open the file and press CTRL + J.
multires bug.blend

multires_apply_smat(struct Depsgraph * depsgraph, Scene * scene, Object * ob, float (*)[3] smat) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/multires.c:2224)
multiresModifier_prepare_join(struct Depsgraph * depsgraph, Scene * scene, Object * ob, Object * to_ob) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/multires.c:2288)
join_mesh_single(Depsgraph * depsgraph, Main * bmain, Scene * scene, Object * ob_dst, Object * ob_src, float (*)[4] imat, MVert **mvert_pp, MEdge** medge_pp, MLoop **mloop_pp, MPoly** mpoly_pp, CustomData * vdata, CustomData * edata, CustomData * ldata, CustomData * pdata, int totvert, int totedge, int totloop, int totpoly, Key * key, Key * nkey, Material ** matar, int * matmap, int totcol, int * vertofs, int * edgeofs, int * loopofs, int * polyofs) (/home/jacques/blender-git/blender/source/blender/editors/mesh/meshtools.c:213)
join_mesh_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/mesh/meshtools.c:510)
join_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/object/object_add.c:2603)
wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const _Bool poll_only, _Bool use_last_properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1330)
wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler, wmEvent * event, PointerRNA * properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2054)
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2356)
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2616)
wm_event_do_handlers(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:3070)
WM_main(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:412)
main(int argc, const char ** argv) (/home/jacques/blender-git/blender/source/creator/creator.c:525)

I won't try to fix it because it looks like this code will soon be replaced anyway because it still uses DerivedMesh. Tell me when I'm wrong.

Only happens when the multires modifier actually has subdivisions. To reproduce open the file and press CTRL + J. [multires bug.blend](https://archive.blender.org/developer/F5308682/multires_bug.blend) ``` multires_apply_smat(struct Depsgraph * depsgraph, Scene * scene, Object * ob, float (*)[3] smat) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/multires.c:2224) multiresModifier_prepare_join(struct Depsgraph * depsgraph, Scene * scene, Object * ob, Object * to_ob) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/multires.c:2288) join_mesh_single(Depsgraph * depsgraph, Main * bmain, Scene * scene, Object * ob_dst, Object * ob_src, float (*)[4] imat, MVert **mvert_pp, MEdge** medge_pp, MLoop **mloop_pp, MPoly** mpoly_pp, CustomData * vdata, CustomData * edata, CustomData * ldata, CustomData * pdata, int totvert, int totedge, int totloop, int totpoly, Key * key, Key * nkey, Material ** matar, int * matmap, int totcol, int * vertofs, int * edgeofs, int * loopofs, int * polyofs) (/home/jacques/blender-git/blender/source/blender/editors/mesh/meshtools.c:213) join_mesh_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/mesh/meshtools.c:510) join_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/object/object_add.c:2603) wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const _Bool poll_only, _Bool use_last_properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1330) wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler, wmEvent * event, PointerRNA * properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2054) wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2356) wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2616) wm_event_do_handlers(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:3070) WM_main(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:412) main(int argc, const char ** argv) (/home/jacques/blender-git/blender/source/creator/creator.c:525) ``` I won't try to fix it because it looks like this code will soon be replaced anyway because it still uses DerivedMesh. Tell me when I'm wrong.
Author
Member

Added subscribers: @brecht, @Sergey

Added subscribers: @brecht, @Sergey
Author
Member

Maybe @Sergey or @brecht can have a look at it as well?

Maybe @Sergey or @brecht can have a look at it as well?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

The crash is fixed and joining uniformly scaled objects is also working now.

Still need to work on proper joining for non-uniformly scaled objects, but don't think it's THAT important, so for now it goes to a TODO list.

Thanks for the report!

The crash is fixed and joining uniformly scaled objects is also working now. Still need to work on proper joining for non-uniformly scaled objects, but don't think it's THAT important, so for now it goes to a TODO list. Thanks for the report!
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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: studio/blender-studio#57537
No description provided.