Hi Balasubramanian;
PB itself mostly calls MS-Window API's to get things done. The PBSHR module is the PB run time's API gateway for low level "C" calls to the O/S. So if that fails and the PB runtime cannot "Catch" the error (or the called sub-routine does not "raise" the error back to the PB runtime to catch) - then a mini-crash dump is created and the PB App would simply disappears. That is because your PB App is the Main Task and a crashing sub-task detected by the O/S that does not catch a System Error then penalizes the main Task (AKA your PB App). :-(
Since you indicate that this crashing issue happens sometimes when printing, I suspect that this crashing issue is environmentally agitated somehow. It could be a printer driver issue as one example. If the print driver crashes (it's a sub-task), it could take the PB App with it if it does not handle an I/O error CATCH properly. My suggestion in order to see if that hypothesis is correct, would be to issue a PrintGetPrinter() PB command. Then log the default printer just before the DC/DS.Print() command. If you then find that the crashes are happening around a certain printer (or model thereof), then that might be a trigger to update the printer driver and/or contact the printer vendor for help.
If your app is running under Citrix / RDP (etc) and the printer seems to be the issue, then I would contact your RDP / Citrix Admin to see if there might be a system setting that needs tweaked. HTH
Regards .. Chris