<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:42 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-744] ArgumentOutOfRangeException on thread</title>
                <link>https://jira.mongodb.org/browse/CSHARP-744</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Here is what my Profile class looks like:&lt;/p&gt;

&lt;p&gt;    public class Profile&lt;br/&gt;
    {&lt;br/&gt;
        &lt;span class=&quot;error&quot;&gt;&amp;#91;BsonId&amp;#93;&lt;/span&gt;&lt;br/&gt;
        public int SequenceNumber &lt;/p&gt;
{ get; set; }&lt;br/&gt;
&lt;br/&gt;
        public string Code { get; set; }

&lt;p&gt;        public string Name &lt;/p&gt;
{ get; set; }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;I&apos;m getting the following exception when I try and call EnsureIndex from a different thread referencing the above class:&lt;/p&gt;

&lt;p&gt;System.ArgumentOutOfRangeException Class Profile does not have a member called Code.&lt;br/&gt;
Parameter name: memberName MongoDB.Bson.Serialization.BsonSerializationInfo GetMemberSerializationInfo(System.String)    at MongoDB.Bson.Serialization.BsonClassMapSerializer.GetMemberSerializationInfo(String memberName)&lt;br/&gt;
   at MongoDB.Driver.Linq.Utils.BsonSerializationInfoFinder.VisitMember(MemberExpression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.ExpressionVisitor`1.Visit(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Utils.BsonSerializationInfoFinder.Visit(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Utils.BsonSerializationInfoFinder.VisitLambda(LambdaExpression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.ExpressionVisitor`1.Visit(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Utils.BsonSerializationInfoFinder.Visit(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Utils.BsonSerializationInfoFinder.GetSerializationInfo(Expression node, Dictionary`2 serializationInfoCache)&lt;br/&gt;
   at MongoDB.Driver.Builders.IndexKeysBuilder`1.&amp;lt;GetElementNames&amp;gt;b__0(Expression`1 x)&lt;br/&gt;
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()&lt;br/&gt;
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&lt;br/&gt;
   at System.Linq.Enumerable.ToArray&lt;span class=&quot;error&quot;&gt;&amp;#91;TSource&amp;#93;&lt;/span&gt;(IEnumerable`1 source)&lt;br/&gt;
   at MongoDB.Driver.Builders.IndexKeysBuilder`1.Ascending(Expression`1[] memberExpressions)&lt;br/&gt;
   at XactPrm.Data.Repository.ProfileRepository..ctor(String connectionStringOverride) in e:\prm-online-robison\XactPrm.Data\Repository\ProfileRepository.cs:line 13&lt;/p&gt;


&lt;p&gt;Line 13 is this: Collection.EnsureIndex(new IndexKeysBuilder&amp;lt;Profile&amp;gt;().Ascending(p =&amp;gt; p.Code));&lt;/p&gt;

&lt;p&gt;When I do this from the main thread it seems to work. Not sure what the difference is. Any suggestions?&lt;/p&gt;</description>
                <environment>Windows 7 x64</environment>
        <key id="75967">CSHARP-744</key>
            <summary>ArgumentOutOfRangeException on thread</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chrisdrobison">Chris Robison</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 May 2013 21:40:43 +0000</created>
                <updated>Thu, 20 Mar 2014 14:37:01 +0000</updated>
                            <resolved>Tue, 21 May 2013 13:42:03 +0000</resolved>
                                    <version>1.8.1</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="340549" author="chrisdrobison" created="Tue, 21 May 2013 13:14:40 +0000"  >&lt;p&gt;I have found the root cause and it is not the driver. The open source MongoDB job store I&apos;m using is apparently mapping things in such a way that interferes with the objects I&apos;m using. Looks like I&apos;ll have to roll my own job store.&lt;/p&gt;</comment>
                            <comment id="340110" author="craiggwilson" created="Mon, 20 May 2013 22:16:05 +0000"  >&lt;p&gt;I don&apos;t have a lot of experience with Quartz.NET, but I have had some.  If you could put together a sample program demonstrating the issue, we&apos;ll be able to get to an answer quicker.  As I don&apos;t know what you are doing exactly, this would be very difficult to troubleshoot.  &lt;/p&gt;

&lt;p&gt;It&apos;s possible quartz spins up other app domains and/or does some serialization of data between these in order to keep its jobs separate.  But I won&apos;t be able to troubleshoot without your help.&lt;/p&gt;</comment>
                            <comment id="340104" author="chrisdrobison" created="Mon, 20 May 2013 22:10:44 +0000"  >&lt;p&gt;This stuff worked fine before I started using Quartz.&lt;/p&gt;</comment>
                            <comment id="340102" author="chrisdrobison" created="Mon, 20 May 2013 22:10:07 +0000"  >&lt;p&gt;I&apos;m using it in connection with Quartz.NET. Upon further investigation, there are a lot more issues than this and I&apos;m not completely sure if they are related at all to the driver. For instance, when I get an IQueryable reference from a collection and foreach through everything, only the object Id&apos;s are deserialized. Everything else is null.&lt;/p&gt;</comment>
                            <comment id="340092" author="craiggwilson" created="Mon, 20 May 2013 21:54:59 +0000"  >&lt;p&gt;Hi Chris,&lt;br/&gt;
  Sorry about your trouble.  Could you explain &quot;from a different thread&quot;?  Perhaps some code differentiating the two would be helpful.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrnzev:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>53704</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>