locked
file activation dead-lock RRS feed

  • Question

  • Hi there,

    I am currently attempting to debug my app with file associations.

    I took a look at the file association sample and all online documentation about this issue but I haven't found anything to help me.

    When my app is launched with a file association, it dead-locks at splash screen and stays that way until it gets killed due to system time out.

    I tried various code snippets for the OnFileActivated event and nothing seems to change this behaviour (I even left the event handler empty and it still dead locks).

    Any ideas what might cause this?

    Thanks.

    Monday, October 7, 2013 5:52 PM

Answers

  • Hello,

    Is there any reason you are setting the Start Page value in the manifest file with the xaml page?

    Try taking out the App Settings --> Start Page value from the Package.appxManifest file. When I removed it from your project, it atleast hits the breakpoint in the OnFileActivated method of app.xaml.cs. With the Start Page value set, that breakpoint is never hit.

    When you set the information and when the app deadlocks, take a look at task manager. You will notice that the app that gets launched is actually a wwahost.exe, not your C# exe meaning that the Start Page information is only applicable for HTML/WinJS apps.

    Thanks,

    Prashant.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    • Marked as answer by mcosmin Sunday, October 13, 2013 4:14 PM
    Friday, October 11, 2013 7:50 PM
    Moderator

All replies

  • Can you isolate your issue to a standalone repro? That way it will be easier to understand and debug your problem. Please share the standalone repro via SkyDrive.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    Monday, October 7, 2013 10:11 PM
    Moderator
  • There isn't really too much to reproduce.

    Step by step:

    1) add a file association in app manifest file

    2) override the OnFileActivated event in app.xaml

    3) try to open the file with double click launch from windows explorer.



    • Edited by mcosmin Monday, October 14, 2013 9:18 AM
    Tuesday, October 8, 2013 1:22 PM
  • Did you do navigation in OnFileActivated method?
    Tuesday, October 8, 2013 1:26 PM
  • Yep. Still dead locks.
    Tuesday, October 8, 2013 3:07 PM
  • Hello,

    Is there any reason you are setting the Start Page value in the manifest file with the xaml page?

    Try taking out the App Settings --> Start Page value from the Package.appxManifest file. When I removed it from your project, it atleast hits the breakpoint in the OnFileActivated method of app.xaml.cs. With the Start Page value set, that breakpoint is never hit.

    When you set the information and when the app deadlocks, take a look at task manager. You will notice that the app that gets launched is actually a wwahost.exe, not your C# exe meaning that the Start Page information is only applicable for HTML/WinJS apps.

    Thanks,

    Prashant.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    • Marked as answer by mcosmin Sunday, October 13, 2013 4:14 PM
    Friday, October 11, 2013 7:50 PM
    Moderator
  • Hmmm.

    Then why isn't the compiler throwing an error when I try to add them when using a visual C# project? It is kinda confusing (for beginners  in winRT programming like me), that both JS and .Net settings are present in the same IDE at the same time.

    I will give it a try monday.

    Friday, October 11, 2013 8:31 PM
  • That's a good question :). The documentation talks about it, but it is not very clear on what the behavior should be. http://msdn.microsoft.com/en-us/library/windows/apps/br211400.aspx

    I do agree that it is confusing. But do let me know the results on Monday.

    Thanks,

    Prashant


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    Friday, October 11, 2013 8:57 PM
    Moderator
  • I know it ain't Monday yet, but i had the chance to test it sooner.

    The issue appears to have been solved by removing that Startpage entry. The app makes it to the main screen this way, but then it crashes (which I believe has nothing to do with the file activation).

    Thanks a ton!

    Sunday, October 13, 2013 4:14 PM