Detecting defective moulding conditions