I’m not sure, there can always be other issues. But note that closing the window is not the same as terminating the application. When you close the window, the application gets a signal that it usually handles as cleaning up and shutting down. But if it is hanging, that task is not performed and resources are still held.
Almost. -k is to supply the passphrase directly, while -kfile does what OP believes -k does. That’s why it reports “bad decrypt” as well.