<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p>Hi,<o:p></o:p></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 ?<o:p></o:p></p>
<p class="MsoNormal">Regards <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Xavier Detanne<o:p></o:p></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<o:p></o:p></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]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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></body>
</html>