EXCEPTION ACCESS VIOLATION occurring seemingly randomly, without a certain cause.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION 0x0000000000000000

I’ve been experiencing crashes caused by the above exception, the cause of which I don’t know.

I’ve made some changes to the source code, changes that work and pass compilation, and yet following the compilation of the project I begun receiving these exceptions in and out of PIE:

  • I’ve encountered the exception after doing anything following an action performed in my game.

I also got a bunch of these (with many more UnrealEditor_SlateCore and UnrealEditor_Slate than present):
UnrealEditor_AssetRegistry
UnrealEditor_AssetRegistry
UnrealEditor_AssetRegistry
UnrealEditor_AssetRegistry
UnrealEditor_ContentBrowserAssetDataSource
UnrealEditor_ContentBrowserData
UnrealEditor_ContentBrowserData
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate

a 0x0 exception is a nullptr exception. You are trying to access a variable that is uninitialized => it’s a null pointer. You need to do checks before accessing pointers if you are not a 100% sure they are valid.

Seeing as exception is pointing towards slate then I would suggest looking into any UI code that might be accessing slates or widgets.

Yeah, that was the cause. I went over my code and found that I made a weird pointer at a certain point, one which was completely unnecessary. I made it a reference instead and the crashes have stopped, so it probably was just a silly mistake on my end.

Thanks!