Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Out-of-Memory Error When Iterating Over Large Point Clouds Using RCPointIterator in RealitySolutionsSDK_v24.0.1

mark.morrisonHBXQG
Explorer

Out-of-Memory Error When Iterating Over Large Point Clouds Using RCPointIterator in RealitySolutionsSDK_v24.0.1

mark.morrisonHBXQG
Explorer
Explorer
I am experiencing an out-of-memory error when using RealitySolutionsSDK_v24.0.1 to read an RCP file that contains unstructured scans of over 7 billion points. The issue occurs during point iteration using the RCPointIterator, even when running the sample code provided in the SDK documentation (RCPReaderSample).
 
Environment:
 
SDK Version: RealitySolutionsSDK_v24.0.1
Sample Code: RCPReaderSample from SDK examples
Operating System: Windows 10
 
Steps to Reproduce:
 
Load an RCP file containing unstructured scans with over 7 billion points using the RCPReaderSample code. Using the following code snippet to iterate over the points, I removed the write to file from the sample:
 
RCPointIteratorSettings settings;
settings.setDensity(pointDensity);
settings.setIsVisiblePointsOnly(visiblePointsOnly);
 
auto totalPoints = 0u;
auto pointIterator = project->createPointIterator(settings);
while (pointIterator->moveToNextPoint())
{
    totalPoints++;
}
 
Run the application and monitor memory usage.
 
Expected Behavior:
 
The application should efficiently iterate over all points without exhausting system memory, regardless of the point cloud size.
 
Actual Behavior:
 
The application continuously consumes memory during iteration until it eventually runs out of memory and crashes.
 
Additional Information:
 
The issue occurs even when using the sample code provided with the SDK, suggesting it is not specific to my implementation. The problem seems to be exacerbated with large, unstructured point clouds. No exceptions or error messages are provided before the crash; the application simply runs out of memory.
 
Any guidance on workarounds or fixes would be greatly appreciated.
 
0 Likes
Reply
119 Views
1 Reply
Reply (1)

zhaoyang_ma
Autodesk
Autodesk

Hi @mark.morrisonHBXQG,

 

Can you try to set the limit of memory to be used beforehand? You can refer to this API:

void RCProject::setSystemMemoryLimitInMB(std::uint64_t megaBytes);

 

Best regards! 

0 Likes