Page 3 of 4
Re: Serialize/overflow errors
Posted: Mon Jul 27, 2015 12:58 pm
by zippyzee
That will be helpful. I think it will just be visual anomalies, such as equipment not showing on a character like it should, but it would be nice to figure out.
Re: Serialize/overflow errors
Posted: Mon Jul 27, 2015 1:29 pm
by John Adams
Hmm, not seeing the additional logging around the errors. Maybe I nuked your loggers
Re: Serialize/overflow errors
Posted: Mon Jul 27, 2015 1:34 pm
by zippyzee
Code: Select all
LogDebug(LOG_CHARACTER, 3, "Sending attachment #%u pIndex: %u, aIndex: %u, slot: %u.",
index, sgo_att.package_index, sgo_att.attachment_index, sgo_att.vg_inventory_slot);
Actually in the character code; that's probably why. My fault.
I'll transfer the items to a character on my server tomorrow (I'm probably done for today) and dive in.
Re: Serialize/overflow errors
Posted: Tue Jul 28, 2015 5:51 am
by zippyzee
You can turn the loggers back on your server. I can duplicate this on my own server using that item list. I'll keep digging.
Re: Serialize/overflow errors
Posted: Tue Jul 28, 2015 6:02 am
by John Adams
Excellent news, thank you.
Re: Serialize/overflow errors
Posted: Tue Jul 28, 2015 7:58 am
by zippyzee
That character had absolutely stuffed their equipment to the brim!
We had a setting for MAX_ATTACHMENT_GROUPS=60 in UnrealPawn.h. This is likely due to watching packets and seeing attachment groups with slots up to 60. However, if you send more than 33 attachment groups, you will get the overflow error.
I've changed the setting to 33 for now, unless we encounter the error again and I'll lower it a little more. It's possible that the last attachments sent are being ignored but not overflowing anything.
This leads to fixing the overall system of appearances. Right now there is no distinction between adventuring, harvesting, etc. gear when sending equipment to show on the character. I was "hoping" that we would send all the attachment groups, and then tell the client which ones to display. It looks like we can only send one particular set at a time, and will need to change it out as selected by the character.
It will not take much to implement to send the right set of gear for attachment visuals, but I have bigger fish to fry for a bit and will return to it. I do want to eliminate that error, though, and this should do it.
Re: Serialize/overflow errors
Posted: Tue Jul 28, 2015 8:50 pm
by John Adams
Zippy, not sure if this is related (pretty sure this wasn't happening last weekend anyway) to this exact Grub I have targeted in Tursh Village.
Not only should he not have Attachments, but the numbers are totally wrong. Not sure if it's the fix, or a symptom of the original issue.
Re: Serialize/overflow errors
Posted: Wed Jul 29, 2015 4:16 am
by zippyzee
Was that last one after my latest commit? I had noticed that and thought I had it fixed as well. There was a separate variable for the maximum number of attachments that was still 60 (I'm not sure why there would be two places keeping track of that, anyway) that the command .spawn details was referencing, so it is spitting out garbage values for attachments 34-60. If it is still doing that I'll have to track down any others like that.
Re: Serialize/overflow errors
Posted: Wed Jul 29, 2015 10:31 am
by John Adams
Hmm, I created .spawn details myself, so I'll have a look at the command after I get home. We shouldn't have 2 max attachment values, no, regardless.
Re: Serialize/overflow errors
Posted: Wed Jul 29, 2015 11:09 am
by zippyzee
I'm not seeing the issue anymore so let me know if you have a specific npc still doing it.
This is in character.h:
This is in UnrealPawn.h:
Code: Select all
static const int8_t MAX_ATTACHMENT_GROUPS = 33; // The max was 60. Changed to 33 by Zippyzee to avoid buffer overflow error
They were both set to 60 and I changed both to 33.