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 last

Crash in KFbxGeometryConverter::ComputePolygonSmoothingFromEdgeSmoothing (from TriangulateInPlace)
Rate this thread
 
42951
 
Permlink of this thread  
avatar
  • Total Posts: 585
  • Joined: 18 February 2008 07:25 PM

In release mode, I am getting a crash in the above function.  Debug mode is fine.  Here is the trace.

FBXViewer.exe!std::vector<int,std::allocator<int> >::_Ufill(int _Ptr=0x0a3a0020unsigned int _Count=1563420, const int _Val=)  Line 1254 0x16 bytes C++
  
FBXViewer.exe!std::vector<int,std::allocator<int> >::_Insert_n(std::_Vector_const_iterator<int,std::allocator<int> > _Where=..., unsigned int _Count=1563420, const int _Val=)  Line 1181 C++
FBXViewer.exe!fbxsdk_2011_2::KFbxGeometryConverter::ComputePolygonSmoothingFromEdgeSmoothing()  0x2c2 bytes C++
  
FBXViewer.exe!malloc(unsigned int size=163921784)  Line 163 0x5f bytes C
  FBXViewer
.exe!fbxsdk_2011_2::KBaseArray<fbxsdk_2011_2::KBaseArraySizeType<int> >::InsertAt()  0x9d bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KArrayTemplate<int>::operator=()  0x63 bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KmAtoVR()  0x19e bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KmAtoVS()  0xc bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KFbxConnectionPoint::SubConnectFind()  0x45 bytes C++
  
kernel32.dll!75be3f01()  
  [Frames below may be incorrect 
and/or missingno symbols loaded for kernel32.dll] 
  FBXViewer
.exe!free(void pBlock=0x003c3180)  Line 110 C
  FBXViewer
.exe!fbxsdk_2011_2::KFbxQuery::Unref()  0x18 bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KFbxProperty::GetSrcObject()  0x85 bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KFbxNode::GetNodeAttribute()  0x4c bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KFbxNode::GetGeometry()  0x1b bytes C++
  
FBXViewer.exe!fbxsdk_2011_2::KFbxNode::GetMesh()  0x1f bytes C++

If you want to repro this: Build my FBXViewer and load in the dude.fbx file from DirectX in release mode.



Attachment Attachment
Replies: 0
avatar

I traced the crash to the TriangulateInPlace call:

KFbxGeometryConverter geometryConverter(m_SdkManager.get())
 geometryConverter
.TriangulateInPlace(pNode)


Replies: 0
avatar
  • adario
  • Posted: 07 May 2010 11:16 AM

Doug,

I have the same exact problem—same crash, same location, same test file. Unfortunately, this file works just fine in the ViewScene example—but that code is not using triangulation if memory serves.

Furthermore, I am fairly confident that the crash does not have anything to do with linking to DirectX: it happens in my viewer when I use the OpenGL renderer as well.  In my case too the crash is limited to release builds: debug builds are just fine.  Furthermore, I can confirm the problem does not affect Mac OS X builds—only Windows builds have problems, and only release ones.

The real shame is that someone from the FBX team recently said that the next SDK version won’t be released for several months yet… this is truly devastating since I will not be touching version 2011.x until a fix is released for this absolutely crucial feature of the SDK—I understand not everybody cares about triangles, but still… FBX is widely used in real-time environments, where only triangles matter.  Some attention to triangulation should be implied.

No comment,
Dario



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

I agree this should be considered a critical update.  It should be easy to modify the ViewScene app to repro this.  I can make this modification to ViewScene if it will help get this fixed.

A few months delay is not a good option for crash bugs.

Author: Doug Rogers

Replied: 07 May 2010 02:58 PM  
avatar
  • adario
  • Posted: 08 May 2010 10:41 AM

Doug,

Unfortunately I have already sprayed TriangulateInPlace all over ViewScene, and it does not crash.  That’s the main reason why I had not reported the problem yet: when I crash my own application, I start by assuming it’s my fault.

Not to be nitpicking, but… I used to work in the R&D dept of a (truly) large network equipment vendor.  This kind of bug was never classified just as a ”crash”.  Our defect tracking system had a specific qualifier for this sort of issue: S7 = showstopper.
S7 was the highest severity available in the system.  It implied receiving calls from your boss on your mobile at seven o’clock on Saturday morning, and getting the first train to the lab.  The only perk was free cafeteria access.

Ciao,
Dario



