Sometimes ColladRT crashes because of missing Sids or Ids inside the document.
For example, sometimes this code inside ReadAnimation() crashes, because both Id and Sid values are optional for a given <animation>:
CrtAnimation *CrtScene::ReadAnimation( domAnimationRef animation )
{
if (animation==NULL) return NULL;
CrtPrint( "Add new Animation %s
", animation->getId() );
if ( animation )
{
CrtAnimation * newAnim = CrtNew(CrtAnimation );
CrtAssert("No memory
", newAnim!=NULL);
// get the animation name - target - keys and time
newAnim->SetName( animation->getId() ); //Sometimes crashes
newAnim->SetDocURI( animation->getDocumentURI()->getURI() ); //Sometimes crashes
.....
}
Is there a conditioner to add id and sid attributes to all the missing Ids and Sids ( including optional and non-optional )of the Collada document?