Welcome to the RAS Solution Forums HECRAS Controller Phantom Controller Processes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8158
    Chris G.
    Keymaster

    Thanks for the forum, Chris. I’ve been using the HECRASController through VBA for a while and am looking forward to having a community for discussions.

    I have noticed something about using the Controller with the newest version of RAS. With the 4.1 Controller, the instance of the ras process that was created by the controller would disappear once the routine ended. The process from the 5.0 Controller seems to stick around (in the Windows Task Manager). My only solution so far is to periodically go through and kill the processes in the TM that are left after multiple runs. It doesn’t seem to suck up a significant amount of resources, but I’d love to handle the house keeping more cleanly. Have you experienced this on your end?

    Thanks!

    mike

    #13469
    Chris G.
    Keymaster

    Hi Mike-

    Yes, there was a change from 4.1 to 5.0 in how HECRASController ends RAS as a Windows Process. As you discovered, in 4.1, once the procedure that dimensions a new HECRASController class has finished, RAS would automatically be removed as a Windows Process and it would go away in the Task Manager. RAS 5.0 no longer does this automatically and RAS will remain open in the background even after your application has finished running. This can be quite annoying, as you start stacking RAS processes on top of each other in the background of Windows and you get that annoying “HEC-RAS is already open, do you wish to open another instance” everytime you try to open HEC-RAS.

    The solution: In HEC-RAS 5.0, the HECRASController introduced a new subroutine called “QuitRAS”. Just call that subroutine at the end of your procedure and the HECRASController will kill RAS as a Windows process. Easy fix, you just have to get in the habit of calling QuitRAS at the end of your procedures. “Breaking the HEC-RAS Code” provides more detail on QuitRAS on pages 39-40.

    Good luck!
    Chris

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.