Seeing as no-one else has come to the rescue, I'll have a go

although I warn you I only rarely deal with UDP issues (most of my stuff is UDP/TCP independent, and so I tend to work with TCP as debugging is a little easier).
OK, first things first. You didn't say whether you're in non-blocking mode. This matters because the UDP read methods act differently depending on mode (subtle but important differences!). I think I can guess, based on what you do next, but it would help to know for sure before I start barking up the wrong tree.
Moving on, the BUE is caused because there were fewer than 4 bytes in the UDP payload. So, the first thing you do is download a packet-sniffer and check EXACTLY how many bytes are in the FIRST UDP packet to arrive.
For instance, it could easily be that the UDP packet is being split before arrival. There are several possible causes for this; do NOT assume UDP packets arrive precisely as sent!
It would also help to know EXACTLY what data was arriving, which the packet sniffer will tell you (a good one understand UDP and display the payload for you as a text string; good ones are free / open-source).