I'm also running into a similar error. When I try to run the project I downloaded from the Github repository.
gl.version: 4.0.0 - Build 10.18.10.3408
gl.supports_NPOT: true
cocos2d.x.version: cocos2d-x 3.4
cocos2d.x.compiled_with_profiler: false
cocos2d.x.build_type: DEBUG
cocos2d.x.compiled_with_gl_state_cache: true
gl.max_texture_size: 16384
gl.vendor: Intel
gl.renderer: Intel(R) HD Graphics
gl.max_texture_units: 96
gl.supports_ETC1: false
gl.supports_S3TC: true
gl.supports_ATITC: false
gl.supports_PVRTC: false
gl.supports_BGRA8888: false
gl.supports_discard_framebuffer: false
gl.supports_vertex_array_object: true
}
cocos2d: fullPathForFilename: No file found at raptor.atlas. Possible missing file.
cocos2d: fullPathForFilename: No file found at raptor.json. Possible missing file.
Assert failed: Invalid skeleton JSON: ????????????????
Assertion failed!
Program: ...\example\proj.win32\Debug.win32\spine-cocos2dx.exe
File: c:\users\mark\workspace\spine-runti...\skeleto...rer.cpp
Line: 133
Expression: skeletonData
Specifically, the program throws an assertion failure at the second assertion in the following function from SkeletonRenderer.cpp
void SkeletonRenderer::initWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) {
_atlas = spAtlas_createFromFile(atlasFile.c_str(), 0);
CCASSERT(_atlas, "Error reading atlas file.");
spSkeletonJson* json = spSkeletonJson_create(_atlas);
json->scale = scale;
spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile.c_str());
CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data file.");
spSkeletonJson_dispose(json);
setSkeletonData(skeletonData, true);
initialize();
Do you have any idea as to what's going on?
For those who still have this problem, the following fixed it for me:
After a bunch of debugging, I realized that the code is not looking in the right directory for atlas and json files, and cannot locate them. I copied the atlas and son files from Example/Resources/Common to proj.win32, and then the program ran.