locked
Removable Storage File Opened by FileOpenPicker Crashed App in Launch

    Question

  • I opened a video file in a removable storage (USB3) by FileOpenPicker fine. Then I switched to another app and disconnected the removable storage. When I tried to run my app again the app crashed in starting. So I plugged the removable storage again everything was fine. 

    What code of exception processing can prevent this type of error by using removable storage with FileOpnePicker?

    Tuesday, January 28, 2014 4:13 PM

Answers

  • MediaFailed event for MediaElement control?

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, January 30, 2014 7:42 AM
    Moderator

All replies

  • Hi Charlie,

    I would suggest you go through with this guideline: App suspend and resume.

    I believe the reason of the crash is your video cannot find the source which is in your removable storage. I would say you can save the video information before the app is about to suspend and clear the video source, when the app is about to resume, try to open the video again with the saved state.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, January 29, 2014 5:49 AM
    Moderator
  • my video source path was stored in a database. I do not know when the removable storage was removed. I need to catch the exception of open file failed and may ignore this file.
    Wednesday, January 29, 2014 2:37 PM
  • MediaFailed event for MediaElement control?

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, January 30, 2014 7:42 AM
    Moderator