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 Widget crashes editor upon replaying

I have some custom C++ being called in Blueprints for a Dialogue System. All of my dialogues work fine, except for two that crash the editor after replaying a few times. I'm getting invalid memory access errors. At first I thought it might have been Interface pointers, used in function pointers, not being cleaned up correctly on shutdown. (These are used to handle changing dialogue based on gamestate) I implemented BeginDestroy() methods to manually delete those pointers, and that just changes the stack trace when replaying.

For the dialogue system I have one UMG blueprint that displays the current dialogue, and depending on how many options the current dialogue has it creates that amount of versions of the Choice widget, and populates it with the text for that choice. Thinking that's what isn't being cleaned up properly. The choices get added to an array of choices that gets added to the parent vertical box, whenever a choice is made. The old values in the array get removed from the vertical box, and the array gets cleared as well.

Stack trace without deleting interface pointer

Stack trace with deleting interface pointer, and clearing interface Widget

Stack trace of ensuring choice widget array cleared on destroy

Blue prints responsible for removing Dialogue choices from screen:

Empty Array function RemoveFromUI event

This is on Linux, but the same issue happens on Windows as well. What's the proper way to ensure a UMG Widget gets destroyed, after stopping play?

Product Version: UE 4.13
Tags:
more ▼

asked Sep 17 '16 at 01:52 AM in Blueprint Scripting

avatar image

zerophase
138 8 17 25

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

0 answers: sort voted first
Be the first one to answer this question
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