locked
ProjectionManager.StartProjectingAsync throws ArgumentException

    Question

  • Projection sample app: https://code.msdn.microsoft.com/Projection-sample-526b3c1d/view/Discussions

    I have downloaded this sample app and am getting the below exception.  I have tried with multiple types of monitors.  I also had a colleague download and run the sample, and he also received the same exception; so to validate on another Win8.1 system.  What may be causing this?

    Scenario1.xaml.cs - Line 71 :

    await ProjectionManager.StartProjectingAsync(rootPage.ProjectionViewPageControl.Id, thisViewId);

    Throws:

    {System.ArgumentException: Value does not fall within the expected range.
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
       at Projection.Scenario1.<StartProjecting_Click>d__3.MoveNext()}

    Sunday, January 18, 2015 8:26 PM

Answers

  • Hi ryanStorandt,

    That really looks like the API effected by local environment.

    I believe the app will try to find the local machine COM port and send package to it, however if the projection is not var local machine COM port, the exception will thrown.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 27, 2015 8:54 AM
    Moderator

All replies

  • Here is the general definition of this Function: ProjectionManager.StartProjectingAsync

    The Exception means that one of the Arguments os out of range, also to heigh or to low or invalid.

    Where do you get these id's from?



    © 2015 Thomas Roskop

    Germany // Deutschland

    Sunday, January 18, 2015 8:29 PM
  • I simply downloaded the Projection sample from https://code.msdn.microsoft.com/Projection-sample-526b3c1d.  I did not change the code in anyway. 

    However, there is another app (Retail Modern POS) that is throwing the exact same error, but this app was written by Microsoft also.  http://technet.microsoft.com/EN-US/library/dn741450.aspx  They are using ProjectionManager, for "Dual Display" functionality.  I found the bug, and decided to try the Projection sample app.  But the Projection sample app doesn't work either.

    Sunday, January 18, 2015 8:36 PM
  • Hi ryanStorandt,

    Thanks for your feedback, however I could not reproduce the issue when I was testing the app.

    The sample works fine on my laptop, however when I remote connect to my laptop from another machine and try the sample, failed with the same error like you.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 19, 2015 12:15 PM
    Moderator
  • Thank you for validation and feedback.  I tried the sample app on another colleagues machine, and it worked properly.  So there is something specific to my local environment where I am having the issue, perhaps driver related or something.  I will post back if I discover the cause, after trying some different display devices / connections.  I was using a DisplayLink driver / USB attached display when receiving this exception.
    Monday, January 26, 2015 1:54 PM
  • Hi ryanStorandt,

    That really looks like the API effected by local environment.

    I believe the app will try to find the local machine COM port and send package to it, however if the projection is not var local machine COM port, the exception will thrown.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 27, 2015 8:54 AM
    Moderator
  • I've used the ProjectionManager class extensively in my own app. I will tell you that while I've never had a problem with the Microsoft sample as-is, I *have* gotten that value does not fall within the expected range error in some of my early prototypes, and when it did happen it was always because something interfered with the window creation process. 

    Are you running the second display in extended desktop mode or mirroring? If you're mirroring, I believe both the projection window and main window will try to compete for the same screen space, which could be the issue.

    Wednesday, January 28, 2015 2:16 AM