<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><p dir="ltr">What the heck does this his this mean that doesn't answer my question at all</p>
<p dir="ltr"><a href="https://overview.mail.yahoo.com/mobile/?.src=Android">Sent from Yahoo Mail on Android</a></p>
</td></tr></table>            <div id="_origMsg_">
                <div>
                    <br />
                    <div>
                        <div style="font-size:0.9em">
                            <hr size="1">
                            <b>
                                <span style="font-weight:bold">From:</span>
                            </b>
                            DETANNE Xavier <xavier.detanne@sgcib.com>;                            <br>
                            <b>
                                <span style="font-weight:bold">To:</span>
                            </b>
                            quickfixn@lists.quickfixn.com <quickfixn@lists.quickfixn.com>;                                                                             <br>
                            <b>
                                <span style="font-weight:bold">Subject:</span>
                            </b>
                            {{Quickfixn}} https://github.com/connamara/quickfixn/issues/313                            <br>
                            <b>
                                <span style="font-weight:bold">Sent:</span>
                            </b>
                            Tue, May 19, 2015 11:58:57 AM                            <br>
                        </div>
                            <br>
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tbody>
                                    <tr>
                                        <td valign="top">
<div class="WordSection1">
<p>Hi,</p> 
<p>when receiving the hereunder allocation instruction (parties were renamed so length and hash are no longer consistent) on our quickfix server, an exception was thrown (see hereunder complete stack) , due to the bad index search in a dictionary.
<br>
Exception is thrown from file DataDictionary\DataDictionary.cs in method <br>
public void Iterate(FieldMap map, string msgType), line 213<br>
Faulty Code section is :<br>
// check contents of each group<br>
foreach (int groupTag in map.GetGroupTags())<br>
{<br>
for (int i = 1; i <= map.GroupCount(groupTag); i++)<br>
{<br>
Group g = map.GetGroup(i, groupTag)<br>
DDGrp ddg = this.Messages[msgType].GetGroup(groupTag);<br>
// throw an exception if key not found<br>
IterateGroup(g, ddg, msgType)<br>
}<br>
}<br>
This loop is looking for groupTag 167 in Messages["J"] and this throws the exception.<br>
Adding a condition<br>
if (Messages[msgType].Groups.ContainsKey(groupTag)) <br>
before the GetGroup() line solves the issue, but i wonder if it might hide a deeper issue ?</p> 
<p class="MsoNormal">Regards </p> 
<p class="MsoNormal">  </p> 
<p class="MsoNormal">Xavier Detanne</p> 
<p>Exception stack :<br>
at System.ThrowHelper.ThrowKeyNotFoundException()<br>
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)<br>
at QuickFix.DataDictionary.DDMap.GetGroup(Int32 tag) in c:\HOMEWARE\quickfixn-master\QuickFIXn\DataDictionary\DDMap.cs:line 39<br>
at QuickFix.DataDictionary.DataDictionary.Iterate(FieldMap map, String msgType) in c:\HOMEWARE\quickfixn-master\QuickFIXn\DataDictionary\DataDictionary.cs:line 213<br>
at QuickFix.DataDictionary.DataDictionary.Validate(Message message, DataDictionary sessionDataDict, DataDictionary appDataDict, String beginString, String msgType) in c:\HOMEWARE\quickfixn-master\QuickFIXn\DataDictionary\DataDictionary.cs:line 102<br>
at QuickFix.DataDictionary.DataDictionary.Validate(Message message, Boolean bodyOnly, String beginString, String msgType) in c:\HOMEWARE\quickfixn-master\QuickFIXn\DataDictionary\DataDictionary.cs:line 126<br>
at QuickFix.DataDictionary.DataDictionary.Validate(Message message, String beginString, String msgType) in c:\HOMEWARE\quickfixn-master\QuickFIXn\DataDictionary\DataDictionary.cs:line 111<br>
at QuickFix.Session.Next(Message message) in c:\HOMEWARE\quickfixn-master\QuickFIXn\Session.cs:line 581<br>
at QuickFix.Session.Next(String msgStr) in c:\HOMEWARE\quickfixn-master\QuickFIXn\Session.cs:line 518<br>
at QuickFix.SocketReader.OnMessageFoundInternal(String msg) in c:\HOMEWARE\quickfixn-master\QuickFIXn\SocketReader.cs:line 150</p> 
<p>FIX message :<br>
[8=FIX.4.4|9=598|35=J|56=USER1|115=USER2|50=USER2|627=1|628=ATR|629=20150428-19:23:42|630=2624|34=1869|49=TRANSPORT|52=20150428-19:23:43|70=1358804370|71=0|626=1|857=0|54=2|55=FHLMC_38-79-LT|48=US3137ACNA31|22=4|167=CMO|541=20410115|225=20110601|223=2.5|107=FHLMC_38-79LT|53=12940000|423=1|6=100.00000000|15=USD|453=2|448=USER3|447=D|452=13|448=LEI123456|447=D|452=1|75=20150428|60=20150428-00:00:00.000|64=20150501|381=2509555.91|118=2509555.91|157=0|235=CURRENT|236=0.000000|78=1|79=TST-TRD3|80=12940000|467=3574-4696|12=0.00|13=3|154=2509555.91|742=0.00|136=1|137=0.00|138=USD|139=7|891=0|10=073]</p> 
<p class="MsoNormal">  </p> 
</div>
<p>*************************************************************************<br>This message and any attachments (the "message") are confidential, intended solely for the addresse(s), and may contain legally privileged information.<br>Any unauthorized use or dissemination is prohibited. E-mails are susceptible to alteration.  <br>Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or<br>falsified.<br>Please visit http://swapdisclosure.sgcib.com for important information with respect to derivative products.<br>                              ************<br>Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes <br>par le secret professionnel. <br>Ce message est etabli a l'intention exclusive de ses
 destinataires. Toute utilisation ou diffusion non autorisee est interdite.<br>Tout message electronique est susceptible d'alteration. <br>La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.<br>Veuillez consulter le site http://swapdisclosure.sgcib.com afin de recueillir d'importantes informations sur les produits derives.<br>*************************************************************************</p></td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>