Skip to content

Windows.Storage.ApplicationData is unreliable for packaged Win32 applications #101

@sylveon

Description

@sylveon

Windows.Storage.ApplicationData is extremely trivial to break.

One can simply open the non-Store version of Inkscape or GIMP and then try to run a packaged app which makes use of Windows.Storage.ApplicationData.Current.RoamingFolder.Path (or one of the other folders). The app will fail to use this API, getting an invalid parameter HRESULT or the appropriate language exception (but what parameter? there's no parameter to give to this API!)

The IRestrictedErrorInfo is not useful either, it just says "Error trying to initialize application data storage folder" and a stack trace pointing to OS internals:
image

Two current apps on the Store which exhibit this behavior are Spotify (which crashes on startup) and my own TranslucentTB (which provides an error message and then calls RaiseFailFastException on startup)

I've received multiple bug reports both privately and publicly about this, including one issue on GitHub TranslucentTB/TranslucentTB#268. I was never able to root cause the problem for that user (or any other user for that matter), but I've later encountered the same issue by trying to debug my app while I had Inkscape open to design SVG icons for the app.

I filled feedback on the Feedback Hub a while ago: https://aka.ms/AA8av7x

How are developers expected to make use of those APIs in packaged Win32 apps if they are easily broken by another running app on the system?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions