I went to do the rift den near the Wispy Ruins entrance on Route 4 for Ditto, I ended up killing the first one (I'm an idiot), so I continued to get another blue beam, and soft reset, and as I did, I found that every subsequent time that I got Ditto (or what I can assume to be ditto, since every other pokemon was fine) the game would just crash. I kinda just gave up and moved on, so I don't have the exact error code or anything, but I thought it was worth noting.