0

made a Mindmapping app for UWP some month ago.

The file handling is managed by the app:

  1. The files are auto saved
  2. The files are stored in the LocalFolder
  3. I use a queue for all file operations (See code)
  4. The files are saved transactional, see the following snippet

    using (StorageStreamTransaction transaction = await file.OpenTransactedWriteAsync())
    {
        JsonDocumentSerializer.Serialize(history, transaction.Stream.AsStreamForWrite());
    
        await transaction.CommitAsync();
    }
    

JsonDocumentSerializer is just a wrapper around JsonSerializer.

From time to time I get some bug reports from users, that the file gets corrupt, e.g. the file seems to have to correct size but is just empty or the only have the json is written to the file.

How can this happen?

Franklin Chen - MSFT
  • 4,845
  • 2
  • 17
  • 28
SebastianStehle
  • 2,409
  • 1
  • 22
  • 32
  • Could you show us the report if there is no sensitive data? On which devices this issues happened? If you get the bug report from dev center, I would suggest you contacting with Microsoft support to get 1:1 help – Franklin Chen - MSFT Sep 06 '16 at 07:16
  • There is nothing to show. I just see a JsonException in HockeyApp and empty or corrupt files, when the users send me these files. – SebastianStehle Sep 06 '16 at 09:09

0 Answers0