Spawn Error SpawnActor failed because we are in the process of tearing down the world

when i try to go to mainmenu map unreal crash and “crash” say this " SpawnActor failed because we are in the process of tearing down the world " how can i do to solve this? is onlye from a random map to mainmenu, but the first time when i open my game i can spawn in mainmenu


Sounds like you are trying to spawn an actor while moving between levels. Do you get more information than this? When Unreal Crash it automatically “CTRL+C” with more crashInformation. Maybe you could get more information from it.

[2020.03.28-14.51.57:067][203]LogGameMode: Display: Match State Changed from InProgress to LeavingMap
[2020.03.28-14.51.57:068][203]LogGameState: Match State Changed from InProgress to LeavingMap
[2020.03.28-14.51.57:380][203]LogPackageName: SearchForPackageOnDisk took 0.312s to resolve MainMenuPrincipal.umap.
[2020.03.28-14.51.57:380][203]LogNet: Browse: /Game/ThirdPersonBP/Mapas/MainMenuPrincipal
[2020.03.28-14.51.57:381][203]LogLoad: LoadMap: /Game/ThirdPersonBP/Mapas/MainMenuPrincipal
[2020.03.28-14.51.57:381][203]LogSpawn: Warning: SpawnActor failed because we are in the process of tearing down the world
[2020.03.28-14.52.00:085][203]LogWindows: Error: === Critical error: ===
[2020.03.28-14.52.00:085][203]LogWindows: Error:
[2020.03.28-14.52.00:085][203]LogWindows: Error: Fatal error!
[2020.03.28-14.52.00:085][203]LogWindows: Error:
[2020.03.28-14.52.00:085][203]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x00000448
[2020.03.28-14.52.00:085][203]LogWindows: Error:
[2020.03.28-14.52.00:085][203]LogWindows: Error: [Callstack] 0x00007ffa7c6f2890 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:085][203]LogWindows: Error: [Callstack] 0x00007ffa7c6762ab UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:085][203]LogWindows: Error: [Callstack] 0x00007ffa7cfb1e5e UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:085][203]LogWindows: Error: [Callstack] 0x00007ffa7c63f720 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:085][203]LogWindows: Error: [Callstack] 0x00007ffa7cffb861 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ffa7cfa1d97 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ffa7d02a9a8 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ffa7c650201 UE4Editor-Engine.dll!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ff625ac6bb1 UE4Editor.exe!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ff625ad554c UE4Editor.exe!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ff625ad55ca UE4Editor.exe!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ff625ae316c UE4Editor.exe!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ff625ae5b8e UE4Editor.exe!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ffac2d27974 KERNEL32.DLL!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error: [Callstack] 0x00007ffac57ba261 ntdll.dll!UnknownFunction ]
[2020.03.28-14.52.00:086][203]LogWindows: Error:
[2020.03.28-14.52.00:131][203]LogExit: Executing StaticShutdownAfterError
[2020.03.28-14.52.00:615][203]LogWindows: FPlatformMisc::RequestExit(1)
[2020.03.28-14.52.00:628][203]Log file closed, 03/28/20 11:52:00

i try to dont spawn nothing, but the crash is there, i have a "load game " map and mode, but this dont spawn nothing, i try whitout this, but crash the editor, all time the error is the same, i try a lot of combinations but nothing, like a week ago this dosent happend, now i cant open my “mainmenu” map, i try in “stand alone” all the time, when i play in-editor all works fine!


It seems that something is trying to access a value which is a nullptr.
Are you using “IsValid” before you try to access a Pointer Variable (Actor/Component etc) ? :slight_smile:

yes, i have this “is valid” before the spawn

now i can open my main menu but wen i try back to mainmenu unreal crash, i underestand the error, is because my “spawn” is in event post login, and try to do this so fast, in the past week i solve other error, and now the spawn is more fast, and maybe this is the problem, i try put a delay before the spawn, but i cant “posses” my pawn, and i cant try back to main menu if i cant put pause and click in “back to main menu” in my pause hud, any idea? thx for ty to help

Are you using the same game mode for both MainMenu and for your Game?
What is it that you are trying to spawn using postlogin?

the same no, im using one “mainmenu gamemode” and the other is “ingame gamemode” i try to spawn my character, because you can choose them in a menu, and when you spawn ingame the spawner spawn this character, y try to “disconect” this spawn, but unreal crash whit the same error, i want put some “delay” but i cant “posses” this character if i do this


Normally Unreal have an option to automatically possess the actor, so I am a bit confused about why you’d use Postlogin as a good place to spawn the actor.

Could you explain how you are possessing the pawn, and why it does not work when you put a delay?

i do this, in the “gamemode” in event postlogin, i send to my “player controller” a order to spawn my character, the spawn is simple, “spaw actor from class” and then i posses them, i do this because i try to do a multiplayer game, this error is “new” for me, i have this configuration for a long time and never have this crash, now i try to put a hud in client side, but for some reason this work fine, and now the “spawn” is to fast, and when i try to open a new level the editor crash, in the past i have a lot of configuration to set the client hud, but for some reason this didnt work. in the past the spawn works fine but the hud no, in the present the hud works fine but the spawn no

PD : if i play “in-editor” ALL WORKS FINE!, i have this crash when i try in “stand alone” or in a packaged game

Wait what, you do this for a multiplayer game?

Do you also have seamless travel on?
I don’t have my computer in front of me but it could be that postlogin is being payed before the seamless travel event is done.
Either way I think you could try overriding “HandleStartingNewPlayer” in the gamemode and remove the spawning in postlogin.

To be clear, move the code with spawn functionality from “postlogin” to “HandelStartingNewPlayer”

i try this, but crash, and now for touch a lot of things, i have another error, thx epic i love this all day is a new bug day XD

is the only one for me, i try others but dosent work fine for me, i set a “travel map”, set “seamless travel” in all “gamemodes” and nothing, i set “none” in maps game mode, but nothing, crash, crash and crash…

Did you get the same crash message when you moved the code or is it a new message?

the same crash and error, the only change is the map name, because i try go to others, and nothing i try “open mapname” but crash XD only in stand alone or packaged game, in editor all works fine!

I think we first need to figure out if this is a multiplayer issue.

How do you repro this error?
Do you play through a normal server or dedicated server?
If not dedicated server, can you get this error while only being on the Server?
If you cannot get it with only the server, it is probably a network-related/Replication issue.
Try to do the same in PIE but with these values form the Link you can just put them in the output log:

the server create a game and the client connect searching this, the crash is for all, i try “single player” and crash, i try in server and in client and crash, i try a lot of things, i cant solve this, but is only when i play “whitout unreal engine” playing in editor all works fine i can move my chracter to all maps, and go back to the main menu, i cant underestand this, how can no crash in editor, and in the others yes we can crash

Oh, so it is not a multiplayer/network issue but probably a setup issue.

Play in editor “PIE” is not the same as a Packaged game. “PIE” does some extra stuff in the background, but it might be hard to notice if you are only working with Blueprints.
Also, a packaged game does not necessarily “pack” all of the content, for example, it should leave out the Developer folder.

Check the output log when you are packaging and check if something “essential” is missing or not being packaged.

Have you checked the crash log when you play as you put it: “without unreal engine”?
If you, for example, make a build you get a crash log in the Saved folder. You sometimes get more/different information.

i have the same error, im doing a lot of changes and nothing good happen xD any other idea? i read all logs and the error is the same, only change the map name, because i try to go to another to try, is like a error in the spawn, but the spawn and respawn works fine, and quit or alt-f4 works fine