I have even tried creating the project from scratch and I still get the above error. It only happens when it is running straight through. When I run it in debug with a break point on the startscanner, it works ok by stepping through. I have tried putting a sleep 2000 in just after the startscanner, but it bombs out before it gets there. I am completely stuck, not sure what to do next, any suggestions?