Using PlayList LoadAsync() will show exception


  • Hi all,

    Playlist Class :

    [Reproduce step]
    1. Using Playlist::SaveAsAsync to save DMS's video file in playlist file(Test.wpl)
    2. Using Playlist::LoadAsync to load Test.wpl
    3. Show Exception :
    "Unhandled exception at 0x59948AE3 (msvcr110d.dll) in MediaServerClient.exe: An invalid parameter was passed to a function that considers invalid parameters fatal."

    If using WMP to load Test.wpl in Desktop mode, it can playback normaly

    I can save playlist file success, but I can't load this playlist file
    It should be a bug.


    Thursday, July 19, 2012 10:32 AM

All replies

  • Can you provide minimal sample code to demonstrate the problem? Do you get the error only if you try to reload the same wpl file immediately or can you never load that file?


    Thursday, July 19, 2012 10:26 PM
  • Hi Rob,

    I have upload sample code in my skydrive
    File name : Media Server client sample.zip

    Win8 Release Preview Build, 8400

    [Reproduce Step]
    1. Pair with other Device, you can follow this page's description to pair device

    2. Launch APP
    3. Select DMS server, and Select video file
    4. Now, the video is playing in MediaElement
    5. Click btn1
    6. Change to desktop mode, open Libraries\Videos folder, you will see the Sample.wpl
    7. Double click this Sample.wpl, WMP will play it normaly
    8. Close WMP
    9. Return to app, and Click btn2
    10. Exception!!

    This sample code is MSDN's sample code, I just add two button in this sample code
    Bt1: save playlist

    void MediaServerClient::Scenario1::Btn_test_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
    	StorageFolder^ folder = KnownFolders::VideosLibrary;
    	String^ name = "Sample";
    	String^ te = folder->Path;
    	NameCollisionOption collisionOption = NameCollisionOption::ReplaceExisting;
    	PlaylistFormat format = PlaylistFormat::WindowsMedia;
    	task<StorageFile^>(playlist->SaveAsAsync(folder, name, collisionOption, format))
    		.then([this](StorageFile^ file)
    		int abc = 0;

    Btn2: Load Playlist

    void MediaServerClient::Scenario1::Btn_test2_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
    	StorageFolder^ Folder = KnownFolders::VideosLibrary;
    	String^ Filename = "Sample.wpl";
    	task<StorageFile^> getFileTask(Folder->GetFileAsync(Filename));
    	getFileTask.then([this](StorageFile^ file)
    		return Playlist::LoadAsync(file);
    	}).then([this](Playlist^ value)
    		int abc=0;

    Friday, July 20, 2012 12:13 PM
  • Can give me some feedback?
    Monday, July 23, 2012 4:15 PM