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
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.
Blue prints responsible for removing Dialogue choices from screen:
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?
Follow this question
Once you sign in you will be able to subscribe for any updates here