Editor crash on Level load (4.8 access violation)

After updating to 4.8 i seem to get a crash when switching between my levels. This happens with high likelyhood, something like 1st, 2nd or 3rd level that is opened seem to create this crash. This has started happeninng after 4.8. I have tried opening levels with vastly different assets, and most levelsseems to produce this error, but not all. So far I couldn’t find assets that are not in common between crashing and non crashing levels.

Edit: I have now also experienced same crash just when editing blueprints, same callstack.

The crash report:

Access violation - code c0000005 (first/second chance not available)

“”

UE4Editor_CoreUObject!UObjectBaseUtility::IsA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbaseutility.cpp:257]
UE4Editor_CoreUObject!FLinkerLoad::DeferPotentialCircularImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:375]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3751]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3876]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3286]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3842]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3876]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3286]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2581]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2689]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:997]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2274]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2322]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1827]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1737]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:627]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:371]
UE4Editor_CoreUObject!GetPackageLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linker.cpp:559]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:931]
UE4Editor_CoreUObject!ResolveName() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:677]
UE4Editor_CoreUObject!StaticLoadObjectInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:764]
UE4Editor_CoreUObject!StaticLoadObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:826]
UE4Editor_ContentBrowser!FAssetData::GetAsset() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\assetregistry\public\assetdata.h:178]
UE4Editor_ContentBrowser!SContentBrowser::OnAssetsActivated() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:1583]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,TTypeWrapper cdecl(TArray const & ptr64,enum EAssetTypeActivationMethod::Type)>::Execute() [d:\buildfarm\buildmachine++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:282]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,void cdecl(TArray const & ptr64,enum EAssetTypeActivationMethod::Type)>::ExecuteIfSafe() [d:\buildfarm\buildmachine++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:388]
UE4Editor_ContentBrowser!SAssetView::OnListMouseButtonDoubleClick() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\editor\contentbrowser\private\sassetview.cpp:3222]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper cdecl(TSharedPtr)>::Execute() [d:\buildfarm\buildmachine++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:282]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,void cdecl(TSharedPtr)>::ExecuteIfSafe() [d:\buildfarm\buildmachine++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:388]
UE4Editor_ContentBrowser!TBaseDelegate >::ExecuteIfBound() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:519]
UE4Editor_ContentBrowser!SListView >::Private_OnItemDoubleClicked() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\public\widgets\views\slistview.h:689]
UE4Editor_ContentBrowser!STableRow >::OnMouseButtonDoubleClick() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\public\widgets\views\stablerow.h:252]
UE4Editor_Slate!::operator()() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4101]
UE4Editor_Slate!FEventRouter::Route >() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:212]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonDoubleClickEvent() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4102]
UE4Editor_Slate!FSlateApplication::OnMouseDoubleClick() [d:\buildfarm\buildmachine
++depot+ue4-releases+4.8\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4082]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:1348]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:1711]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:706]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsapplication.cpp:628]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:792]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2323]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Hi ,

Do you experience a crash in a clean, blank project with no additional content or is it limited to the one project? Is it limited to a particular map or any map in your project? Can you post your full crash report, you can find this at \Unreal Projects\PROJECTNAME\saved\logs. Upload the full .txt here so I can take a look. Thank you!

Hi ,
I don’t get any problems with a blank project or other project in general, it only seems to happen out main project. I have found that the crash is not exclusive to map loads, map loads just seems to trigger it more often.
I have attached log for the crash at a map load and i will attached another log when it crashes in another state the next time.
Thanks!

Hi, here is another crash log from when it happened when opening a blueprint.

What assets do these levels share in common? Additionally, what are the steps you take just before a crash occurs? Is it simply “Open map - crash” or are there any other steps you are taking just before these crashes happen?

After investigation further, the steps are:

  • Editor opens in map M1
  • I open map M2
  • I open map M3 → crash

The following two interactions will work however:

  • Editor opens in map M1

  • I open map M2

  • I reopen M1

  • Editor opens in map M1

  • I open map M3

  • I reopen M1
    (both can be repeated back and forth)

