08-27-2021 11:21 AM
Within our in house test exec built on LabWindows/CVI 2017 and TestStand 2019, we are having difficulty locating what seems to be a very elusive out of memory issue (-12) occurring when inserting a new row into a table control during runtime at ~1800-3700 table results which fluctuates each run.
Current system/program specs being used are Windows 7 w/ 24GB of available RAM. Applications are currently and can only be 32-bit.
The following things have been tried without success:
1) Monitor GDI object usage per https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019No1SAE&l=en-US. GDI handles did not exceed 1625 during run, no where near the default max of 10,000 handles.
2) System 3GB ram tuning increase (bcdedit IncreaseUserVA) as well as enabling NI's large address aware flag field.
3) Increasing program stack allocation size from 4KB to 8KB and then to 32KB.
4) Monitoring program working set memory usage which has consistently been under 720MB, no where near the 3GB limit with large address aware flag enabled and 2GB without.
Things to consider:
1) We have consistently ran this executive in simulated mode detached from the test application layer and can reach ~170K-200K result inserts before producing the -12 error.
2) Running exec w/ test application in simulated mode finishes no problem without -12 error.
3) This behavior is only exhibited when running a specific large data point cycle sequence in non simulated mode w/ product hooked up and has not been exhibited on any other test applications.
We are currently testing out pre-allocating a larger block of table rows to the table control for the duration of the test to eliminate any sort of table row reallocation that may occur at runtime that could be speculatively causing this issue.
Let me know if there is any additional information to provide that I might have missed, we are unfortunately unable to provide source code however can provide debug/memory profile information upon request. Any help pointing us into a direction that hasn't been tried would be much appreciated.
Best regards.