After compiling project on BBB and rebooting, SSH does not work

I have been using BeagleBone Black for a while now for an application. I compile everything in C++ (g++), turn off and on, over and over, and everything was working fine until now. I just started using the zxing library (which I already used some months ago without any problems) in this project and after I compile and test it, it works just fine. The problem comes when I turn it off and on (or reboot), when I connect it back to my computer (via USB), I cannot ssh to it anymore. I still can ping and get answers from it, but SSH simply does not work anymore. It just hangs and keeps me waiting. I have tried with different computers and I got the same. I realized (after a lot of different guesses) that the problem happens right after compiling and I do not understand why. Did this happen to anyone else? Any ideas why or how to solve it?