I have found that if a map, that causes the crash, is in the chain, whether it was the last or second to last to be loaded, it will crash.
So i can open a ‘bad’ map up if it’s the first and then whichever map is loaded after will crash on load.

After using ½-1 hour looking through assets I have not found any particular asset which does not exist in both maps that are ‘good’ and ‘bad’.

But the investigation was just done on my computer and it seems, it might also crash at different times for the other people who work on the project.

Update: It all seems very fragile, and update to the savegame code (c++), caused the menu level which uses it to become unstable. The first level change from or to that will now cause a crash… from other maps it’s still the third map which crashes…it all seems iritatingly random :confused:

But if you just have any idea on how to continue debugge it would be very helpfull, this crash is really talking up alot of time for us :slight_smile:

How much of the project is in C++? Are you using the binary or source build? Additionally, do these crashes occur if you pull the contents of your contents folder out of the project entirely or is it limited to when you have assets in the project at all? What is the code you are implementing doing exactly? Is this code only relevant in the second map or does it occur in all maps but only seems to be crashing when you go from map2 to map3?

We encounter the same problem with half of our map, looks like Import.XObject for ImportMap[38] is something that has already been freed. I’ve attached the screenshot.

Here is some more info, looks like the very first startup map (specified in DefaultEngine.ini) usually load fine, this problem occurs when trying to load a different map.

I would say about half the project is in c++. I can first check pulling out all content on Monday, so i will come back to you on that. The code i changed in the savegame file was only relevant to map1 and it was used to spawn items for out characters using a class description, but other maps still crashes without using these elements. Maps M1, M2 and M3 was just examples, we have many maps that can fit in the three spots and replicate the error in the same way. The crash both happens when doing M1->M2->M3 but also M1->M3->M2 or something like M1->M2->M1->M3.
I can first do more debugging on monday, do you have any suggestions on what i can do besides trying to pull all content out?
Thanks

Okay some updates from todays debugging:

I have tried copying the project and remove all content except maps = i don’t get the crash.
I tried making empty levels = no crash
We are doing a board game, so i tried to put one piece/unit into the test levels = no crash.
Each unit has a Unit definition:

UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Unit Definition", ReplicatedUsing=OnRep_Description)
	FUnitDescription Description;

Defined like:

USTRUCT(Blueprintable)
struct FUnitDescription
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Unit)
	TSubclassOf<AUnitPawn> TemplateClass;

	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Unit)
	TArray< TSubclassOf<ABattleItemBase> > Equipment;

	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Unit)
	TArray< TSubclassOf<UUnitAbility> > Abilities;
};

In the editor, we use this definition to setup which items a unit will start with on a certain level. I could make the simple test levels get the same crash by adding a weapon to each unit and then switching between the levels. In this crash each level contains a unit with an item in the UnitDescription (items are spawned when the game start). This crash doesn’t happen right when you add the items to the units and switch between levels in the editor, you have to close down the editor first and then reopen it. When you have reopened the editor, first load 1 of the test level and on loading the second level, the crash will occur.

So so far it looks like the second level loaded which contains an item, will make it crash.

I looked into out structure of items which is a bit complex. First We have a c++ class as base called BattleItemBase, then we have a number of blueprints in a hierarchy. BattleItemBase->BP_ItemBase->BP_WeaponBase->BP_SwordBase->Concrete_weapon_blueprint.

The BP_ItemBase blueprint will define some events that Concrete_weapon_blueprint will overwrite, the rest of the classes just change variables from the c++ class. In my weapon crash example above i found that only weapons made the crash and not other items, so i reparented the weapons in the crash to BP_WeaponBase instead of BP_SwordBase, which worked. So i fixed my small crash example.

But after much debugging i have found that reparenting all item blueprints doesn’t remove the bug from all normal levels. I’m still trying to dig further.
I have tried to remove all unit and weapon content, and this seems to sove the problem… however this part contains a major part of the whole project. Removing just unit assets or just item assets will still make map loads crash.
I will keep on trying to debug, but any ideas would help.
Thanks

I found a work around, just to be clear, this is not a FIX but simply a work around for a trashed pointer. In LinkerLoad.cpp, the CreateImport() function, add this right after Import is defined.

