Wednesday, June 12, 2013

ShellTile.ActiveTiles sometimes forgets about one of the tiles

A couple of times, when working with an app with lots of tiles pinned, I've seen `ShellTile.ActiveTiles` "forget" about one of the tiles.  By that I mean that when updating all the tiles from a background agent one of them isn't updated.

This is with code like:

    foreach (var tile in ShellTile.ActiveTiles)
    {
        // update the tile.
    }


At the moment I only have anecdotal evidence of this behaviour but wondered if anyone else could shed any knowledge or experience of this while I continue to investigate.

Deleting and repinning the tile in question seems to make the problem go away but this isn't a real solution.
Additionally it doesn't seem like it's the first or last created pin but I can't be sure of this.

Has anyone else seen this?



4 comments:

  1. Anthony Wieser6:37 am

    Hi Matt,

    Your background agent isn't running out of memory or time before updating the last one is it?

    We ended up having to liberally GC.Collect(2) to keep under the memory limit as we synthesized our tiles.

    ReplyDelete
  2. Hi Anthony

    It's not a memory or time limit issue. We have strict controls on memory and execution time, plus based on the order that the tiles are updated, we know it's doing some other tiles after it should have done the one that's missed.

    ReplyDelete
  3. Anthony Wieser6:45 am

    We also had some issues reusing filenames with a lock screen provider, where they didn't update if they weren't seen.

    ReplyDelete
  4. Anthony, yes, you have to use a different filename when updating the lock screen image

    ReplyDelete

I get a lot of comment spam :( - moderation may take a while.