models and custom gp tools behaving oddly

Discussion created by zconlen on Oct 6, 2012
I'm experiencing some very strange behavior with models and custom tools I have created. Everything was working as expected. Then one day I logged on and tried to run a tool which executes a python script. I noticed that the progress dialog was not shown and arccatalog was frozen. Eventually, I killed the arccatalog process with task mngr. The tool had executed successfully in less than a minute, but arccatalog was completely frozen (same results in arcmap). This appears to affect all of the scripts and models I have created.

In troubleshooting the issue, I have discovered the following:
-In Arccatalog gp options, "Background Processing" was enabled. I think this is not default (this is a shared computer so a colleague may have changed settings). I disabled background processing and re-ran the script. Same behaviour, but in this case the script did not execute successfully. It hung up part way through (as I discovered by checking log file). Again arccatalog frozen.
-I next looked at the tool properties and changed a couple settings. I toggled on the "Show command window when executing script" and I toggled off the "Run python script in progress" option. Re-ran tool and this time command window shows up and I see messaging but again part way through it hangs up and stops running, forcing me to kill process again.
-Next I toggled off the setting "Always run in foregroud" for tool properties, and enabled background processing in gp options, and re-ran tool. This time it executed successfully, I got messages in the command window dialog and in the bottom task bar. After the tool finished, arccatalog was responsive again. Yes!

So, in summary, I can get models and scripts to run successfully only if background processing is enabled, and if the script tool parameters are set to "show command window...." true and "Always run in foreground" to false. This is a work-around but kind of clunky and I guess I just would like to understand what's going on here. What changed?

Running version 10, sp 5 on windows 7.

Thanks for any assistance.