Hi Michael;
If the App EXE runs OK via using the /PBDebug option, then the probable cause is a "timing" issue in your App's code. This is also reminiscent of an App working OK under the the control of the IDE's debugger but will behave differently (or crash) when executed from the IDE's Run icon.
In both cases, a compiled App will execute much faster than when debugging or tracing is enabled. This can lead to sections of PowerScript code running faster than anticipated and trying to to process datum, variables, objects, etc that are not yet ready. This also pertains to events that can fire faster or in a slightly different order than originally expected in an EXE vs when in debug/trace mode.
In the above cases,, the problem normally stems from
- Apps that reply on the above situations in the Open or Constructor events
- App code that does not check for valid situations like IsValid (ObjectA) = TRUE
- App code that does not check for valid data - ie: IsNull()
- Apps that do not use POST Open and Constructor events for initialization
- Apps that process Window Timer Events
- Apps that process using the Timer Object.
Food for thought. HTH
Regards ... Chris