Arduino Due gets crazy if unplugged while sending

ard_newbie:
Do you connect your board behind a hub or directly into the PC ?

I didn't see this answer the last day, sorry.
Yes, in this test I'm using a hub to connect both USB cables. But I have the same problem without any hub, with the USB directly to the PC.