JohnOh 0 Posted March 7, 2021 I have a strange problem and I am stuck on how to solve it. My application that has been running fine on windows 7 (embedded) for years is now randomly stopping (being killed) on a windows 10 pc it look likes it is being killed, as if it was closed correctly it would log the events but all I get in my log is a "UDP disconnect message" (I am using UDP ports for the application to communicate with each other and Moxa Nports). There is nothing in the windows events logs It is not crashing as I am using MADexcept and I don't get any error files. It also only stops after 3 days almost to the minute of the start time. I have it running on the several same spec pc's and not all of them fail, the PC's are not connected to the internet but on their own private LAN. I got my customer to installed Gflags on the PC that had the most problem to try and find out what maybe killing my application, but so far that pc has not stopped but another one did. so I need a solution. If anyone has any ideas of what might be causing it or how best to find the problem I would be grateful. Thanks. Share this post Link to post
Guest Posted March 7, 2021 (edited) with Win10 build 20H2 and Kaspersky IS 2021 I had problem similar... all apps not MS was closed in 3seconds later load... no error, no msg... just it was killed!!! in build 2004, same apps (installations etc...) the apps works good. In my case, it looks like it was the software GPT Tweaker II by Asus installed because i have GTX1650 NVidia. then, maybe you can try in a VM or another pc with same MSWin 10 + your App with minimum changes on system (none beyond necessary and if possible in Security Mode) and verify the Firewall / (Smart)Defender by MSwindows. hug Edited March 7, 2021 by Guest Share this post Link to post
Guest Posted March 8, 2021 12 hours ago, JohnOh said: It is not crashing as I am using MADexcept and I don't get any error files. Do not take this for granted. Processes can go "pop" into the void. Race conditions, stack overflow and memory corruption. Is it a Windows Process or an Application? Of course you know what to do. Add more logs, compare logs, identify common operations before the error... Re-visit all timer based processes and so on. Re-visit all threaded processes/events. And so on... and so forth. Good luck! Having been in this situation, i have the full sympathy. Contrary to many people beliefs it it not always one owns fault 🙂 [in theoretical extension it always is, though] /D Share this post Link to post
Guest Posted March 8, 2021 Also turn on I/O checking, Overflow checking and Range checking. Errors may occur that did not before. Share this post Link to post
Virgo 18 Posted March 8, 2021 The reason I asked about how the program is started, that when it is started with Task Scheduler (sometimes programs use Task Scheduler to start program at user login) then there is check mark at trigger properties "Stop task if it runs longer than:" which defaults to 3 days. Maybe it is accidentally checked (it is not checked by default). Share this post Link to post
JohnOh 0 Posted March 8, 2021 Virgo I think you could be right, I have just found out that SVChost.exe terminated our application with code 1067 and sure enough the "Stop task if it runs longer than:" was checked. (it is not checked by default - maybe that has changed I didn't personally create the task but its not something we would check). Our task scheduler runs our application on startup - so I can understand why if it was started via the task schedule it would stop after 3 day but I would assume if it was started directly from windows explorer the it would not be stopped but maybe it is. Anyway looks like we have a solution Thanks to you all for posting :) John. Share this post Link to post
Virgo 18 Posted March 8, 2021 If application needs to be run at computer startup and even when user is not logged in, then I would suggest creating Windows service. Share this post Link to post
aehimself 396 Posted March 8, 2021 I had this when I had a bug (memory corruption to be exact) in my logging mechanism. The program tried to log it's issue but crashed beforehand. Also, if you use 32 bit processes and your log file grows above 2 GB that can cause your executable to halt. Share this post Link to post