Replies: 0
avatar

Hi,

I tested importing and converting your file “dude.fbx” with the 2011.2 FBX SDK and I do not get a crash in ComputePolygonSmoothingFromEdgeSmoothing(), nor in TriangulateInPlace(). Neither in Debug, nor in Release modes.

However, we did correct a crash internally in KFbxGeometryConverter::EmulateNormalsByPolygonVertex(). This function crashes when used on skinned meshes, which is the case with file “dude.fbx”. It would be better to avoid using it until the next release.

Custom builds, including bug fixes and custom development, are available for clients that need it. If you are interested in a custom version of the FBX SDK, I invite you to visit the Custom Development Center page.

Regards,

Viviane



Viviane Rochon
Maya Data Platform
Autodesk

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

You can repro the crash by downloading my viewer source and loading the dude.fbx file.

Author: Doug Rogers

Replied: 10 May 2010 01:33 PM  
/img/forum/dark/default_avatar.png

Viviane,

Could you please try what Doug suggested...?  It only takes a few minutes, and you will see that the crash does indeed start from TriangulateInPlace.  Once again, I do not believe the crash is caused by application code.

Thanks,
Dario

Author: adario

Replied: 11 May 2010 02:56 PM  
avatar

Sure, we will take a look into this.

Viviane



Viviane Rochon
Maya Data Platform
Autodesk

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

Project is here:
http://code.google.com/p/fbxviewer/

Let me know if you have any issues.

Author: Doug Rogers

Replied: 12 May 2010 01:10 PM  
avatar
  • adario
  • Posted: 13 May 2010 11:03 AM

Viviane,

I think Doug should be thanked for this report—with his code it is extremely easy to reproduce the error, but as we said you have to build a release application: things are fine in debug mode.

Thanks,
Dario



Replies: 0
avatar
  • adario
  • Posted: 17 May 2010 02:24 AM

Viviane,

Have you tried Doug’s excellent project...?

Thanks,
Dario



Replies: 0
avatar

Hi Doug and Dario,
Thank you for your info first. I tested the problem with Doug’s project yesterday. Yes, I can reproduce the problem. It did crash at release mode with SDK2011.2.
Meanwhile, I tried TriangulateInPlace and ComputePolygonSmoothingFromEdgeSmoothing in 2011.2 SDK sample. Same with Viviane’s result,I can NOT reproduce it in either release or debug mode.

Since the problem could only be reproduced in release mode:( It will take me a while or more time to find the cause. I’ll continue my investigation and let you know the result.

By the way, Doug, you said that you can reproduce the problem with ViewScene sample. Is it true?
Could you please attach some sample code? Thank you.



Zhihao, Data Platform - Autodesk

Replies: 0
avatar

Zhihao.Li 17 May 2010 09:13 PM

By the way, Doug, you said that you can reproduce the problem with ViewScene sample. Is it true?
Could you please attach some sample code? Thank you.

No, I could not repro this with ViewScene.  I thought that it could be done by modifying the source, but this is not the case.



Replies: 0
avatar
  • adario
  • Posted: 18 May 2010 02:26 AM

Zhihao.Li 17 May 2010 09:13 PM

Hi Doug and Dario,
Thank you for your info first. I tested the problem with Doug’s project yesterday. Yes, I can reproduce the problem. It did crash at release mode with SDK2011.2.
Meanwhile, I tried TriangulateInPlace and ComputePolygonSmoothingFromEdgeSmoothing in 2011.2 SDK sample. Same with Viviane’s result,I can NOT reproduce it in either release or debug mode.

Since the problem could only be reproduced in release mode:( It will take me a while or more time to find the cause. I’ll continue my investigation and let you know the result.

By the way, Doug, you said that you can reproduce the problem with ViewScene sample. Is it true?
Could you please attach some sample code? Thank you.

Zhihao,

Thanks for your interest in this issue.  This bug is preventing us from updating TNGViewer to the 2011.2 SDK, which has disappointed several of our users so far…

As Doug said, reproducing the issue is sadly not feasible with the ViewScene sample code; as I said, I’ve tried to sprinkle the sample code liberally with TriangulateInPlace, and it does not crash.  That is the main reason why I was initially unwilling to report the problem.

However, since the issue occurs in the same exact conditions with two very different applications (Doug’s and mine), it is clear that the problem does lie in the 2011.2 SDK itself.

Thanks,
Dario



Replies: 0
2 pages: 1.2 last