• RuntimesBugs
  • Crash when deforming a mesh attachment in a sequence

Related Discussions
...

Sorry for the delay! My colleague Mario would normally field this question, but he came down with a personal issue late last week. He'll be along to help as soon as he can.

Nothing stands out as problematic or risky in your project.

Do you have any information about the crash?

You say you are using the spine-c runtime, but that is a generic runtime -- it doesn't have rendering. What game toolkit are you using?

Thank you for your response.

The issue seems to occur when using Sequence to release a MeshAttachment in the spSkeletonData_dispose() function for the following code during debugging builds, resulting in a double-free.

https://github.com/EsotericSoftware/spine-runtimes/blob/64853b73bcbce53a1851b2b3b05ba8f5ab37e6d8/spine-c/spine-c/src/spine/MeshAttachment.c#L34

void _spMeshAttachment_dispose(spAttachment *attachment) {
	spMeshAttachment *self = SUB_CAST(spMeshAttachment, attachment);
	if (self->sequence) spSequence_dispose(self->sequence); // ←spSequence_dispose()でself->sequenceがfreeされる
	FREE(self->path);
	FREE(self->uvs);
	if (!self->parentMesh) {
		_spVertexAttachment_deinit(SUPER(self));
		FREE(self->regionUVs);
		FREE(self->triangles);
		FREE(self->edges);
	} else
		_spAttachment_deinit(attachment);
	if (self->sequence) FREE(self->sequence); // ←The double-free error occurs because the self->sequence that has already been freed is being freed again.
	FREE(self);
}

If you run the attached file in your environment with a debugging build, do you encounter this issue? :

Sorry for the late reply, just came back from sickness. Thanks gor the report, I've opened an issue here. Will be fixed asap!

EsotericSoftware/spine-runtimes2394

5 днів пізніше

This is now fixed in the 4.1 and 4.2-beta branches. Thanks for reporting!