Page MenuHome

Fix T62720: crash when loading empty alembic file
AbandonedPublic

Authored by Jacques Lucke (JacquesLucke) on Mar 27 2019, 4:21 PM.

Details

Summary

Unfortunately, there is another problem when loading the
other frames. It does not crash anymore, though.

Not sure what causes the other problem yet.

There is probably a better solution to the problem
this patch solves, but that takes a bit more time
to figure out for me.
Maybe @Sybren A. Stüvel (sybren) wants to solve this differently.

Diff Detail

Repository
rB Blender
Branch
empty-alembic (branched from master)
Build Status
Buildable 3243
Build 3243: arc lint + arc unit

Event Timeline

Harbormaster completed remote builds in B3243: Diff 14440.
Brecht Van Lommel (brecht) requested changes to this revision.EditedMar 29 2019, 5:09 PM

I don't much like having special cases for zero vertices, it's hard to verify correctness then.

The real issue is that the caller of this function does not properly handle the case where the existing mesh is returned. In that case BKE_mesh_nomain_to_mesh should be skipped, since it's the same mesh.

The assert can be changed to BLI_assert(mesh->mvert || mesh->totvert == 0);.

source/blender/alembic/intern/abc_mesh.cc
1108

The same bug will happen in this code path.

This revision now requires changes to proceed.Mar 29 2019, 5:09 PM