分離ストレージから選択した mp3 ファイルを再生するための次のコードで、上記の例外とエラーが発生します。
using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var isfs = isf.OpenFile(selected.Path, FileMode.Open))
{
this.media.SetSource(isfs);
isfs.Close();
}
isf.Dispose();
}
エラーは非常に漠然としているので、何が間違っているのかよくわかりません...潜在的にチェックできるこのエラーのアイデアまたは少なくとも一般的な原因はありますか?
編集:例外がスローされています:using(var isfs = isf.OpenFile(...))
編集 2: スタック トレース...
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, IsolatedStorageFile isf)
at Ringify.Phone.PivotContent.RingtoneCollectionPage.MediaIconSelected(Object sender, GestureEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
1 つの曲を再生してから停止し (UI に再生と一時停止のボタンがあります)、別の曲を再生しても、エラーは発生しないことにも気付きました。ある曲を再生して停止し、同じ曲をもう一度再生しようとすると発生します。