x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Client disconnects once replicated string reaches 1024 characters

I am currently working on a multiplayer chat system, the problem is that if a client player sends a message containing more than 1023 characters (including whitespace), it disconnects the client. The client disconnecting is apparently intended behavior (see a staff's response: https://answers.unrealengine.com/questions/259674/client-disconnecting-while-pie.html ). What I find interesting is that the cut-off is at 1024, which I doubt is a coincidence due to that number being a power of 2. My variable holding the message is a string, which is said to be 16 bytes per chararacter. 1024 characters at 16 bytes each is 16,384 bytes, which is 16 kibibytes. My thoughts are that this behavior is intended, though it does seem strange.

The process of sending a message via my chat system is simple, a client player types in a message, the message is sent to the server, and has operations performed on the string, and then the server sends the new message to each client player and displays it.

Edit: All of my variables were previously of type text, I switched them over because I thought that this would fix the issue, but the result is still the same.

Product Version: UE 4.9
Tags:
more ▼

asked Sep 19 '15 at 11:57 PM in Bug Reports

avatar image

Jamendxman3
638 15 22 65

avatar image Ben Halliday STAFF Sep 21 '15 at 10:39 PM

Hi Jamendxman3,

I wasn't able to reproduce this in 4.9.1 binary. Are you able to reproduce this in a new project, or does it only occur in your current project? Does this occur in the editor or in a packaged project? Please upload your Client and Server logs so I can take a look.

Can you put together a test project that displays this behavior and send me a download link? Thanks!

avatar image Jamendxman3 Sep 22 '15 at 05:58 AM

Well, I'm sure that my case may be a special case due to it being a chat system that does quite a few things, so it may be hard to pin-point it/reproduce in a test-project. Could you post your email or link me to your UE4 forum account? I am going to send the link to the original project that this is occurring in in a private message, this is happening inside of a blueprint for the marketplace, so I'd like for it to not be shared.

avatar image Jamendxman3 Sep 22 '15 at 07:30 AM

I ended up finding you on the forums, I've sent you a private message, thanks for you time.

avatar image Jamendxman3 Sep 26 '15 at 06:15 PM

Bump, any word on this?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Jamendxman3,

I apologize for the delay, it took me some time to narrow this down to a small enough project to examine. I was able to reproduce this in your project as well as a smaller test project, so I've entered a bug report for the issue (UE-21827). I'll post here if I see any update on it.

I believe you are correct and this may be a buffer overflow problem as mentioned in the linked post, however I do not know whether that's intentional given how small a 1024 character text or string is. My recommendation for your chat system would be to limit the length of sent messages to 1023 characters for now.

Thanks for the report!

more ▼

answered Oct 05 '15 at 11:48 PM

avatar image Kris Jan 18 '16 at 04:58 PM

G'day,

Posted this in response to someone asking about this limit on the forums: Is there any progress on the 1024+ chars replication?

It breaks strings apart into chunks smaller then 1024 characters. With a bit of modification, you can easily use it for chat messages.

Hope it helps.

Kris

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question