10-16-2025 09:03 AM - edited 10-16-2025 09:41 AM
I have discovered that LabVIEW 2025Q3 has a .NET memory leak. It doesn't matter which method you call from any class, a few kilobytes are lost every time. When large amounts of data are transferred during the method call, it happens faster, but the underlying problem remains.
I tried explicitly calling the garbage collector in .NET, but that didn't help. Within a few minutes, the memory in LV2025Q3 32-bit fills up and an error message (Memory full) appears.
=> Memory leak of approximately 4.2 kB per call (current example)
I borrowed the example from a forum member who demonstrates the problem using a very simple example. (https://forums.ni.com/t5/LabVIEW/net-8-labview-2025/m-p/4433787)
a few minutes later.....
Is there a workaround, or will NI consider this a bug?
=> I did not observe the same behaviour with .NET Framework....
Claude
10-23-2025 12:42 AM
Any ideas or similar experiences? It seems as if no one is using .NET Core?
10-23-2025 04:36 AM
What happens if you send the .NET reference through a shift register? I had a similar experience with an ActiveX program where too many calls caused a crash. In that case reusing the reference reduced the issues.
10-23-2025 08:20 AM
Yes, that leads to the same problem. I have tried almost everything in the real application. This is just a simple demonstrator that is reduced to the essentials.
10-23-2025 03:11 PM
I think this is pretty concerning. 4 kB per call could definitely add up quickly.
10-24-2025 01:08 AM - edited 10-24-2025 01:09 AM
I have also submitted a service request to NI. NI is currently working on this issue and the support has now forwarded it to R&D. Hopefully, the fix will be added in Patch3!
11-06-2025 09:47 AM
I just received the following message from NI:
******
I’ve just received an update from our R&D team, and they have confirmed that this is indeed a bug. The team has started working on a fix; however, they were unable to provide a timeline for its release at this stage.
In the meantime, the recommended workaround is to downgrade to LabVIEW 2025 Q1, which avoids the .NET memory leak. We have tested the same code on LabVIEW 2025 Q1 and can confirm that the issue does not occur in that version.
******
Unfortunately, that's not an option for me, as we use .NET callbacks... I'm really disappointed and hope we find a solution soon!
The current state of the .NET implementation is not usable for a productive system!
11-06-2025 10:30 AM
That's... a terrible workaround. The .NET core implementation in 2025 Q1 was REALLY bad, essentially unusable for all but the simplest of examples (even now there are quite a few issues -- See this thread: https://forums.ni.com/t5/LabVIEW/State-of-Net-Core-in-2025Q3-Bugs-and-Errors/m-p/4454466)
Does this memory leak affect BOTH .NET Framework & Core in Q3? or just Core?
11-07-2025 06:06 AM
"Does this memory leak affect BOTH .NET Framework & Core in Q3? or just Core?"
The problem only occurs in .NET Core.
11-07-2025 10:32 AM
If that's the case, then I think the suggestion to go back to 2025 Q1 is really... weird advice since the .NET Core support there is barely half baked. 😞
I'm glad they identified it as a bug, but this is pretty limiting... would be nice to see a fix relatively quickly here.