Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / File import failed when using vs2010
  RSS 2.0 ATOM  

File import failed when using vs2010
Rate this thread
 
50139
 
Permlink of this thread  
avatar
  • clayman s
  • Posted: 04 December 2010 11:21 PM
  • Total Posts: 4
  • Joined: 05 December 2010 06:56 AM

Hi all.I am getting a weird run time crash with some fbx file when build my app with vs2010 in debug mode. I upgrade the ImportScene sample to vs2010 and get the same error:

----------------------------------
debug assertion failed
file: ....\vs2010\vc\include\xstring Line:1441
Expression: string subscript out of range
-------------------------------------------

Call stack shows this error occur in the KFbxImporter::Import() funcion:
--------------------------------------
FBXReader.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator[](unsigned int _Off=13) Line 1441 + 0x14 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KString::operator[]() + 0x1c bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadProperties() + 0x16c0 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadPropertiesAndFlags() + 0xaa bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadKFbxNodeProperties() + 0x26 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadKFbxNode() + 0xbd bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadObject() + 0x187 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::ReadObjectSection() + 0x281 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::Read() + 0x58b bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxReaderFbx6::Read() + 0x70 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxImporter::ImportProcess() + 0xd3 bytes C++
FBXReader.exe!fbxsdk_2011_3_1::KFbxImporter::Import() + 0x32 bytes C++
--------------------------------------

Every things works fine under vs2008, so i guess maybe it’s a bug in vs2010 lib. I uploaded one of my test files which may cause this problem(a lizard model comes from a ms xna sample).
Thanks for any help!



Attachment Attachment
Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

Crashes for me too.

Looks like the same bug I sent in a little while ago:

FBXViewer.exe!fbxsdk_2011_3_1::KString::operator[]()  + 0x1c bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7Impl::ReadProperties()  + 0x10b9 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7Impl::ReadPropertiesAndFlags()  + 0xa1 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7Impl::ReadKFbxNode()  + 0x6e bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7Impl::ReadObject()  + 0x13f bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7Impl::ReadObjectSection()  + 0x3e0 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7::Read()  + 0x4f9 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxReaderFbx7::Read()  + 0xb8 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxImporter::ImportProcess()  + 0xd3 bytes C++
  
FBXViewer.exe!fbxsdk_2011_3_1::KFbxImporter::Import()  + 0x32 bytes C++

Here is the response:

Yes, I can reproduce it (only) on VS2010, which means it’s good on VS2005/2008. It seems FBX sdk hit an assert of xstring as bottom picture.

We have logged this issue in our bug-base(#373685). Our developers will investigate it as soon as possible. Thank you for your info.

Author: Doug Rogers

Replied: 05 December 2010 01:58 AM  
avatar
  • clayman s
  • Posted: 05 December 2010 03:48 AM

Thanks for your info Doug, good to know it’s a reported bug



Replies: 0
avatar
  • JoevdH
  • Posted: 02 May 2011 07:22 AM

Bump

This is still an issue in version 2012.1, although it seems less likely for files using format 7.1.0 or later.

Any ETA on a fix?



Replies: 0
avatar

Hi,

This issue is marked as fixed on our side, for FBX SDK version 2012. The file used was named “FailsToImport.fbx”. JoevdH, do you have a FBX file that illustrates this bug?

Viviane
Maya Data Platform
Autodesk



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

The lizard.fbx file attached to the OP still shows this issue.

Author: Doug Rogers

Replied: 02 May 2011 10:05 AM  
avatar
  • JoevdH
  • Posted: 02 May 2011 10:14 AM

I had problems with this file, using FBX file format 6.1.0



Replies: 1
/userdata/avatar/3yvwf23us_doug100x100.png

Need to attach as .zip file

Author: Doug Rogers

Replied: 02 May 2011 10:37 AM  
avatar

I’ll reopen the issue with the lizard file.
If you have additional files, we’ll add them to our bug database for testing.
I’ll keep you posted.

Viviane



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 0
avatar
  • JoevdH
  • Posted: 03 May 2011 02:21 AM

Here’s the file zipped.



Attachment Attachment
Replies: 2
/userdata/avatar/3yvwf23us_doug100x100.png

This model has the same issue for me, too.

Author: Doug Rogers

Replied: 03 May 2011 03:32 AM  
/userdata/avatar/u2gf7d23a_vrochon_small.jpg

Thank you for your file, I updated it to the bug database.

Author: Viviane.Rochon

Replied: 04 May 2011 06:51 AM  
avatar

Hi,

The issue is now fixed on our side, and the fix will be available in the next version of the FBX SDK.

FYI, the assertion is caused by VS2010 xstring to be more strict in its tests for the index of the operator []. Apparently, it is not allowed anymore to access the null character (backslash, zero) with a call like buff[index] where index = strlen(buff).

I don’t have an ETA for the next version, sorry.

Thanks

Viviane
Maya Data Platform
Autodesk



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 1
/img/forum/dark/default_avatar.png

Many thanks Viviane!  Looking forward to the new release.

- Joe

Author: JoevdH

Replied: 05 May 2011 07:41 AM