I will sometimes have corrupt values of grid3D. Most of the time, grid3D contains 'd3D' if just type grid3D on the command line. A few times it will contain pure garbage characters. I am not sure if this is at all related to previous app issues, though.

Also, having NumSetup() call a function (i.e. keep NumSetup at a bare minimum in size) does not seem to help.