[Mono-dev] Non-sensical stack trace (possible issue with generic sharing?)

Bassam Tabbara bassam at symform.com
Thu Aug 15 08:12:39 UTC 2013

I don’t see this problem when running with –O=-gshared. The application seems to runs slower however. Is there any other information I can provide to help resolve this? It only seems to be happening on ARM for me.

From: Zoltan Varga <vargaz at gmail.com<mailto:vargaz at gmail.com>>
Date: Wednesday, August 14, 2013 4:54 PM
To: Bassam Tabbara <bassam at symform.com<mailto:bassam at symform.com>>
Cc: "mono-devel-list at lists.ximian.com<mailto:mono-devel-list at lists.ximian.com>" <mono-devel-list at lists.ximian.com<mailto:mono-devel-list at lists.ximian.com>>
Subject: Re: [Mono-dev] Non-sensical stack trace (possible issue with generic sharing?)


  Try running with -O=-gshared to see whenever this is a generic sharing problem. The stack trace might be missing the List.Add () method for some reason.


On Thu, Aug 15, 2013 at 1:29 AM, Bassam Tabbara <bassam at symform.com<mailto:bassam at symform.com>> wrote:
On an armv5tel with latest mono from master I see the following exception frequently in our automated test runs:

System.ArgumentOutOfRangeException: Value has to be >= 0.
Parameter name: destinationIndex
  at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00207] in /root/build-thirdparty/mono/mcs/class/corlib/System/Array.cs:1016
  at System.Collections.Generic.List`1[Symform.Control.Common.Placement.NodeEndPoint].CopyTo (Symform.Control.Common.Placement.NodeEndPoint[] array, Int32 arrayIndex) [0x00000] in /root/build-thirdparty/mono/mcs/class/corlib/System.Collections.Generic/List.cs:203
  at Newtonsoft.Json.Utilities.CollectionWrapper`1[System.Object].Add (System.Object item) [0x00000] in <filename unknown>:0
  at Newtonsoft.Json.Utilities.CollectionWrapper`1[System.Object].System.Collections.IList.Add (System.Object value) [0x00000] in <filename unknown>:0
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (IWrappedCollection wrappedList, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x00000] in <filename unknown>:0

Whats odd about this stack trace is that JsonSerializeInternalReader.PopulateList does not call CollectionWrapper`1.Add, nor does Add call List`1.CopyTo. See http://json.codeplex.com/SourceControl/latest#trunk/Src/Newtonsoft.Json/Utilities/CollectionWrapper.cs.

Is it possible that the stack trace is mangled, or is this a generic sharing problem?

Note I do not see this issue on x86 or amd64, and did not see this with mono-2-10 on all platforms.


Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com<mailto:Mono-devel-list at lists.ximian.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130815/051040ae/attachment.html>

More information about the Mono-devel-list mailing list