This post shows similar issues to the ones you are facing:
Seems like the freezing issue was something that may have been resolved around the time of FrontPanel 4.5.6 for Ubuntu 16.04. I’d just download the latest version of the FrontPanel SDK. That being 5.2.3, which is available for Ubuntu 16.04. That might resolve the freezing issue, and instead could report back a “Timeout” error code.
I’d recommend implementing a count feature on how much data is in your FIFO and relay that information to your application using a WireOut. Then you can call the ReadFromBlockPipeOut() once you know that there is data that can be retrieved.