在bugly后台,看到很多类似这样的崩溃记录。
详细内容如下:
请问这个是由于什么问题导致的?我们项目是从3.3-js,由于谷歌要64位支持,升级到3.17.2的。
另外我们spine有一个自定义的方法,没改过。
`void SkeletonRenderer::replaceTexture(const std::string& name, const std::string& attachmentName, const std::string& texPath)
{
spAttachment* attachment = getAttachment(name, attachmentName);
if (!attachment) {
CCLOG("[SkeletonRenderer::replaceTexture] replace faild:%s", name.c_str());
return;
}
switch (attachment->type) {
case SP_ATTACHMENT_REGION:
{
unsigned short quadTriangles[6] = { 0, 1, 2, 2, 3, 0 };
spRegionAttachment* regionAtt = (spRegionAttachment*)attachment;
spAtlasRegion* regionAtlas = (spAtlasRegion*)regionAtt->regionObject;
spAtlasPage* newpage = spAtlasPage_create((spAtlas*)regionAtlas->page->atlas, texPath.c_str());
spAtlasRegion_replace(regionAtlas, newpage);
spAtlasPage_replace(regionAtlas->page, texPath.c_str());
spAtlasRegion_replace(regionAtlas, regionAtlas->page);
regionAtt->scaleX = 1;
regionAtt->scaleY = 1;
regionAtt->width = regionAtlas->width;
regionAtt->height = regionAtlas->height;
regionAtt->regionOffsetX = regionAtlas->offsetX;
regionAtt->regionOffsetY = regionAtlas->offsetY;
regionAtt->regionWidth = regionAtlas->width;
regionAtt->regionHeight = regionAtlas->height;
regionAtt->regionOriginalWidth = regionAtlas->originalWidth;
regionAtt->regionOriginalHeight = regionAtlas->originalHeight;
spRegionAttachment_setUVs(regionAtt, regionAtlas->u, regionAtlas->v, regionAtlas->u2, regionAtlas->v2, 0);
spRegionAttachment_updateOffset(regionAtt);
AttachmentVertices* attachmentVertices = (AttachmentVertices*)regionAtt->rendererObject;
attachmentVertices->_texture = (Texture2D*)regionAtlas->page->rendererObject;
V3F_C4B_T2F* vertices = attachmentVertices->_triangles->verts;
for (int i = 0, ii = 0; i < 4; ++i, ii += 2) {
vertices[i].texCoords.u = regionAtt->uvs[ii];
vertices[i].texCoords.v = regionAtt->uvs[ii + 1];
}
}
break;
case SP_ATTACHMENT_BOUNDING_BOX:
case SP_ATTACHMENT_MESH:
case SP_ATTACHMENT_SKINNED_MESH:
{
CCLOG("undefined attachment type");
}
}
}`


