AndrewFG

When loading json or skel, the variable region==0x00

spine-cocos2dx.cpp line 43
static void setAttachmentVertices(RegionAttachment *attachment) {
AtlasRegion *region = (AtlasRegion *) attachment->getRendererObject();
AttachmentVertices *attachmentVertices = new AttachmentVertices((Texture2D *) region->page->getRendererObject(), 4, quadTriangles, 6);


P.S. Runtime is of course the latest from github.
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
AndrewFG
  • Postovi: 12

icevmj

I had the same problem :rofl:
icevmj
  • Postovi: 1

Mario

Sorry for that. I have to rewrite the way how spine-cocos2d-x handles mesh generation for the renderer. See https://github.com/EsotericSoftware/spine-runtimes/issues/2166.

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

Mario
  • Postovi: 3274

AndrewFG

Thank you. It's almost good. But after playing the sequence, there is still an error here:
SequenceTimeline.cpp line 74 (slotAttachment==0)

Attachment* slotAttachment = slot->getAttachment();
if (slotAttachment != _attachment) {
if (!slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti) || ((VertexAttachment*)slotAttachment)->getTimelineAttachment() != _attachment) return;
AndrewFG
  • Postovi: 12

Mario

I took your bomb asset and plugged it into the latest spine-cocos2dx example. I tried all animations in looping mode. I did not get any crash. Plesae provide code for me to reproduce the issue.
Avatar
Mario

Mario
  • Postovi: 3274

AndrewFG

I changed the Sequence type to "Once", since the explosion should play once. Perhaps this is the reason.

---

I have added the verification, otherwise I will get a crash. But I'm not sure if it working good, for example, if there are any memory leaks

Attachment* slotAttachment = slot->getAttachment();
if (slotAttachment && (slotAttachment != _attachment)) {
if (!slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti) || ((VertexAttachment*)slotAttachment)->getTimelineAttachment() != _attachment) return;
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
AndrewFG
  • Postovi: 12

Mario

Cheers! This is now fixed in both the 4.1 and 4.2-beta branches.
Avatar
Mario

Mario
  • Postovi: 3274


Natrag na Runtimes