locked
[U8.1]Windows 8.1 Universal app's Windows project works fine in Debug, crashes on launch in Release RRS feed

  • Question

  • I've got a Universal Windows 8.1 app (my computer is running Windows 10 Professional), and I can emulate the Phone project and deploy the Phone project to a Windows Phone 8.1 device in Release or Debug mode. No problem there.

    However, when I try to launch the Windows project, the app crashes after displaying the splash screen, before displaying the first Page of my app. 

    My computer is in Developer mode (when I go to Project -> Store -> Acquire Developer License, it says that the computer needs to be in Developer mode and that it's already in developer mode, and doesn't ask me to agree to any license terms or anything like that).

    Because the app is (trying to) running in Release mode, the normal stacktrace-enabled crash behavior from debug mode doesn't happen, but VS does ask me if I want to open up another VS instance to debug it.  If I say yes, the second VS instance says that there's already a debugger attached, though what that other debugger is and how I can find it to get information out of it, I have no idea.  Long and short, the second VS instance is useless, and gives me no information.

    The Event Viewer tells me: "Activation of app [MyAppName]!App failed with error: The remote procedure call failed. See the Microsoft-Windows-TWinUI/Operational log for additional information."

    The Microsoft-Windows-TWinUI/Operational log tells me: "ActivateApplicationForContractByAppIdAsUserWithHost of the app [MyAppName]!App for the Windows.Launch contract failed with The remote procedure call failed.."

    Web searching for these strings has yielded nothing useful, thus I turn to this forum for help.

    One thing to note: my development is done under a company license that's different than my personal Microsoft account with which I log onto my Win10 machine.  I switch Visual Studio over to the company account to make sure that I'll be able to deploy it under that company account when I get done being able to actually run it in Release mode for some final testing before Beta (which was supposed to have started today).

    Can anyone lend me a hand here?

    Thanks,

    Kyle Humfeld

    In A Day Development


    • Edited by Barry Wang Wednesday, December 16, 2015 1:59 AM title tag
    Tuesday, December 15, 2015 1:13 AM

