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"

UMG Widgets stop ticking and/or drawing for Clients in Multiplayer

I have been having issues with my UMG Widgets since moving to 4.10 which only seems to occur in Multiplayer.

If there is the slightest hiccup, packet loss or break in communication between server and client or if the client stalls for too long - all user widgets for the client stop ticking. For me, this has also caused them to stop displaying (which I don't understand, since I've never told them to do that). The widgets are still around, and are not GC'd, but they don't draw or tick. There have been no mentions in the 4.10 release notes of stricter ticking, but I have so far found several changes to networking code that aren't documented in those notes, and am worried that this is one of them.

It's relatively easy to trigger this, I have a widget the the HUD adds to the Clients window on BeginPlay(). That widget is always in play for the entire game and is never removed. Doing network heavy tasks like taking possession of a different pawn (in my case, hoping in or out of a vehicle), or even when the client first joins the match causes this behavior. The only common thing I can see here is that the Pawn changes when this happens, but why would that be an issue?

Child widgets still remain in the viewport, but unless the parent tells them too then they also aren't ticked.

The only way to get around this right now, is to Force-Tick the widgets by calling an Update function on them in DrawHUD. This is not ideal since it completely overrides the point of the slate optimizations that have been put in recently, and means that all widgets tick regardless of whether they're on screen or not or even visible or not. What's worse is that widgets that ARE on-screen are then ticked twice, both by NativeTick() and the call from the HUD.

My game isn't doing anything special nor at any point does it tell that widget to hide itself, so I can only guess this is due to an engine change, but it seems like quite a breaking change. I don't have a project to hand that can easily demonstrate this without giving all my source code away, but I'm sure it's easy to create one that will do the same thing.

Product Version: UE 4.10
Tags:
more ▼

asked Nov 16 '15 at 02:09 PM in Bug Reports

avatar image

TheJamsh
810 56 91 139

avatar image Rudy Q ♦♦ STAFF Nov 16 '15 at 06:26 PM

Hello TheJamsh,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you recreate this issue in a clean project?

  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any blueprints and/or code that may be involved with issue?

avatar image TheJamsh Nov 17 '15 at 12:33 PM

Hi Rudy, I spoke to Nick Darnell yesterday and am going to try and create a bare bones project to replicate the issue. It does mean I have to setup some MP stuff so will take a few days.

The problem appears to be related to the widgets being redrawn / rebuilt when a client changes the pawn they are possessing. Nick seems to think that the widgets get a full tear down and rebuild when a player changes pawn. In MP that can take a little while for clients hence why the issue happens for them and not a server or single player.

In my case they never get drawn properly after that tear down I believe.

avatar image TheJamsh Jan 01 '16 at 12:52 PM

Hi folks, sorry for the delay.

I've attached source code of how I create the widgets, which is almost identical to ShooterGame, but I use a UMG widget instead of a Slate Widget. Whoever tests this will have to add in the code to swap possession to a different pawn, unfortunately creating a test case for this is like creating a new project on it's own :/

This code only occurs when the game starts, the actual problem will show when somebody tries to switch pawn.link text

wgtsauce.txt (2.2 kB)
avatar image Rudy Q ♦♦ STAFF Jan 05 '16 at 06:10 PM

Thank you for taking the time to provide the information above. However, I will need a few more bits of information before I can begin testing this issue. Could you provide the header file? There also appears to be 2 functions which are inside different classes. Could you specify if either/both are declared as UFUNCTION() and if so, what is used inside the UFUNCTION macro?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello TheJamsh,

I understand that you are working on a reproducible test case, however we have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with the additional information when you are finished and we will offer further assistance.

Thank you.

more ▼

answered Nov 23 '15 at 04:24 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

(comments are locked)
10|2000 characters needed characters left
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