Hi!
I'm trying do add some sort of hot-reload for spine files in my project. It already works great for valid files, but i am having troubles catching exceptions.
I'm loading my skeleton data with
spSkeletonData* rawSkeleton = spSkeletonJson_readSkeletonDataFile(rawSkeletonJson, path);
// parsing failed?
if (rawSkeleton == nullptr)
{
ErrorSpine("Parsing a skeleton file failed! Error: %s", rawSkeletonJson->error);
return nullptr;
}
In case a region is not found (SkeletonJson.c, Line 595) because invalid files are used, Spine tries to dispose the skins and crashes in line 70 of Skin.c instead of just returning 0 and let me handle the error properly.
This is my stacktrace:
Client_d.exe!spSkin_dispose(spSkin * self) Line 70 C
Client_d.exe!spSkeletonData_dispose(spSkeletonData * self) Line 50 C
Client_d.exe!spSkeletonJson_readSkeletonData(spSkeletonJson * self, const char * json) Line 596 C
Client_d.exe!spSkeletonJson_readSkeletonDataFile(spSkeletonJson * self, const char * path) Line 414 C
Client_d.exe!Spine::SpineSkeletonJsonLoader::ReadSkeletonDataFile(const String & path) Line 71 C++
...
Is there a way to get around this? Thank you in advance for any helpful advice!
anyone?