I've been excercising the Gramps v5 release candidate pretty hard recently. Doing things I know cause other database apps problems, I've been able to tangle it up.
The problem is that I have to then repeat the process and trim out steps until getting the smallest repeatable case. (Otherwise the programmers have to do that step. Their time is better spent actually fixing an already isolated problem or adding new features.) But each time I get into a tight spot where Gramps became unresponsive, I have to end the program through the Task Manager. Then do the same thing several more times.
Paul & Nick have been great tracking down the real problems and fixing them. But they also suggested a workaround when I see certain symptoms.
When Gramps gets to a point where is becomes unresponsive and can't even be closed, sometimes it is because there is a modal window that could be behind other windows or off-screen. (A modal window is where the task in that window must be completed before anything else can be done in the program. This is in contrast to a modeless window, like the clipboard, that can be left open. There are also semi-modal variants that are have a preferred, rather than required, order of operation.) in this case, you can't switch between persons or close Gramps.
Try pressing the ESC key to see if a Cancel or Save before closing confirmation window appears. It's a way you might be able to get control back and close Gramps normally.
If you DO run into such a problem, these are key issues to report. Remember that everyone approaches a program differently and your problems might never be replicated when approached from another direction. If problems aren't reported, they won't be fixed.