Cast to game instance makes editor crash at startup

Hello,
i am searching for help about my editor startup crash.

i found that the problem is comming from my cast to game instance.

i am doing a menu to get all the game items description in the main menu and when i add the cast to this menu it crashes, when i add it to the level blueprint to send it to the menu it crashes.
cast to the instance works on my others widget in the game level.

i tried to create another empty level to load the instance before comming to the main menu and the cast makes the editor startup crash too.

the error crash is always acces violation with a different error code each time like 0x000000…

Hey @MoKeT79, welcome to the forums!
I think you may have a memory leak. You most likely just have a nullptr that trying to be accessed. Here’s a link to a solved forum post about it, you may find the steps you need to fix it in there: [SOLVED] Access violation - code c0000005 (first/second chance not available) - #2 by ExtraLifeMatt

I hope this can help!
-Zen

i tried to find where is the memory leak but i can’t figure how it happens, i just try to add the cast to my custom game instance with nothing else and it crash at startup.

here is the log if you can find something helpfull

BananaInTime.log (157.2 KB)

any chance to see your Code?

Perhaps there is a timing problem, where you try to cast to something not fully initialized…

i tried to add a delay too and crash again. i also created a new widget just to cast the instance and write some values at the same place in the blueprint and it worked well.

i really don’t understand what is happening :confused:

1 Like