If you frame an object that is too big, it appears that our camera position gets corrupted.
I'll paste an example scene below, where I just make an unreasonably large cube by taking the largest cube I can make, and then scaling it up.
It's completely reasonable that hitting F to frame this object puts the camera in an unusable state, but there should be a way to recover from this ( for example, by framing a reasonable sized object ). I haven't investigated yet, but I'm assuming that since framing preserves the camera rotation, if there's a NaN or something in the existing camera matrix, framing can't fix it.
Simplest fix I can think of is that framing should first check if the matrix is invalid, and if so, reset it. ( Currently the only fix that users have identified is making a new Viewer tab ).