Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub Group not cleared, causes issue parsing messages #179

Closed
jcwild opened this issue Mar 26, 2013 · 2 comments
Closed

Sub Group not cleared, causes issue parsing messages #179

jcwild opened this issue Mar 26, 2013 · 2 comments
Milestone

Comments

@jcwild
Copy link

jcwild commented Mar 26, 2013

When parsing a message using FromString, I am getting an error

Expected BodyLength=733, Received BodyLength=638

The reason for this looks to be because when the message is being parsed, a parties sub block (tag 802) in one of the parties blocks is not being cleared for subsequent party blocks.

I sent in the following message (newlines inserted for clarity):

8=FIX.4.4 | 9=638 | 35=8 | 34=360 | 49=BLPTSOX | 52=20130321-15:21:23 | 56=THINKTSOX | 57=6804469 | 128=ZERO | 6=122.255 | 11=61101189 | 14=1990000 | 15=GBP | 17=VCON:20130321:50018:5:12 | 22=4 | 31=122.255 | 32=1990000 | 37=116 | 38=1990000 | 39=2 | 48=GB0032452392 | 54=1 | 55=[N/A] | 60=20130321-15:21:23 | 64=20130322 | 75=20130321 | 106=UK TSY 4 1/4% 2036 | 118=2436321.85 | 150=F | 151=0 | 157=15 | 159=3447.35 | 192=0 | 198=3739:20130321:50018:5 | 223=0.0425 | 228=1 | 236=0.0291371041 | 238=0 | 381=2432874.5 | 423=1 | 470=GB | 541=20360307 | 
453=6 | 
448=VCON | 447=D | 452=1 | 802=1 | 523=14 | 803=4 | 
448=TFOLIO:6804469 | 447=D | 452=12 | 
448=TFOLIO | 447=D | 452=11 | 
448=THINKFOLIO LTD | 447=D | 452=13 | 
448=SXT | 447=D | 452=16 | 
448=TFOLIO:6804469 | 447=D | 452=36 | 
10=152 | 

This message is 662 characters long, with a BodyLength of 638.

But it looks like this was parsed as the following:

8=FIX.4.4 | 9=733 | 35=8 | 34=360 | 49=BLPTSOX | 52=20130321-15:21:23 | 56=THINKTSOX | 57=6804469 | 128=ZERO | 6=122.255 | 11=61101189 | 14=1990000 | 15=GBP | 17=VCON:20130321:50018:5:12 | 22=4 | 31=122.255 | 32=1990000 | 37=116 | 38=1990000 | 39=2 | 48=GB0032452392 | 54=1 | 55=[N/A] | 60=20130321-15:21:23 | 64=20130322 | 75=20130321 | 106=UK TSY 4 1/4% 2036 | 118=2436321.85 | 150=F | 151=0 | 157=15 | 159=3447.35 | 192=0 | 198=3739:20130321:50018:5 | 223=0.0425 | 228=1 | 236=0.0291371041 | 238=0 | 381=2432874.5 | 423=1 | 470=GB | 541=20360307 | 
453=6 | 
448=VCON | 447=D | 452=1 | 802=1 | 523=14 | 803=4 | 
448=TFOLIO:6804469 | 447=D | 452=12 | 802=1 | 523=14 | 803=4 | 
448=TFOLIO | 447=D | 452=11 | 802=1 | 523=14 | 803=4 | 
448=THINKFOLIO LTD | 447=D | 452=13 | 802=1 | 523=14 | 803=4 | 
448=SXT | 447=D | 452=16 | 802=1 | 523=14 | 803=4 | 
448=TFOLIO:6804469 | 447=D | 452=36 | 802=1 | 523=14 | 803=4 | 
10=051 | 

This message is 757 characters long, with a BodyLength of 733.

The tags 802, 523 and 803 seem to have been copied onto each party (448) block, despite only having been supplied on the first one.

Not sure if this is related to item #176?

@gbirchmeier
Copy link
Member

Pretty sure it is the same as #176.

We'll see how QF/C++ and QF/J handles group assignment. For consistency, we'll do it the same as them. (The status quo might actually be what they do, which means this is not a bug, though we can certainly improve the docs.)

@gbirchmeier
Copy link
Member

Same as #176 and #162. Thanks for actually giving me enough info to write a test!

gbirchmeier added a commit that referenced this issue May 15, 2013
gbirchmeier added a commit that referenced this issue May 15, 2013
fix for #179 (issue parsing message groups when null message factory)
gbirchmeier added a commit that referenced this issue May 15, 2013
hlibman-connamara pushed a commit to hlibman-connamara/quickfixn that referenced this issue Dec 6, 2024
hlibman-connamara pushed a commit to hlibman-connamara/quickfixn that referenced this issue Dec 6, 2024
fix for connamara#179 (issue parsing message groups when null message factory)
hlibman-connamara pushed a commit to hlibman-connamara/quickfixn that referenced this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants