Added allocation failure checks in shadow_picture and caused it to exit