After some research I have found that in file CXMeshFileLoader.cpp in method readBinWord() there is no checking for end of the file, that is why some times on some files it works, some times do not work...
You can fix this by adding line as following:
Code: Select all
u16 CXMeshFileLoader::readBinWord(){
#ifdef __BIG_ENDIAN__
const u16 tmp = os::Byteswap::byteswap(*(u16 *)P);
#else
//START PATCH
if((End-P)==0){
return -1;
}
//END PATCH
const u16 tmp = *(u16 *)P;
#endif
P += 2;
return tmp;
}