Widgets sometimes crashes UE 4.7.2

Hi, I am creating an inventory that uses widgets. After having the game running for a while (sometimes a minute sometimes 5 and sometimes not occuring at all) the editor crashes with this error report:

Assertion failed: IsValidIndex(Index) && ChunkIndex < NumChunks && Index < MaxTotalElements [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\Core\Public\UObject\NameTypes.h] [Line: 310]

Im not sure what it is causing it, I thought it could have something to do with me adding too many slots, but I’m currently not adding any slots at all in run time. What makes it real hard to trace is that it happens without me inputing anything. I just let it run and it crashes at what seems to be somewhat random times.

Is this a known problem of any sort?

Hello NNL,

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 reproduce 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. If not, could you provide your project so that I could take a closer look?
  4. Could you provide screen shots of the blueprints and widgets involved in this issue?
  5. Could you provide your log files as well as the crash report in the form of an attachment?
  6. When you say that it crashes when the game in running, could you tell me exactly what form you are running it in?(Examples: PIE(play in editor), Standalone, Launch to windows ect.)

Thank you for the respond Rudy,

About reproducing it, I get this error about once every 3rd hour. I’ve tried to make it occur more steadily but without success. I’m afraid that the only lead I have is that it started when I started using widgets. I’ve had it for a couple of days and I’m still only changing widget related blueprints.

I did start using Git about the same time if that could be a possible reason. I took the blueprints I’m using at the time and put them in a new project. That plus the log file from the crash is included in the zip.

I’m sorry that it is so vague.

link text

Hello NNL,

I am unable to reproduce this issue on our end with the information provided. When you say that you started using “Git” do you mean GitHub? If so, could you tell me about any changes you have made?

Also, it is good to see that my example drag and drop system is being used.

Well Rudy, I’m not sure what you mean by changes. I had the project on github and used it to sync and so on. All I did was to activate the source control in unreal.

I’ve pretty much given up on finding this crash as it happens very sporadically and I can’t seem to track it down.

On the subject of your system, I fixed it up a bit but I can’t seem to find a way to create image references in run time and assign them, you don’t happen to know a way or have a link to something that could help?

Hello NNL,

On the subject of the crash:

If you would like to continue investigating this issue at any point feel free to reopen this post and I will be more than happy to assist you further. I am going to mark this issue as answered for tracking purposes.

As for creating an image reference at run time:

If you mean that you would like to be able to create images in UMG dynamically, you can do so by making another widget with nothing but an image in it. Then use a master widget to spawn the image widget using the “create widget” node. From there you will simply add it to the viewport. If you would like to make any changes to the individual images you can use a “Get all Widgets of Class” node and run that into a “ForEachLoop” or “ForLoop” node and then pull out the properties that you would like to change. I hope this helps.

Make it a great day

It seems the garbage collector is a culprit here. I had the same issue and fixed it by adding an UPROPERTY() attribute to < UUserWidget* > declaration.