RadMap ItemsVirtualization example throws 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll

2 posts, 0 answers
  1. Dan M
    Dan M avatar
    4 posts
    Member since:
    Sep 2009

    Posted 23 Sep 2010 Link to this post

    Hi I just ran the Rad Map ItemsVirtualization example from the demo code and I notice certain sluggishness when running the map. Looking at the output window of Visual studio I've noticed a large amount of the errors

    A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
    Any idea why are those thrown?
    And also if I increase the density of the grid like the next line of code

     this.dynamicLayer.ZoomGridList.Add(new ZoomGrid(2 << 13, 2 << 13, 13));
    the number of the errors increases tremendously.
    EDIT>> I looked more into the call stack and this is the error thrown




    System.ArgumentOutOfRangeException occurred Message=The added or subtracted value results in an un-representable DateTime.
    Parameter name: t
      Source=mscorlib
      ParamName=t
      StackTrace:
           at System.DateTime.op_Addition(DateTime d, TimeSpan t)
      InnerException:

     

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 27 Sep 2010 Link to this post

    Hello Dan M,

    The exception you found is handled inside the tile cache subsystem of RadMap, and you shouldn't worry about it.
    It is thrown when the MaxExpirationTime is not specified. If you want to avoid this exception, then you should specify MaxExpirationTime property.
    Sample code is below.
    (this.radMap.Provider.CacheStorage as FileSystemCache).MaxExpirationTime = TimeSpan.FromDays(15);

    All the best,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top