11-10-2021 01:34 AM
Hello,
I use LabVIEW2018 for software development, compile it into a exe file and run it continuously on Win10 for a long time.
But I encountered a strange phenomenon, after a certain period of time, the software will be closed, open the work manager to check, but I do not see the software is running, and there is no error message.
It seems to be forced to shut down for unknown reasons.
Has anyone encountered a similar situation and resolved it successfully?
Thanks.
11-10-2021 02:12 AM
This is way too generic to help. What is a long time? What is a certain period? Did you check whether the program's behaviour degrades with time (ever increasing memory allocation? slowing down?). What does the program? Can you share the code?
11-10-2021 03:10 AM
The strange thing is that this phenomenon is not cyclical.
Sometimes it happens after two weeks of continuous operation, sometimes it happens after one day of operation.
The CPU and memory usage does not increase significantly. I can't share the code because of business reasons.
The software is mainly used for MFC control. This software has been developed for several years and this is the first time I encountered this phenomenon.
Because I can't watch the software running 24 hours a day, I don't see the moment when the software is closed for unknown reasons.
This software also has a mechanism to shut down the computer when the software is closed. That's why I think the software be forcibly shut down instead of being shut down by normal procedures.
The computer did not reboot either because we opened the device manager before opening the software. The device manager was still open after the software was forcibly shut down.
There are no "has stopped working" dialog box, error messages or error codes.
11-10-2021 03:15 AM - edited 11-10-2021 03:22 AM
So you control MFCs? How? This sounds like a typical case of someone somewhere violating your process integrity.
The by far highest chance as candidate for something like this are DLL calls. And here especially DLL calls that you created yourself or got from someone who knows enough of LabVIEW to be dangerous but hasn't learned yet that they can be very dangerous. That includes many hardware manufacturers who have a LabVIEW library for their product. Often those libraries are created by someone who has barely enough LabVIEW expertise to create this library, and once they seemingly work without crashing right away, they are thrown over the cubicle wall to the support people to give to anyone "crazy" enough to ask for LabVIEW support for their hardware. After a year that guy who wrote it has gone and nobody knows anything about this anymore except the name LabVIEW.
Have you checked the Windows Event log for any messages related to your app, or some software your app calls?
11-10-2021 03:26 AM
Add logging functionality to your program. I mean, log into a text file whatever the program is doing.
This will allow you to locate the offending code. Start with a broad investigation, then refine details as you narrow down.
11-10-2021 06:15 AM
We did not call the DLL file, and the computer just our software running.
I checked the Windows Event log and then I saw an error message, NI System Web Server Service terminated unexpectedly.(7034)
Is this related to an unexpected software shutdown?
11-10-2021 06:44 AM
@Weeeeeeee ha scritto:
We did not call the DLL file, and the computer just our software running.
I checked the Windows Event log and then I saw an error message, NI System Web Server Service terminated unexpectedly.(7034)
Is this related to an unexpected software shutdown?
How could we know? You don't post your code, nor you gave a detailed description of the program.
You will need to find it yourself.
11-12-2021 10:20 AM
@Weeeeeeee wrote:
We did not call the DLL file, and the computer just our software running.
I checked the Windows Event log and then I saw an error message, NI System Web Server Service terminated unexpectedly.(7034)
Is this related to an unexpected software shutdown?
Well are you using LabVIEW WebServices? Why would the Web Server Service be running otherwise on your computer?
The error message clearly states that the abort was unexpected, but unless you have something running in your LabVIEW application that explicitly interfaces with the Web Server it should be not the cause of your LabVIEW crash.