Lines go missing on Linux with tcmalloc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
We've got a product and have integrated the FBX SDK into it, we recently noticed that lines would go missing in certain cases. We've been able to narrow this down to attempting to read a file on Linux with tcmalloc enabled. This implies that there is a memory related bug in the SDK. We have been able to reproduce this issue by using the following C++ code and the latest SDK 2020.2.1
Without tcmalloc the expected results are:
$ ./fbxread testsuite/TestSuite/Tests/17000/17761/SourceDataset/lines.fbx
Node at position 0: Line001
fbxline->GetEndPointCount(): 1
fbxline->GetEndPointAt(0): 1
Node at position 1: Line002
fbxline->GetEndPointCount(): 1
fbxline->GetEndPointAt(0): 1
Node at position 2: Line003
fbxline->GetEndPointCount(): 3
fbxline->GetEndPointAt(0): 3
fbxline->GetEndPointAt(1): 7
fbxline->GetEndPointAt(2): 10
With tcmalloc, the bad results are:
This is pretty bad for us as the lines can go missing and cause data loss for our customers. We've had to disable FBX support on Linux until we can get this fixed as we don't want to silently corrupt customer data.
$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so ./fbxread testsuite/TestSuite/Tests/17000/17761/SourceDataset/lines.fbx
Node at position 0: Line001
fbxline->GetEndPointCount(): 1
fbxline->GetEndPointAt(0): 1
Node at position 1: Line002
fbxline->GetEndPointCount(): 0
Node at position 2: Line003
fbxline->GetEndPointCount(): 3
fbxline->GetEndPointAt(0): 3
fbxline->GetEndPointAt(1): 7
fbxline->GetEndPointAt(2): 10
Any help would be greatly appreciated!
Thanks,
Matthew
Link copied