I've got in the log the message about a Corrupt Shape file either because the geometry is badly created or because the shapefile don't have any features in, its empty.
What should be the best way to put a value into an attribute when this kind of issue occurs?