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?
Flash7
(Flash7)
October 27, 2017, 9:26pm
2
have you tried to launch UE from VisualStudio in debug? That way you can see a stack trace what is exactly is failing.
newMenu is a class GRAFO_API AMenu : public APawn. Where I am wrong ?
Flash7
(Flash7)
October 30, 2017, 4:46pm
6
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 ?
Flash7
(Flash7)
October 30, 2017, 6:03pm
8
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:
but it does not work the same.
Flash7
(Flash7)
October 30, 2017, 7:02pm
10
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