12-24-2017 06:26 AM
Hi,
I have installed a LabVIEW based Application in my clients machine running Windows 7 & Office 2007.The application is supposed to send a emailed Excel report every hour , 24 hours a day.
Mysteriously , after sending the report at 3:00 AM the application is closing down by itself.
This has happened for two consecutive days.
Is this some kind of virus or a bug in the software?
Is there any feature in labview by means of which a housekeeping VI can restart the main VI in case it has stopped working?
Thanks & Merry Christmas.
Solved! Go to Solution.
12-24-2017 07:51 AM
You could always eliminate the mystery by adding logging and error handling to your application.
That way, it'll tell you why it's shutting down.
Can you write the service to start it back up? Sure. But, that's really putting a bandaide on the situation rather than addressing the root cause.
12-24-2017 11:02 AM
shantanu@india wrote:
Is this some kind of virus or a bug in the software?
Since we have no idea about the program you've written, your experience in LabVIEW, or your computer environment (except that you are using the previous, previous, previous version of Microsoft Office), I would "guess" (and put a probability of 90% that I'm right, but that's another guess) that it is "a bug in your code" (and not in LabVIEW, Windows, or Office 2007).
I hope this completely answers your question. If you would like to ask a different question, such as "I assume that there's a bug in my LabVIEW code -- could someone help me find and correct it?", then you should begin by gathering your code together (if you developed it in the context of a LabVIEW Project, then compress the folder containing the Project file and the LabVIEW files associated with the Project into a single ZIP file) and attach the file (or files) to your response. We can then look at your code, figure out which version of LabVIEW you are using (you don't say), test various pieces, and perhaps find the source of the problem.
One last thing I just noticed -- you say you installed this on your client's machine. Is the Development machine and the Client machine running similar software? What version of Windows 7? 32-bit or 64-bit? What version of Office (both machines running Office 2007, 32-bit or 64-bit)? Does the Client machine have the proper LabVIEW Run-Time installed?
Bob Schor
12-25-2017 12:41 AM
Thanks Bob & sorry for the inadequate information in my last post.
This is a data acquisition system (VI attached) for a pipe weighing system.
The software was running perfectly fine in my development Laptop running Windows 8.1 & Office 2016.
The report generation & auto emailing features were all OK.
When I built the installer for the clients machine that was running Windows 7 & Office 2007 , the application started crashing as soon as the 'GENERATE REPORT' button was being clicked.
I contacted NI & they apologized about the incompatibility of the report generation toolkit with all the versions of MS Office & mailed me some links where the compatibility issues have been discussed.
Here are the links:
http://digital.ni.com/public.nsf/allkb/C9408B9F08D711E786256F3300701D01
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAmLSAW
To tide over the problem I had no other option but to uninstall Office 2016 from my Laptop & install the earlier Office 2007. Next I uninstalled report generation toolkit & reinstalled it once again so that it could choose the correct dll files for the fresh installer.
The fresh installation is working fine in the clients machine apart from the auto-close-down mystery which is yet to be resolved.
BTW....I am using LabVIEW 2015 & Report generation toolkit 2015.
12-25-2017 12:58 AM
It can even be something lame & innocuous like an computer auto-restart triggered by a Windows update or antivirus update.
I shall have to check & put the exe file in start-up folder , if required.
12-25-2017 03:42 AM
shantanu@india wrote:
It can even be something lame & innocuous like an computer auto-restart triggered by a Windows update or antivirus update.
I shall have to check & put the exe file in start-up folder , if required.
First thing to check and fix. Disable Windows auto update, and set it to "only notification", so the user can decide when it is done and when Windows is restarted. Same for the virus cleaner.
Besides, do what was suggested before: program a proper error handling/reporting in your app. And also check the Windows crash reports, whether Windows or your app is the source of the problem (Google for "Windows crash history" or something similar, there are built in features for that).
12-25-2017 08:09 AM
There have been reports here in the Forum about changes Microsoft made to Office 2016 and Excel that "break" the RGT (though I believe a work-around is also discussed). Still, you are safer with Office 2013 ...
Bob Schor
12-26-2017 01:17 PM
Windows 10 will still restart your computer even with auto updates disabled. Turning that off will only delay the updates or I think critical fixes will just happen. As far as I know there are only two ways to reliably run a program for long periods on Windows 10 - disconnect the computer from the Internet (with kills the e-mail portion of your program obviously) or buy a Long-term branch version of Windows 10 which I think requires a specific license to even buy it. Guessing that the problem happens around 3:00 AM and Windows 10 will usually update around that time I would guess this is your problem.
12-26-2017 03:07 PM
If you look in Windows 10 Settings for Updates & Security, you can "tweak" the settings somewhat, including putting Updates off for some period (though it might not be possible to push this more than a few days without doing something like "disconnecting from the Network so my machine can't look for Microsoft, and Microsoft can't find my machine".
If you do need a multi-day monitoring system based on a Windows PC, this might be a good question to pose on a Microsoft Forum somewhere ...
Bob Schor
12-26-2017 03:19 PM
Bob is most likely right. When I installed Windows 7 many moons ago, I believe the default is 3:00 AM. However, Windows 10 doesn't have that feature and recommends disabling looking for updates via the Windows Service. Try this. Go about halfway down this article to find the answer.
http://www.thewindowsclub.com/turn-off-windows-update-in-windows-10