All replies

  • Hello Kyle Humfeld,

    As far as I known there are many reasons that an app might crash in release mode but not in debug mode. For example it may be related with the compiler optimizations or differences in memory layout or initialization or the app doesn't handle suspend and resume correctly. So I will recommend you try to analyze the crash dump using the Windows debuggers (WinDbg) from here.

    Besides, some API you used will be also useful here. Or is it possible for you to share a repro simple sample for us?

    Best regards,

    Barry


    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.

    Wednesday, December 16, 2015 2:56 AM
  • Thanks for the reply, Barry!  I managed to stumble upon the line that's causing the crash.  It is this:

    App.IAPLicenseInformation = CurrentApp.LicenseInformation

    When I use the Immediate Window to output CurrentApp.LicenseInformation, here's what it spits out:

    'CurrentApp.LicenseInformation' threw an exception of type 'System.Exception'
        Data: {System.Collections.ListDictionaryInternal}
        HResult: -2143330041
        HelpLink: null
        IPForWatsonBuckets: {0}
        InnerException: null
        IsTransient: false
        Message: "Exception from HRESULT: 0x803F6107"
        RemoteStackTrace: null
        Source: "Windows.ApplicationModel"
        StackTrace: "   at Windows.ApplicationModel.Store.CurrentApp.get_LicenseInformation()"
        TargetSite: {Windows.ApplicationModel.Store.LicenseInformation get_LicenseInformation()}
        WatsonBuckets: null
        _HResult: -2143330041
        _className: null
        _data: {System.Collections.ListDictionaryInternal}
        _dynamicMethods: null
        _exceptionMethod: {Windows.ApplicationModel.Store.LicenseInformation get_LicenseInformation()}
        _exceptionMethodString: null
        _helpURL: null
        _innerException: null
        _ipForWatsonBuckets: {0}
        _message: "Exception from HRESULT: 0x803F6107"
        _remoteStackIndex: 0
        _remoteStackTraceString: null
        _safeSerializationManager: {System.Runtime.Serialization.SafeSerializationManager}
        _source: "Windows.ApplicationModel"
        _stackTrace: {sbyte[24]}
        _stackTraceString: null
        _watsonBuckets: null
        _xcode: -532462766
        _xptrs: {0}

    Interestingly, when I put that line in a try/catch block, it still crashes in exactly the same way - the try/catch does not catch the error.  I've never seen that happen before, but it might be an indication that the crash is happening externally to my app and that my app is falling victim to that external crash.  That's a hypothesis only.

    I saw an indication somewhere in my searching yesterday that the most recent Windows 10 update caused CurrentApp.* to no longer work... and this functionality did work before I installed that update, so that's some evidence corroborating the hypothesis that that's what's going on here.

    But if that's the case, then it appears that there's literally nothing I can do about this, as the flaw is in Windows 10 as an operating system, and not with anything I've done in my code.

    Has anyone here (including you, Barry) heard about this, can corroborate or refute it, or in any other way shed light on this problem?

    Thanks again for your time and assistance.

    Kyle Humfeld

    In A Day Development

    Wednesday, December 16, 2015 7:23 PM
  • Hi Barry,

    I tried taking your advice by using WinDbg, but I can't locate any crash dumps (for anything, anywhere).  What's the file extension, and where does Windows typically put them?  There's nothing like that at the root of c:\, which is where one article said crash dumps would be.

    Thanks,

    Kyle Humfeld

    Wednesday, December 16, 2015 7:52 PM
  • @Kyle,

    Try to check this article about the tool we need https://msdn.microsoft.com/en-us/library/windows/hardware/dn144772(v=vs.85).aspx

    Then maybe you need to see here PLMDebug.

    Best regards,

    Barry


    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.

    Thursday, December 17, 2015 1:06 PM
  • @Barry,

    Thanks again for your time and assistance.  I think I may have buried the lead in my last response:

    "I saw an indication somewhere in my searching yesterday that the most recent Windows 10 update caused CurrentApp.* to no longer work... and this functionality did work before I installed that update, so that's some evidence corroborating the hypothesis that that's what's going on here.

    But if that's the case, then it appears that there's literally nothing I can do about this, as the flaw is in Windows 10 as an operating system, and not with anything I've done in my code.

    Has anyone here (including you, Barry) heard about this, can corroborate or refute it, or in any other way shed light on this problem?"

    Do you have any idea if CurrentApp.* is actually working in Windows 10 Threshold 2?  It seems as if that part of the OS might be broken...

    Thanks again!

    Kyle Humfeld
    Friday, December 18, 2015 2:27 AM
  • I confirm excactly same happening for me. CurrentApp looks not working and causing crash what ever u do. Same code, with same store informations works nicely with 8.1 phones but not with WP10 emulator or reall device. Try, catch not help as e.g License iormation is not never recived by CurrentApp etc. I asume that its easy reproduce this failure by calling CurrentApp at WIndows Phone silverlight 8.1 environment by emulating it with WP10 emulator, WP8 no issues...
    Saturday, December 19, 2015 4:12 PM
  • Hi all,

    If you have problem using the code CurrentApp in your app. And if you've already checked the product(IAP) in your app(Make sure the item exist). I think this is a problem with the dashboard.

    Maybe we need to ask for help from here. And please notice that this is the support ticket. If the support ticket is not your problem, then it is free.

    Best regards,

    Barry


    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, December 21, 2015 6:32 AM
  • Barry, I dont have possibilities or interest to make needed contract and commiting needed payments for Microsoft. Anyway I have offered my findings for community and microsoft and hopefully someone finds solution or Microsoft takes an action to fix it, Br JJ
    Tuesday, December 29, 2015 7:39 AM
  • @Br JJ,

    Thanks for sharing us the info.  I also want to report this issue from our internal channel, but it seems the forum is mainly about dev issue, not dev center problem. Anyway, let's see if OP can come back with some info.

    Best regards,

    Barry


    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, December 29, 2015 9:24 AM
  • While I cannot reproduce it myself, I get similar error reports from multiple users.

    It looks like the Windows 10 license system is partially broken in TH2. My theory is that for some users, it does not seem to cache licenses anymore. So on each app startup, it will fetch licenses again from the server, which takes a few seconds and makes app startup very slow (if license is checked during startup), and if no connection can be made (in flight mode or no wifi), then the app crashes.

    It might be worth noting that these users reported that they have the same problems with many other apps as well. A lot of their apps which have IAPs do start a lot slower on Windows 10 (Mobile) and they crash when flight mode is on or no WiFi connection is found. They do not have these problems with free apps (no IAP). I got these reports from both PC and Mobile users. One user re-installed Windows 10 on his PC, just because of this problem.

    Thursday, January 7, 2016 8:13 PM
  • Hello,

    We are following multiple reports of this issue across various developer forums. I've engaged the IAP team and we are currently investigating the issue. I will post updates via this thread. I'm going to lock this thread so if you have additional follow-up information please post in the other thread.

    Thanks,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/


    Thursday, January 7, 2016 11:11 PM