if(Import.XObject && !Import.XObject->IsValidLowLevel())
{
    Import.XObject = NULL;
}

More information about this, the XObject that always crashed seems to be a PlaceholderFunction for UserConstructionScript. Here is the log when things are working correctly

[2015.07.13-23.11.35:861][  0]LogLinker: FLinkerLoad::CreateImport: [ObjectName=Function][Filename=../../../Combat/Content/Characters/NPCs/SnakeMen/SnakeWarrior/Snakeman_Warrior_01_BP.uasset][/Script/CoreUObject][Class][Function] 19
[2015.07.13-23.11.35:861][  0]LogLinker: FLinkerLoad::CreateImport: [ObjectName=UserConstructionScript][Filename=../../../Combat/Content/Characters/NPCs/SnakeMen/SnakeWarrior/Snakeman_Warrior_01_BP.uasset][/Script/CoreUObject][Function][Function_486] 38

When I attempt to load a 2nd map, here is the log, where Import Index 38 has an invalid Import.XObject pointer, but once I reset it to NULL, everything load just fine.

[2015.07.13-23.13.11:268][749]LogLinker: FLinkerLoad::CreateImport: [ObjectName=Function][Filename=../../../Combat/Content/Characters/NPCs/SnakeMen/SnakeWarrior/Snakeman_Warrior_01_BP.uasset][/Script/CoreUObject][Class][Function] 19
[2015.07.13-23.13.11:268][749]LogUObjectArray:Warning: Invalid object index -572662307
[2015.07.13-23.13.23:979][749]LogLinker: FLinkerLoad::CreateImport: [ObjectName=UserConstructionScript][Filename=../../../Combat/Content/Characters/NPCs/SnakeMen/SnakeWarrior/Snakeman_Warrior_01_BP.uasset][/Script/CoreUObject][Function][Invalid] 38

The real fix should really be fixing the problem with dangling Import.XObject pointer.

Thanks
Wa

Hi Wa
So far i had only downloaded the engine through the launcher, but i will try to download it through GitHub to see it i can get the project to run with your work around.
The state which seem to cause this bug in our project seems to chains of inheritance.
So a blueprint->blueprint->blueprint->c++ class (-> meaning inherits from), does your project contain bigger chains like this or is it only in our project this seem to be the case?
I’m trying to see if i could find exactly what causes the state in our code.

Thanks
Jens-Emil

Just a little more info, when i start debugging from Visual i get a few errors:

Ensure condition failed: ToPin->LinkedTo.Contains(this) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 148] 
UEdGraphPin::BreakLinkTo Pin '' on node 'None' not reciprocally linked with pin 'ReturnValue' on node 'Outputs'
UE4Editor.exe has triggered a breakpoint.

There are 3 failures all with the weak description on node ‘None’. I hope this can help judge what is wrong right now.
Thanks
/Jens-Emil

Yes, we have a C++ class inherit form ACharacter, and then 3-4 level of inheritance in the blueprint. We have all sort of event that broadcast from either code or blueprint and have handler scattering around blueprint and even the level blueprint. What I found was the trashed pointer used to be “ULinkerPlaceholderFunction”, which is a placeholder for the “UserConstructionScript” function, which I assume is the “constructor” of the blueprint. I’m not sure if there is anyway to get around it on the blueprint side.

Hey -

I tried to create a new actor class as well as a blueprint based on it and other blueprints each bases on the new BP before it. This created a hierarchy chain starting at the new class and ending at BP5. After creating multiple levels I tried to switch between the levels in the editor and did not crash. Are you referring to switching levels within the editor or in the game itself? Also, would it be possible for you to send a sample project so I can see the crash directly? If you can’t get the crash to reproduce in a blank project you can upload your current project to dropbox and send me a private link on the forums.

Cheers

Hi, i will send you a link in a bit, my upload is slow where I’m sitting, but maybe in 3-4 hours you will get a think.
Thanks!

Jens-Emil

Just for your reference, I applied this fix that they recommended in another post and I was able to load the maps without the crash.

https://github.com/EpicGames/UnrealEngine/commit/817caf68c5724c04e0eb72a099eccf00746ebe89