![]() |
Difference between test and production?
I have this code that will print and email results of pings. On my test pc, it works great, but on the production pc, it prints/emails multiple lines of the errors. I've tried re-publishing it and re-installing it and it's the same each time. The only thing I've changed from the time it worked correctly to now is making the ping loop 4 times for each entry. I've gone through the code several times and I can't figure out why it work differently on 2 pcs.
:
The lines of code I've added are 12, 13, 25, 32, and 35-37, otherwise, the program is unchanged. Works correctly from the IDE but not from the exe. The weirdest thing about it is, sometimes it duplicates the message 3 or 4 times, sometimes as much as 15 times on the same entry. Each duplication is on a new line. Is it possible that it's not disposing the ping and just pinging the same server on the next round? Unfortunately I can't attach to the process because I'm using VB Express. |
Re: Difference between test and production?
If your program works during debug but not release, or on one machine but not another, it's usually a concurrency or timing issue. You've got multiple threads or processes vying for the same resources, or you're trying to do something too fast or too slow.
|
Re: Difference between test and production?
Thanks Narue, that gives me something to chew on lol. If my program is multi-threaded, it's not intentional, since I know pretty much jack about multi-threading.
Since I have a 2 second timeout on my pings, maybe I should put a 3 second timer on each ping. |
Re: Difference between test and production?
Changing the timers won't necessarily fix the problem. Often the problem lies in accessing a shared resource or accessing an object. Also, if your program has a graphical UI (which I'm guessing, since you have it repaint), it is almost certainly multi-threaded.
|
Re: Difference between test and production?
>maybe I should put a 3 second timer on each ping.
Only if you plan to use that for locating the source of the problem. Don't change a timer and expect the problem to be solved, that's like sweeping dirt under a rug. |
Re: Difference between test and production?
Well, I fixed the problem by moving the check for success into the IF statement. Now it only prints one instance of each error.
I still don't know why this caused the error. :
|
| All times are GMT -5. The time now is 6:13 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC