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 / Crash in KFbxGeometryConverter::ComputePolygonSmoothingFromEdgeSmoothing (from TriangulateInPlace)
  RSS 2.0 ATOM  
2 pages: 1.2 first

Crash in KFbxGeometryConverter::ComputePolygonSmoothingFromEdgeSmoothing (from TriangulateInPlace)
Rate this thread
 
42951
 
Permlink of this thread  
avatar

Hi Doug and Dario,
I don’t think it’s a defect of FBX SDK.
It is possibly related to macro _SECURE_SCL
Please add “_SECURE_SCL=0” to your project properties.
E.g. define it in Configuration Properties | C/C++ | Preprocessor.

Please let me know the result at your end. Thank you all.



Zhihao, Data Platform - Autodesk

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

That was it! Excellent detective work.

This particular define is for:
>unsafe iterator use causes a runtime error.

Does this mean that the SDK is using an unsafe iterator?
Why should it show up only in release mode?

Author: Doug Rogers

Replied: 19 May 2010 02:56 AM  
/userdata/avatar/c6y2tieph_fbx.png

Yes, _SECURE_SCL is set to 0 while we build the SDK. It will affect performance issues if set it to 1.

>>Why should it show up only in release mode?
It seems Visual Studio only open it at release mode.

Author: Zhihao.Li

Replied: 19 May 2010 07:05 PM  
avatar

ViewScene does not set the value _SECURE_SCL=0.  I wonder why it works in that example.
Strange, but nice to have it resolved.



Replies: 0
avatar
  • adario
  • Posted: 20 May 2010 01:34 PM

Zhihao.Li 19 May 2010 06:12 AM

Hi Doug and Dario,
I don’t think it’s a defect of FBX SDK.
It is possibly related to macro _SECURE_SCL
Please add “_SECURE_SCL=0” to your project properties.
E.g. define it in Configuration Properties | C/C++ | Preprocessor.

Please let me know the result at your end. Thank you all.

Zhihao,

Thanks a lot for your investigation—turning off _SECURE_SCL does indeed fix the crash.

I am in the process of switching TNG 3D to SDK 2011.2 but am finding some issues in keyframe animation (still using KFCurve objects, but only to extract their key times)—a few bones in some models (mainly from turbosquid.com) are not rotating properly for certain key times… I’ll report back when I’ve investigated the issue more thoroughly.

Thanks again,
Dario



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

I had to update and not use any deprecated functions to get it to work.

Author: Doug Rogers

Replied: 20 May 2010 02:10 PM  
/img/forum/dark/default_avatar.png

Hi Zhihao,

I got the same problem on linux 64bit debug fbxsdk2011.3 .

By debugging the code using valgrind I detected a memory corruption on function fbxsdk_2011_3::KFbxMesh::ComputeComponentMaps. 

Here the top of the stack:

==7247== Invalid write of size 4
==7247== at 0x54F554E:
fbxsdk_2011_3::KFbxMesh::ComputeComponentMaps(fbxsdk_2011_3::KFbxMesh::KFbxComponentMap&,
fbxsdk_2011_3::KFbxMesh::KFbxComponentMap&) (in
/usr/local/fbx_20113/lib/gcc4/libfbxsdk_20113_x64.so)
==7247== by 0x54C4190:
fbxsdk_2011_3::KFbxGeometryConverter::ComputePolygonSmoothingFromEdgeSmoothing(fbxsdk_2011_3::KFbxMesh*,
int) const (in /usr/local/fbx_20113/lib/gcc4/libfbxsdk_20113_x64.so)
==7247== by 0x54C5E22:
fbxsdk_2011_3::KFbxGeometryConverter::TriangulateMesh(fbxsdk_2011_3::KFbxMesh
const*) (in /usr/local/fbx_20113/lib/gcc4/libfbxsdk_20113_x64.so)
==7247== by 0x54C609B:
fbxsdk_2011_3::KFbxGeometryConverter::TriangulateInPlace(fbxsdk_2011_3::KFbxNode*)

My guess is that by turning off _SECURE_SCL on windows you are only hiding the problem but the corruption is still there. What do you think?

Thanks for your help,

Emiliano

Author: emilian0

Replied: 23 September 2010 12:44 PM  
/userdata/avatar/46bb5886n_car2.JPG

Hi Emiliano,
Could you tell us how to reproduce it and send us your test case?

Author: nian.wu

Replied: 28 September 2010 02:58 PM  
avatar
  • adario
  • Posted: 20 May 2010 02:44 PM

I am not using any deprecated functions after the update.  Also, I am extracting the key times from KFbxAnimCurve objects.

Thanks,
Dario



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

Can you post any of them that do not work (even by stripping them down to the problem bones)?

Author: Doug Rogers

Replied: 20 May 2010 02:55 PM  
/img/forum/dark/default_avatar.png

I’ve posted such a file in the “OpenGL Viewer for FBX files” thread.

Dario

Author: adario

Replied: 20 May 2010 03:36 PM  
avatar
  • adario
  • Posted: 21 May 2010 01:15 AM

I’ve attached a model that animates properly with 2010.0.2 but not with 2011.2—see the “OpenGL viewer for FBX files” thread for more details.

Ciao,
Dario



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

Any idea why this thread is getting bumped?

Author: Doug Rogers

Replied: 28 September 2010 04:12 PM  
/userdata/avatar/u2gf7d23a_vrochon_small.jpg

Because Emiliano has the same problem on linux 64bit debug fbxsdk2011.3 .  See a few posts up.

Author: Viviane.Rochon

Replied: 29 September 2010 06:14 AM  
avatar

I tested this file with the new 2011.3.1 release, and it now works correctly to triangulate. Please try it out and let us know! :)



Robert Goulet, FBX Dev Lead

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

Have you tested vincent_1.zip ...?

Author: adario

Replied: 30 September 2010 03:01 AM  
/img/forum/dark/default_avatar.png

Robert,

I’ve tested the vincent_1.zip in TNGViewer with 2011.3.1, and it appears to animate properly.
I’ll post notice in the related thread when an update is available.

Thanks,
Dario

Author: adario

Replied: 30 September 2010 11:27 AM  
2 pages: 1.2 first