PowerBuilder crash when building large/complex targets generated by ORCAScript

Symptom

The PowerBuilder Classic development environment (IDE) crashes when compiling a large/complex target where the PowerBuilder Libraries (PBLs) have been generated by the OrcaScriptcommandscc refresh target.

Environment

PowerBuilder

Reproducing the Issue

1. Create an OrcaScript file similar to this:

start session
scc connect offline
scc set target "my_huge_and_complex_target.pbt" "REFRESH ALL IMPORTONLY"
scc refresh target "full"
scc close
end session

2. Execute the script on the command prompt: orcascr220.exe myscript.orca

3. Open the PowerBuilder IDE and try to compile the target using the project painter, the PowerBuilder IDE will crash.

Cause

The command: scc refresh target "full" will do two compile passes. In some cases with complex inheritance and very large targets this is not enough.

Solution

A new option for the command scc refresh target was introduced: In addition to the three options "full", "migrate" and "incremental", there is now also an option called "3pass". Calling the command with this option will add a third compiler pass, and this should prevent the crash. Example: scc refresh target "3pass"