[Bug] Editor crash after removing element of map in blueprint

My editor was built from source with VS2015 installed on win10, and I got following case causing editor crash in “play” mode:

When calling the function serveral times, the editor may hang or crash, and the project is built on an empty C++ project. I also find some points in investigation:
1, The problem seems related with last “keys” node. If that one was removed, editor “play” normal.
2. stack trace in crash report, seems wild at random place, to me it looks like a stack corruption.

extra question: Any way to export the problemtic assert? The “assert export” in editor seems exports “.Copy” file which can’t be imported to another project. I have uploaded the “testMapObj.uassert” in attachment, hope you can try it in your project.

[testObjMap.uassert][2]

This seems a major bug in Blueprint, could u have a look to this problem?

In the meanwhile, I’d like to write C++ codes to replace the “map” related, and how many differece between C++ TMap and Blueprint map? Is TMap Safe enough, tested in other projects? I hope to not start from very bottom code.

update:
sorry, following function results error, not the previous one. It construct uobjects and adds them to a map, then delete some element, then crash.

I don’t see logic errors in your BP. Maybe Construct node is taken much more than 1 frame? Try to make sure, put Is valid node right after you construct your maps.

In test I used a button of widget, in the event of click of which will trigger this logic. Yes this code may execute multiple times by click the button many times, but the crash happens randomly, some time crash/hang on the first click

You don’t get it. This node which constructs your map probably is too heavy to instantly give you the reference or complete a creation. Have you tried:

Or engine doesn’t like when you create a map and instantly destroy it at the same frame. Try to only create maps

Seems like this bug may crash your editor as well. Blueprint::Remove element from map and get keys after this - Blueprint - Unreal Engine Forums

it is the same problem. I currectly used C++ tmap, so far so good, but haven’t try tmap, hope EPIC Developer can give some guide about tmap(not the doc, I have viewed it, and just want to know more about memory management in tmap, tmap case).

Let’s wait for the official opinion)

Hey old xia-

Thank you for reporting this, I was able to reproduce the crash based on your first screenshot locally in 4.15. However, when I tested the same setup in the 4.16 preview the crash was no longer occurring. You should be able to use the setup shown in your screenshot in 4.16 without running into the same issue.

Cheers

nice to know improvement in preview, hope to meet 4.16 GA.