I've set up several single factories and complexes now, but in some cases the ships I assign to buy goods won't deliver them

The ships will go out, buy the product (i.e. energy cells) and then rather than returning to base to supply the factory it will sit in space doing nothing. In the factory's "owned ships" screen the command I gave the ship displays correctly but there is no destination quoted; it says "ETA 00:00" and when I check the freight bay it is full of what I told it to buy. It indicates that there is no more product available at that price. Fair enough, so why won't the ship return home with what it has??
Every time this happens I have to order the ship to return home and then manually unload the goods and send it out again. This keeps grinding my factories to a halt. I have checked that the same thing happens whether I'm in or OOS.
I'm sure I read another post from someone who said it just fixed itself eventually but I've had the same problem for more than 2 weeks now. It's not just with one specific factory either.
Does anyone have any suggestions or have you experienced this before? I'm guessing it could just be a bug, but if so I would have expected to hear more about it. I'd rather not have to micromanage all my factories.
Thanks in advance