LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is causing error 50202

Brad,

 

Thanks.

 

I am using DAQmx 9.3.

 

I am seeing paged kernel memory increase, but I have not monitored process committ charge yet.

 

I will try starting tasks outside the loop.

0 Kudos
Message 21 of 32
(1,534 Views)

DAQmx 9.3 should have the autostart bug fixed so that should not be the issue (fixed in 9.1)  However, the DAQmx state diagram may be leaking just a bit from what you are stating.  Definatly call the "control task" from the DAQmx advanced palatte and see if starting the loop with the task expressly "reserved" changes things at all.

 

In this thread Sean exposed some of the underlying fundamentals of the DAQmx State machine.  Let us know if this stabilizes your system- if it does I'm sure R&D will get into it and re-debug the driver


"Should be" isn't "Is" -Jay
0 Kudos
Message 22 of 32
(1,519 Views)

Update:

 

I changed deployment PCs last Friday and the test has run without failure since then.  So I have not yet made any further changes that you've mentioned.

 

However, this machine has more memory and it may be simply taking longer to exhibit the same issue.

 

Thanks for the link to the DAQmx state machine discussion.  I will plan to make some of these modifications if/when the error returns.

0 Kudos
Message 23 of 32
(1,517 Views)

Continues to run without error.  Thanks to all who have posted.

0 Kudos
Message 24 of 32
(1,503 Views)

Update: Error has returned on new PC.

 

Since I last posted, I have had 2 instances of the program crashing on the latest PC.  The time to failure has increased substantially on this PC, but nontheless remains.  The first failure occurred after 10 days running,  The 2nd error occurred after 8 days running.

 

I grabbed the displayed error after the 2nd failure:

 

Error -50352 occurred at Low Cost Keypad Test.vi

      Possible Reason(s):

      NI Platform Services: The requested memory could not be allocated.

      Task Name: _unnamedTask<0>

 

I then ran task manager and grabbed the following from the performance tab.

      Physical Memory Total (MB)    : 2006

      Physical Memory Cached (MB)   :  848

      Physical Memory Available (MB):  846

      Physical Memory Free (MB)     :   20

 

      Kernel Memory Paged (MB)   : 977

      Kernel Memory NonPaged (MB): 546

 

      System Handles: 20673

      System Threads: 820

      System Processes: 78

      System Up Time: 8:05:41:35

      System Committ (MB): 2235/4012

 

After rebooting and restarting,  grabbed the same data:

      Physical Memory Total (MB)    : 2006

      Physical Memory Cached (MB)   :  359

      Physical Memory Available (MB): 1328

      Physical Memory Free (MB)     : 1063

 

      Kernel Memory Paged (MB)   :  79

      Kernel Memory NonPaged (MB):  45

 

      System Handles: 19371

      System Threads: 922

      System Processes: 82

      System Up Time: 0:00:04:20

      System Commit (MB):  799/4012

 

I believe I still have a declining resource problem.

0 Kudos
Message 25 of 32
(1,484 Views)

Rick, 

 

You can find some possible solutions here. I would also recommend upgrading to DAQmx 9.4, the latest version. 

 

Also, Brad previously asked for some information:

 

"Also, you mentioned "available memory". In operating systems that have virtual memory, available memory is wasted memory, so this isn't a reliable indicator of a memory leak. Instead, I recommend periodically writing down the following statistics (or using PerfMon to record them) so that you can trend them over time:

  • System commit charge
  • Paged kernel memory
  • Nonpaged kernel memory
  • Process commit charge for your application process
  • System handles/threads (probably less important for this situation)"

Were you able to do this? Could you please post your findings?

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 26 of 32
(1,467 Views)

Hi Rick,

 

Thanks for posting the numbers from Task Manager. That definitely looks like a memory leak.

 

Also, I can confirm that with DAQmx 9.4, there is a small memory leak (48 bytes) every time a cDAQ task is uncommitted. This has been reported to R&D as CAR #327313 and it is due to be fixed in the next release of NI-DAQmx. In the meantime, starting your tasks outside the loop should significantly limit the effect of this memory leak.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 27 of 32
(1,444 Views)

Thanks to all.  I will post my findings as soon as I can return to working on this project.

0 Kudos
Message 28 of 32
(1,439 Views)

Hi Rick, 

 

I was wondering if you were able to get back on this project. We are seeing a similar issue and I was wondering if you found the root of the problem in yours. In the mean time, we will try some of the things NI R&D mentioned in this post.

 

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 29 of 32
(1,315 Views)

Fab,

 

I did return to this project and the problem was resolved.  I have incorporated many suggetions from this thread, but I believe the most significant one was to create the task, and then start the task explicitly, outside the loop.

 

I hope it works as well for you.

 

Rick

0 Kudos
Message 30 of 32
(1,304 Views)