locked
When the desktop bridge application uses the update API, disconnecting the network will cause the app to crash RRS feed

  • Question

  • Using StoreContext.CanSilentlyDownloadStorePackageUpdates when the network is disconnected will cause the app to crash, and I try to use Try-Catch to fail to catch this exception. In addition, when I use StoreContext.TrySilentDownloadStorePackageUpdatesAsync to download the update package, disconnecting the network at this time will also cause the APP to crash too. The following is the error log in Event Viewer:

    Eventlog 1: Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at Windows.Services.Store.StoreContext.get_CanSilentlyDownloadStorePackageUpdates()

    Eventlog 2: Faulting application name: MyApp.exe, version: 1.0.0.0, time stamp: 0x96223b82 Faulting module name: Windows.ApplicationModel.Store.dll, version: 10.0.19041.329, time stamp: 0x92fa3e59 Exception code: 0xc0000005 Fault offset: 0x0009fcb0 Faulting process id: 0x6d0c Faulting application start time: 0x01d6511c5d86de48 Faulting application path: C:\Program Files\WindowsApps\MyApp\MyApp.exe Faulting module path: C:\Windows\System32\Windows.ApplicationModel.Store.dll Report Id: d67098d6-39c7-4a02-a837-b523821c9ca2 Faulting package full name: MyApp Faulting package-relative application ID: App

    Eventlog 3: Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: exception code c0000005, exception address 7947FCB0 Stack:

    Eventlog 4: Faulting application name: MyApp.exe, version: 1.0.0.0, time stamp: 0x96223b82 Faulting module name: Windows.ApplicationModel.Store.dll, version: 10.0.19041.329, time stamp: 0x92fa3e59 Exception code: 0xc0000005 Fault offset: 0x0009fcb0 Faulting process id: 0x36a0 Faulting application start time: 0x01d65131af3782e2 Faulting application path: C:\Program Files\WindowsApps\MyApp\MyApp.exe Faulting module path: C:\Windows\System32\Windows.ApplicationModel.Store.dll Report Id: 4a027389-345c-4f16-a605-276f2774c768 Faulting package full name: MyApp Faulting package-relative application ID: App

    This kind of exception seems to be unable to be caught using managed code, what should I do?



    • Edited by 4-dc Sunday, July 5, 2020 6:13 AM
    Sunday, July 5, 2020 6:12 AM

All replies

  • Hi,

    Could you please share the code snippet that how you used the try-catch block? When do you call the CanSilentlyDownloadStorePackageUpdates method? Before or after the network is disabled?

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Monday, July 6, 2020 6:49 AM