IndexOutOfRangeException in Drop Constructor

72 views
Skip to first unread message

Samuel Listopad II

unread,
Apr 19, 2012, 11:10:14 AM4/19/12
to dotl...@googlegroups.com
Hi,

   Has anyone else had the problem of getting an IndexOutOfRangeException in the Drop constructor?  I just ran across this, and it seems like the code in Utils/WeakTable.cs would support that this can happen.  However I am trying to figure out if anyone else has seen this problem, or if I should be searching elsewhere in my code.

   It only happens on one machine,  and its a production machine so I don't have the luxury of incremental testing on that machine.

   Anyway I fixed it and sent a pull request,  just wondering if anyone else had seen it and if there was something else I should be looking for.

Sam

Stacktrace:
Internal Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at DotLiquid.Util.WeakTable`2.TryGetValue(TKey key, TValue& value)
   at DotLiquid.Drop..ctor()
   at Cardinal.IpDashboard.Alerts.Emailer.EmailTemplateDocObject..ctor()
   at Read_EmailTemplateDocObject(ObjectMaterializer`1 )
   at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

Patrick McEvoy

unread,
Aug 14, 2012, 7:19:25 AM8/14/12
to dotl...@googlegroups.com
I am getting this too with 1.6 and 1.7. I can't seem to narrow it down atm as it only happens with production data. I am putting a debug build of dotliquid in and will post back with line numbers tomorrow.

System.IndexOutOfRangeException: Array index is out of range.
  at DotLiquid.Util.WeakTable`2[System.Type,DotLiquid.TypeResolution].TryGetValue (System.Type key, DotLiquid.TypeResolution& value) [0x00000] in <filename unknown>:0
  at DotLiquid.DropBase.get_TypeResolution () [0x00000] in <filename unknown>:0
  at DotLiquid.DropBase.InvokeDrop (System.Object name) [0x00000] in <filename unknown>:0
  at DotLiquid.DropBase.get_Item (System.Object method) [0x00000] in <filename unknown>:0
  at DotLiquid.Context.LookupAndEvaluate (System.Object obj, System.Object key) [0x00000] in <filename unknown>:0
  at DotLiquid.Context.Variable (System.String markup) [0x00000] in <filename unknown>:0
  at DotLiquid.Context.Resolve (System.String key) [0x00000] in <filename unknown>:0
  at DotLiquid.Context.get_Item (System.String key) [0x00000] in <filename unknown>:0
  at DotLiquid.Variable.RenderInternal (DotLiquid.Context context) [0x00000] in <filename unknown>:0
  at DotLiquid.Variable.Render (DotLiquid.Context context, System.IO.TextWriter result) [0x00000] in <filename unknown>:0
  at DotLiquid.Block+<>c__DisplayClass1.<RenderAll>b__0 (System.Object token) [0x00000] in <filename unknown>:0
Reply all
Reply to author
Forward
0 new messages