Problem with .net app just closing
I recently wrote a vb.net app that packs,blazes, and backups summation cases automatically.
It works great if you run it in the daytime. If you run it at night, it just dies. I checked with the clients network team, and the don't know what's causing this.
I know their server is rebooted at 3:00am at night, but my program seems to die at 1:00am. I decided to place all the code inside a big try catch around all the code, but no errors were logged. I've also checked the windows event logs and found nothing.
Is there a way to tell who or what is killing my program? Let me know if I should provide more info? Do I need to write a nanny program to monitor it?
Re: Problem with .net app just closing
Is this an app or a service? You may want to see if you can convert it into a service so that it is running all the time. If it is an app, are you using threading perhaps? In my experiences this usually happens when trying to use threads, and when not coded properly, the threads could exit unexpectedly and cause the program to shut down for some reason.
Re: Problem with .net app just closing
1- Just throw a couple of break-points in suspected places and trace the values.
2- Look for Try Catch with Application.Exit inside the catch block.
3- Remove Try catch blocks that contain large fragments of the code
Re: Problem with .net app just closing
It might sound stupid but one time i had this happen to me
and i had an exit sub in an if statment get changed to just exit
Re: Problem with .net app just closing
Part of my problem has been fixed by...
replacing.....
VB Code:
Shell("SumAgent.exe " & firstCIpathinList)
with.....
VB Code:
System.Diagnostics.Process.Start("SumAgent.exe", firstCIpathinList)
Not sure why, but when using the shell function I would get a message as follows....
DDE Server Window: sw32.exe - Application Error
The instruction at "0x00000000" referenced at memory at "0x00000000". The memory could not be "read." Click on OK to terminate the program
This takes care of one of my burdens.