11-11-2022 12:39 AM
Hi,
I'm using LabVIEW for a project where it needs to run for longer duration. But it is going to hang state if I run it for more than 3 days only. And I could see some color change in indicators. LabVIEW is receiving correct data. Also I need to close the application forcefully
how to get more information about the error.
Thank you,
Manasa.
11-11-2022 01:16 AM
It all depends on how you have architected and implemented your code, without that it is hard to guess the root cause. If you could share the source code, fellow LabVIEW experts will be able to share inputs on possible causes.
11-11-2022 06:10 AM
Isn't 3 days the time it takes to round a millisecond timer? Do you use Tick Counts(ms)?
11-11-2022 06:20 AM - edited 11-11-2022 06:21 AM
@Yamaeda wrote:
Isn't 3 days the time it takes to round a millisecond timer? Do you use Tick Counts(ms)?
No that is 49 days (if I did not calculate incorrectly)
My guess is that your are doing array operations in an ineffective way with ever increasing data. Look at the task manager to see if cpu or memory increases.
But we can only guess if we see no code. There are many ways to debug and find "hangs" and if someone has a list then that COULD be helpful but you will get much better help if you show us the code or at least give us some details. For example, what do you mean by "hang", what do you mean by indicators changing colors etc. What works, what does not work etc.
11-11-2022 11:18 AM
Yes, the millisecond timer is 49 days, or sometimes 25 if it's being coerced into an I32.
However, if I had to guess on this particular situation without seeing the code, I'd guess running out of references.
https://lavag.org/topic/18730-error-2-memory-is-full-but-it-isnt/?do=findComment&comment=112650
If you're doing something that opens a reference and uses it but doesn't close it afterwards, then on the 1,048,576th iteration, it will fail.
3 days is 259,200 seconds. 1,048,576 ÷ 259,200 = 4 and a bit. If you have a loop running 4 times a second, or 4 loops running 1 time a second, or a loop running once a second creating 4 references, or anything else like that each creating a new reference each time, then you could be running out of references.
11-11-2022 11:34 AM - edited 11-11-2022 11:46 AM
We need to see your code otherwise we can only guess what you're doing wrong
My guess is: A memory leak.
Do you have any strings or arrays in your code that are continuously growing?
Are you closing your references when you are through and not just opening more?
11-14-2022 12:20 AM
I have 'n' messages. In that some messages will get trigger if there is any value change and some will get trigger continuously, and some will be on request.
I have attached LabVIEW Gui for reference. In my case only pwrsrvcData4 (Refer Screenshot) message is receiving data after 3 days also but remaining all are not working. And in left corner i have start and stop buttons usually with that i can close my application but when issue occured im not able to close using buttons.
CPU and Memory usage is normal. Attached the snippets for that too.
11-14-2022 12:34 AM
@SudhaManasa wrote:
I have 'n' messages. In that some messages will get trigger if there is any value change and some will get trigger continuously, and some will be on request.
I have attached LabVIEW Gui for reference. In my case only pwrsrvcData4 (Refer Screenshot) message is receiving data after 3 days also but remaining all are not working. And in left corner i have start and stop buttons usually with that i can close my application but when issue occured im not able to close using buttons.
CPU and Memory usage is normal. Attached the snippets for that too.
Unfortunately, we cannot know your architecture implementation with the images and cannot look at nooks and crannies to narrow down bugs that could lead to memory issues.
These images tell the controls/indicators you've in your application.
11-14-2022 01:10 AM
Sharing the code is difficult because it is big. I'm Not sure on which part of code should i send. Or is there anything which i can look into
11-14-2022 01:32 AM
If you cannot share code: if you have DETT (Desktop Execution Trace Toolkit) you can see reference leaks: