In latest version, add a Media Library Picker Field to a content (ex : add Image to Blog Post).
When you edit a content and select a media, the onClosed function has an error and doesn't set the associated media id.
In Modules\Orchard.MediaLibrary\Views\EditorTemplates\Fields MediaLibraryPicker.Edit.cshtml, line 118 :
var template = @(fieldIdForIds)_Template
If you add this kind of code, it works :
if (selectedData[i] == null)
but we should find why the selectedData is incorrect.