I've created a ctools multistep form with a final step that previews an entity before it is saved, using entity_build_content($entity->type, $entity, 'token', 'und'); but I get warnings and notices from function field_collection_table_entity_view().

The issue is that $entity->instanceInfo() and $entity->hostEntity() are both NULL.

I don't know a great solution, but the attached patch bypasses the rest of the function if the field collection has not yet been saved, which is adequate for me.