Ok, I have a couple of script that I wrote that are performing very strange. At times, when the submit form is being processed, the script will hang and fail and return the user an error that they put invalid input even though they did not. Other times, the script will process all the way through without hanging and perform it's needed functions. So the script does work, but more times than none, I get the hanging instance and since the results are inconsistent, I don't know where to debug from if the script suddenly just works when it wants to. asked 08 Jul '12, 18:13 carla123 |
The way to debug this is to record the state of your script for each run, at multiple points during the script. It's entirely possible that you are triggering some form of race condition.
Try to get many samples of the internal state for both successful and unsuccessful runs. You should then be able to see a pattern of where the state fails, and then narrow down to which function call is introducing the inconsistency.
Hope that helps!