EXCEPTION_ACCESS_VIOLATION UE-4.15.2-RELEASE 0x00000178

Hello!

I have developed an application with the version 4.15.2 installed through the Epics Game Library and my application worked. Then I tried to replace it with the same version compiled directly from the source code. When I start my application I have this error:

=== Critical error: ===

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000178

UE4Editor-Engine.dll!AActor::SetActorScale3D() [d:\unrealengine-4.15.2-release\unrealengine-4.15.2-release\engine\source\runtime\engine\private\actor.cpp:3306]
UE4Editor-Grafo-8500.dll!APrincipale::posizionaMenu() [d:\users\nicola capece\desktop\grafo\source\grafo\principale.cpp:462]

I attach the log file
[1]: 218103-grafo-backup-20171027-145406.log (93.5 KB)

Please can anyone help me?

have you tried to launch UE from VisualStudio in debug? That way you can see a stack trace what is exactly is failing.

What does this mean ?

newMenu is a class GRAFO_API AMenu : public APawn. Where I am wrong ?

your newMenu is null. Are you spawning it?

AMenu* newMenu;

UPROPERTY(EditAnywhere, Category = “Possible object”)
TSubclassOf menuOne;

newMenu = GetWorld()->SpawnActor(menuOne, posizione, FRotator(0, 90, 0), spawnParams);

after calling the function SpawnActor, newMenu is NULL ? do you have any suggestions ?

your menuOne is not valid for example. You ALWAYS have to check if pointers are valid.

I am sorry, the correct definition of menuOne is:

218447-error4.png

but it does not work the same.

you need to assign a value to menuOne.

if you just want to spawn AMenu, why don’t you spawn it like this:
GetWorld()->SpawnActor(params).

Yes, I do this. I wrote it in the previous post

I have found a solution, I used:

spawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;

Thanks for your interest