I'm trying to create a 3D board game in UE 4.26.2 and one morning my project just started crashing the editor every time I opened it, yet it was working fine the night before. The error message is EXCEPTION_ACCESS_VIOLATION writing address 0x0000000000000008. I've managed to narrow down the problem and re-create it in a blank project, but I'm still not sure why its happening. The code works fine when I create it, but as soon as I close the project and re-open it, it crashes.
How to replicate the problem
Create an empty BluePrint project
Create two blueprints, both derived from Actor, named BP_TileMap and BP_Tile
Create a child class from BP_Tile named BP_Tile_A
Create two structures named BoardLayout and LayoutRow
In LayoutRow create one variable named Column with the type set to an Array of BP_Tile -> Class Reference
Add a few default values and leave them set to None
In BoardLayout create one variable named Row with the type set to an Array of LayoutRow
Add two default values and set each of the Column values to BP_Tile_A
In BP_Tile create a variable named TileMap, set its type to a BP_TileMap reference and make it instance editable and exposed on spawn
In BP_TileMap create a variable named Tiles with the type set to an Array of BP_Tile
Then create a variable named Layout with its type set to BoardLayout
Next create a function called ResetMap and enable call in editor
Copy the graph below which loops through the Column's in each Row of the BoardLayout, spawns the referenced class (I.e. BP_Tile_A), sets the new tile's TileMap to self and adds it to the Tiles array.
Drag a BP_TileMap into the default level and run the ResetMap function from the details panel.
The result should look like below, which as you can see works fine. But if you save and close the project at this point, it will crash the next time you open the project.
My guess is that its trying to access an object which hasn't been loaded into memory yet when opening the project, and that the object was already in memory when I first created it, hence the function working initially? But I can't figure out why or what I need to change to fix it.
Any help would be appreciated.
Stack Trace (with symbols installed)
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x0000000000000008
UE4Editor_CoreUObject!UObjectBase::UObjectBase() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBase.cpp:109]
UE4Editor_CoreUObject!StaticAllocateObject() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:2500]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:3689]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4707]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3482]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3647]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1343]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4987]
UE4Editor_CoreUObject!FLinkerLoad::ResolveDependencyPlaceholder() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:1577]
UE4Editor_CoreUObject!FLinkerLoad::ResolveDeferredDependencies() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:1328]
UE4Editor_CoreUObject!FLinkerLoad::ResolveDeferredDependencies() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:1454]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4120]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4830]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3482]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3647]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1343]
UE4Editor_CoreUObject!LoadPackage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1458]
UE4Editor_CoreUObject!StaticLoadObjectInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:871]
UE4Editor_CoreUObject!StaticLoadObject() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:924]
UE4Editor_CoreUObject!FObjectPropertyBase::FindImportedObject() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyBaseObject.cpp:495]
UE4Editor_CoreUObject!FObjectPropertyBase::ParseObjectPropertyValue() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyBaseObject.cpp:336]
UE4Editor_CoreUObject!FObjectPropertyBase::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyBaseObject.cpp:369]
UE4Editor_CoreUObject!FObjectProperty::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyObject.cpp:142]
UE4Editor_CoreUObject!FClassProperty::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyClass.cpp:100]
UE4Editor_CoreUObject!FArrayProperty::ImportTextInnerItem() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyArray.cpp:541]
UE4Editor_CoreUObject!FArrayProperty::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyArray.cpp:502]
UE4Editor_CoreUObject!FProperty::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h:351]
UE4Editor_CoreUObject!FProperty::ImportSingleProperty() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Property.cpp:1464]
UE4Editor_CoreUObject!UScriptStruct::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:2812]
UE4Editor_CoreUObject!FStructProperty::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyStruct.cpp:293]
UE4Editor_CoreUObject!FArrayProperty::ImportTextInnerItem() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyArray.cpp:541]
UE4Editor_CoreUObject!FArrayProperty::ImportText_Internal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyArray.cpp:502]
UE4Editor_CoreUObject!FProperty::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h:351]
UE4Editor_UnrealEd!FBlueprintEditorUtils::PropertyValueFromString_Direct() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\Kismet2\BlueprintEditorUtils.cpp:8819]
UE4Editor_UnrealEd!UUserDefinedStructEditorData::ReinitializeDefaultInstance() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UserDefinedStructEditorData.cpp:209]
UE4Editor_Engine!UUserDefinedStruct::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\UserDefinedStruct.cpp:133]
UE4Editor_Engine!UUserDefinedStruct::Serialize() [D:\Build\++UE4\Sync\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\UserDefinedStruct.gen.cpp:224]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4073]
UE4Editor_Engine!UUserDefinedStruct::RecursivelyPreload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\UserDefinedStruct.cpp:338]
UE4Editor_CoreUObject!PreloadInnerStructMembers() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyStruct.cpp:31]
UE4Editor_CoreUObject!FStructProperty::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyStruct.cpp:224]
UE4Editor_CoreUObject!UStruct::SerializeProperties() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:1760]
UE4Editor_CoreUObject!UStruct::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:1865]
UE4Editor_CoreUObject!UClass::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:4320]
UE4Editor_Engine!UBlueprintGeneratedClass::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp:1725]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4073]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4830]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3482]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3647]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1343]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::CreateImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4987]
UE4Editor_CoreUObject!FLinkerLoad::ResolveDependencyPlaceholder() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:1577]
UE4Editor_CoreUObject!FLinkerLoad::ResolveDeferredDependencies() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:1403]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4120]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:4830]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3482]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3647]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1343]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2562]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2405]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:808]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:470]
UE4Editor_CoreUObject!GetPackageLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Linker.cpp:815]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1234]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2562]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2405]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:808]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:470]
UE4Editor_CoreUObject!GetPackageLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Linker.cpp:815]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1234]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2562]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2405]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:808]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:470]
UE4Editor_CoreUObject!GetPackageLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Linker.cpp:815]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1234]
UE4Editor_CoreUObject!<lambda_35e7e9d57300e3e17d738623778b7fa6>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3033]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3126]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3154]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2790]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2562]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:2405]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:808]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:470]
UE4Editor_CoreUObject!GetPackageLinker() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Linker.cpp:815]
UE4Editor_CoreUObject!LoadPackageInternal() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1234]
UE4Editor_CoreUObject!LoadPackage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1458]
UE4Editor_UnrealEd!UEditorEngine::Map_Load() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp:2664]
UE4Editor_UnrealEd!UEditorEngine::HandleMapCommand() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp:6204]
UE4Editor_UnrealEd!UEditorEngine::Exec() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp:5705]
UE4Editor_UnrealEd!UUnrealEdEngine::Exec() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdSrv.cpp:697]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\FileHelpers.cpp:2554]
UE4Editor_UnrealEd!FEditorFileUtils::LoadDefaultMapAtStartup() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\FileHelpers.cpp:4043]
UE4Editor_UnrealEd!FUnrealEdMisc::OnInit() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdMisc.cpp:359]
UE4Editor_UnrealEd!EditorInit() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdGlobals.cpp:115]
UE4Editor!GuardedMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:149]
UE4Editor!GuardedMainWrapper() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!WinMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
UE4Editor!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
Related
The Master of vsoDoc can integrate Masters with the same name at drop time by using the MatchByName method.
However, it may not work well in some cases, and we are investigating the cause.
Which property does MatchByName refer to to integrate Master? Is it Master.Name? Or is it Master.NameU?
If you divide the case
The copy destination is Master (vsoDoc.Masters) of the visio file (A.vsdx).
There can be two cases for the copy source.
One is to copy the Shapes of the visio file (B.vsdx)
Or drop it from the vssx file (X.vssx) to A.vsdx.
When copying Shapes, do you refer to the Name or NameU of each Master?
Since the ReplaceShame method changes the name of Master,
I am dealing with the new Master and the old Master by swapping the names with the following procedure.
First, in preparation for ReplaceShape, change the MatchByName of all vsoMasters to False.
Then "Replace Shape" all vsoShape
For Each vsoMaster in vsoMasters
vsoMaster.MatchByName = False
Next
Remove the replaced Master from Masters
For Each vsoPage In vsoDoc.Pages
For Each vsoShape in vsoPage.Shapes
If Not (vsoShape.Master is Nothing) then
vsoShape.Master.MatchByName = False
Set vsoShape = vsoShape.ReplaceShape(vssxMasters.ItemU(vsoShape.Master.NameU), 1)
end if
Next
Next
Remove the replaced Master from Masters
For Each vsoMaster in vsoMasters
If InStr(vsoMaster.Name, ".") == 0 then
vsoMasters.ItemU(vsoMaster.NameU).Delete
end if
Next
Change MatchByName of all vsoMasters to True
For Each vsoMaster In vsoMasters
vsoMaster.MatchByName = True
Next
For Each vsoPage In vsoDoc.Pages
For Each vsoShape in vsoPage.Shapes
vsoShape.Master.MatchByName = True
Next
Next
vsoDoc.SaveAs NewName
############################################################
I examined the phenomenon related to MatchByName in three cases.
MatchByName = True in all of the following cases.
Case A-1
When using Master (NameU: "test") of the same stencil file (M.vssx)
Procedure
Place the "test" stencil in the A.vsdx file.
Copy the A.vsdx file and create the A-1_copy.vsdx file
Copy the "test" stencil in which A_copy.vsdx, and pasting it into the A.vsdx file.
Result
As expected, MatchByName works fine and the document stencil Masters doesn't increase.
Case B
Create a Master (NameU: "test") in the stencil file (M-1.vssx)
Create another Master (NameU: "test") in another stencil file (M-2.vssx)
In this case B, the Master Name U is same, but the Base ID and Unique ID are different. I think this is an important point.
Case B-1
Procedure
Place the "test" stencil of the M-1.vssx in the B.vsdx file.
Place the "test" stencil of the M-2.vssx in the C.vsdx file.
Copy the "test" stencil from the C.vsdx file and paste it into the B.vsdx file.
MatchByName doesn't work. "test.10" is added to the document stencil.
I suspect that this is because the stencil's BaseID and UniqueID are different.
Case B-2
Procedure
Place the M-1.vssx "test" stencil in the B.vsdx file.
Launch another VISIO application and drop the "test" stencil of M-2.vssx into the B.vsdx file.
Result
Unlike the B-1 result, MatchByName WORKS.
ćI can not understand the cause.
The following code is the code to rewrite the XML file in the vsdx file. By rewriting the Unique ID of the Masters of the vsdx file and the vssx file, MatchByName can be operated as expected.
import zipfile
from pathlib import Path
import xml.etree.ElementTree as ET
import sys
import shutil
import os
# https://yuukou-exp.plus/handle-xlsx-with-python-intro/
# https://livingdead0812.hatenablog.com/entry/2019/07/18/183322
# https://pg-chain.com/python-xml-read-write
# https://note.com/you_memolog/n/ne7d9e8d8a0d3
# https://stackoverflow.com/questions/16721010/write-a-xssfworkbook-to-a-zip-file
#visiopath = Path(sys.argv[1])
visiopath = Path(r"Flowchart_v1.0.17.vssx")
folderpath = visiopath.parent
xml_path = None
with zipfile.ZipFile(visiopath) as zf:
for info in zf.infolist():
if "masters.xml" in info.filename:
xml_path = info.filename
archive = zipfile.ZipFile(visiopath)
#archive = zipfile.ZipFile(visiopath, "w")
print(f"xml_path {xml_path}")
NameU_UniqueID_dict = {'OPERATOR' : '{00FBF49C-0014-0000-8E40-00608CF305B2}',
'TERMINATOR' : '{00634DFF-0015-0000-8E40-00608CF305B2}',
'BRANCH' : '{07639B38-0034-0000-8E40-00608CF305B2}',
'SQUARE' : '{07622477-0012-0000-8E40-00608CF305B2}',
'STARTER' : '{00489A6D-0032-0000-8E40-00608CF305B2}',
'CONNECTOR' : '{006BE21A-0004-0000-8E40-00608CF305B2}',
}
if xml_path is not None:
tree = ET.parse(archive.open(xml_path))
root = tree.getroot()
for child in root:
if child.attrib['NameU'] in NameU_UniqueID_dict.keys():
UniqueID = NameU_UniqueID_dict[child.attrib['NameU']]
child.attrib['UniqueID'] = UniqueID
tree.write('masters.xml')
print('finished writing.')
with zipfile.ZipFile(visiopath, 'a') as zf:
zf.write('masters.xml', arcname='visio\masters\masters.xml')
del archive
zippath = visiopath.with_suffix('.zip')
print(zippath)
print(visiopath)
shutil.move(visiopath, zippath)
shutil.unpack_archive(zippath, 'dir_out')
os.remove(zippath)
shutil.make_archive(zippath.parent / zippath.stem, format='zip', root_dir='dir_out')
#shutil.make_archive(zippath, format='zip', root_dir='dir_out')
shutil.move(zippath, visiopath)
When copying Shapes, do you refer to the Name or NameU of each Master?
NameU
When working with Visio objects, developers should always use universal names to reference their objects. This advice applies to more than names. A number of properties and methods in the Visio API have universal syntax equivalents. If you find a property and notice the same property exists but ending in a āUā, use the universal property. A classic example is to use the FormulaU property to get and set formulas instead of Formula.
Read more about Name and NameU
when you use ReplaceShape method in Document stecnil created new master, this new master have different Name and NameU anyway !
I have developing a new WMI instance provider and I am having a bit of trouble. I am able to register my provider successfully using regsvr32.exe. The regsvr32 application calls my implementation of DllRegisterServer and creates the following registry keys and values:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-00000000000F} : (default) = "WMI Provider"
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-00000000000F}\InprocServer32 : (default) = "C:\MyWmiProvider.dll"
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-00000000000F}\InprocServer32 : ThreadingModel = Neutral
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-00000000000F}\Version : (default) = 1.0.0
(Where {00000001-0000-0000-0000-00000000000F} is just a test Class ID (CLSID))
I am also able to successfully add my WMI class definitions defined in my Managed Object Format (MOF) file by using mofcomp.exe. I am able to verify that my definitions are present in the WMI repository by running the following command:
Get-CimClass -Namespace "root/MyNamespace" | Where-Object CimClassName -like "MyClass_*"
Here is an example of what my MOF file looks like:
#pragma namespace("\\\\.\\root\\MyNamespace")
#pragma autorecover
instance of __Win32Provider as $P
{
Name = "MyWmiProvider";
ClsId = "{00000001-0000-0000-0000-00000000000F}";
};
instance of __InstanceProviderRegistration
{
Provider = $P;
SupportsGet = FALSE;
SupportsPut = FALSE;
SupportsDelete = FALSE;
SupportsEnumeration = TRUE;
};
[dynamic, provider("MyWmiProvider")]
class MyClass_ExampleName
{
[key]
uint14 Id;
[PropertyContext("Name")]
String Name;
};
Now, if I run the following:
Get-CimInstance -Namespace "root/MyNamespace" -Class "MyClass_ExampleName"
This produces the following error in PowerShell:
Get-CimInstance : Provider load failure
At line:1 char:1
+ Get-CimInstance -Namespace "root/MyNamespace" -Class "MyClass_ExampleName"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (root/Surface:Device_Status:String) [Get-CimInstance], CimException
+ FullyQualifiedErrorId : HRESULT 0x80041013,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
Likewise, there are three (3) Event Viewer logs that are generated when this command is executed:
MyWmiProvider provider started with result code 0x80041013. HostProcess = wmiprvse.exe; ProcessID = 2144; ProviderPath = C:\MyWmiProvider.dll
Id = {FB6B3CF7-293E-0002-9316-73FB3E29D601}; ClientMachine = RTR-USERNAME; User = MYDOMAIN\username; ClientProcessId = 19416; Component = Unknown; Operation = Start IWbemServices::CreateInstanceEnum - root\MyNamespace : MyClass_ExampleName; ResultCode = 0x80041013; PossibleCause = Unknown
MyWmiProvider provider started with result code 0x80041013. HostProcess = wmiprvse.exe; ProcessID = 24636; ProviderPath = C:\MyWmiProvider.dll
(It is shown that WMI did find the DLL correctly)
I get similar results if I try calling Get-WMIObject, except the second Event Viewer log says the "Operation" was "Start IWbemServices::ExecQuery - root\MyNamespace : MyClass_ExampleName".
What exactly are Get-WMIObject and Get-CimInstance doing in the background?
I have looked up the source for Get-WMIObject [here] and despite the simple 6 lines, looking up the respect classes and function calls does not yield detailed specifics. My DLL interface only includes four (4) exported functions: DllGetClassObject(), DllCanUnloadNow(), DllRegisterServer(), and DllUnregisterServer(). I thought both Get-WMIObject and Get-CimInstance first made a call to DllGetClassObject() in order to get the WMI class factory, however if I place a function call to save a string to a temporary file within DllGetClassObject(), I notice when calling these PowerShell commands that no temporary file is created.
I got even more specific by creating a new project following this answer so that I could be able to call the following:
DEFINE_GUID(InstanceProviderClassID, 0x00000001, 0x00000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F);
IWbemServices * pLoc = NULL;
CoCreateInstance(InstanceProviderClassID, NULL, CLSCTX_INPROC_SERVER, IID_IWbemServices, (LPVOID *)&pLoc);
The call to CoCreateInstance() in this case was successful. I even noticed the temporary log file was created, indicating that DllGetClassObject() was in fact called!
Even if I take a working instance provider that I have and put this same printing statement (or similarly a call to create a registry key/value) in its DllGetClassObject() function, nothing is ever saved to indicate that this function is called when calling these PowerShell commands.
1. What am I missing here?
2. Why is the DllGetClassObject() function never called when executing both Get-WMIObject and Get-CimInstance?
3. Why am I able to execute CoCreateInstance() successfully, demonstrating my provider is coded correctly, but get a "provider load failure" when executing one of the PowerShell commands?
(A side note: In order to make things easy, I have labeled all service functions with WBEM_E_NOT_SUPPORTED. When this is done in the working instance provider, I still do not see "provider load failure," but rather "not supported.")
Get-CimInstance and Get-WmiObject both use .NET APIs to communicate with WMI. In the first case, it uses https://learn.microsoft.com/en-us/dotnet/api/microsoft.management.infrastructure and in the latter case uses https://learn.microsoft.com/en-us/dotnet/api/system.management. The main difference between these two is that the CIM APIs are cross-platform compatible, while the WMI APIs have Windows extensions to CIM that only work on Windows.
Whether you decide to use the PowerShell cmdlets, WMIC, wbemtest, or something else, they ultimately call the WMI COM API https://learn.microsoft.com/en-us/windows/win32/wmisdk/com-api-for-wmi to talk to WMI to talk to WMI Providers.
Did you follow https://learn.microsoft.com/en-us/windows/win32/wmisdk/writing-an-instance-provider? It doesn't seem like you may have implemented IWbemServices in your COM server?
I'm trying to use the xWebConfigKeyValue resource of the DSC module xWebAdministration to set multiple values on our application's web.config file. This is an excerpt from our configuration with the main activities surrounding the web.config changes:
Configuration C4M
{
Param(
[Parameter(Mandatory)]
[string] $BuildDropLocation
)
Import-DscResource -Module xWebAdministration
Node $AllNodes.NodeName
{
$managementPortalInstallPath = 'c:\Company\ManagementPortal'
File ManagementPortalContents
{
DestinationPath = $managementPortalInstallPath
SourcePath = "$BuildDropLocation\ManagementPortal"
Type = 'Directory'
Recurse = $True
}
xWebConfigKeyValue RecaptchaPublicKey
{
WebsitePath = $managementPortalInstallPath
ConfigSection = 'AppSettings'
Key = 'recaptchaPublicKey'
Value = $Node.RecaptchaPublicKey
DependsOn = '[File]ManagementPortalContents'
}
xWebConfigKeyValue RecaptchaPrivateKey
{
WebsitePath = $managementPortalInstallPath
ConfigSection = 'AppSettings'
Key = 'recaptchaPrivateKey'
Value = $Node.RecaptchaPrivateKey
DependsOn = '[File]ManagementPortalContents'
}
}
}
But when I try to run the configuration, I get the following error:
Add-NodeKeys : The key properties combination
'C:\Company\ManagementPortal::AppSettings' is duplicated for keys
'WebsitePath,ConfigSection' of resource 'xWebConfigKeyValue' in node
'myNode'. Please make sure key properties are unique for each
resource in a node. At line:160 char:9
+ Add-NodeKeys $keyValues $keyNames $keywordName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], InvalidOperationException
+ FullyQualifiedErrorId : DuplicateKeyInNode,Add-NodeKeys
After seeing the error, I took a look at the modules schema.mof file, and noticed that the appSettings key is not a key to the configuration at C:\Program Files\WindowsPowerShell\Modules\xWebAdministration\DSCResources\MSFT_xWebConfigKeyValue\MSFT_xWebConfigKeyValue.schema.mof:
[ClassVersion("1.0.0.0"), FriendlyName("xWebConfigKeyValue")]
class MSFT_xWebConfigKeyValue : OMI_BaseResource
{
[Key, Description("Path to website location(IIS or WebAdministration format)")] String WebsitePath;
[Key, Description("Config Section to be update"), ValueMap{"AppSettings"}, Values{"AppSettings"}] String ConfigSection;
[Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Required, Description("Key for AppSettings")] String Key;
[Write, Description("Value for AppSettings")] String Value;
[Write, Description("If the given key value pair is for attribute, default is element")] Boolean IsAttribute;
};
Since only the site path and config section are keys, I can't have multiple instances of the resource pointing to the same appSettings block but with different appSetting keys. How can I configure multiple appSetting keys then?
You can't configure two xWebConfigKeyValue resources in the same Configuration because, as you've found, the resource key only contains the WebsitePath and ConfigSection properties and doesn't discriminate on the Key property.
I think your immediate options are:
Create a new cWebConfigKeyValue resource module based on xWebConfigKeyValue, and add the "Key" attribute to the "Key" property in the "cWebConfigKeyValue.schema.mof" to fix it yourself.
or
Define the clashing resources in separate Configuration blocks. I've had to do this in a project that uses the xService resource.
Neither of these is a particularly good solution, but it might unblock you until a better fix comes along.
I have a Windows Service that uses Quartz.NET to execute jobs that are scheduled. I only want it to pick up a single job at a time. However, occasionally I am seeing behavior that indicates that it has picked up two jobs at once.
There are two log files (the regular one and one automatically generated when the regular one is in use) with jobs that start at the exact same time. I can see both jobs executing in the QRTZ_FIRED_TRIGGERS table, but only one has the correct instance ID, which is odd.
I have configured Quartz to use only a single thread. Is this not how you tell it to only pick up a single job at a time?
Here is my quartz.config file with sensitive values hashed out:
quartz.scheduler.instanceName = DefaultQuartzJobScheduler
quartz.scheduler.instanceId = ######################
quartz.jobstore.clustered = true
quartz.jobstore.clusterCheckinInterval = 15000
quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz
quartz.jobStore.useProperties = false
quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.OracleDelegate, Quartz
quartz.jobStore.tablePrefix = QRTZ_
quartz.jobStore.lockHandler.type = Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz
quartz.jobStore.misfireThreshold = 60000
quartz.jobStore.dataSource = default
quartz.dataSource.default.connectionString = ######################
quartz.dataSource.default.provider = OracleClient-20
# Customizable values per Node
quartz.threadPool.threadCount = 1
quartz.threadPool.threadPriority = Normal
Make the threadcount = 1.
<add key="quartz.threadPool.threadCount" value="1"/>
<add key="quartz.threadPool.threadPriority" value="Normal"/>
(as you have done)
Make each of your jobs "Stateful"
[PersistJobDataAfterExecution]
[DisallowConcurrentExecution]
public class StatefulDoesNotRunConcurrentlyJob : IJob /* : IStatefulJob */ /* Error 43 'Quartz.IStatefulJob' is obsolete: 'Use DisallowConcurrentExecutionAttribute and/or PersistJobDataAfterExecutionAttribute annotations instead. */
{
}
I've left in the name of the ~~older~~ version of how to do this (namely, the "IStatefulJob") and the error message that is generated when you code to the outdated "IStatefulJob" interface. But the error message gives the hint.
Basically, if you have 1 thread AND every job is marked with "DisallowConcurrentExecution", it should result in 1 job at any given time..running in "serial mode".
I have successfully opened a DBF Table:
String dbfDirectoryPath = "Z:/ESRI/data/washingtonCountyDataFiles/tlg_roads";
IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactory();
IWorkspace workspace = workspaceFactory.OpenFromFile(dbfDirectoryPath, 0);
IFeatureWorkspace featureWorkspace = workspace as IFeatureWorkspace;
String dbfTable = "tlg_roads_l.dbf";
ITable table = featureWorkspace.OpenTable(dbfTable);
Now I want to map it, which I think entails a call to mapControl.AddLayer(layer). So I need to convert this object from a featureWorkspace to a ILayer somehow.
It looks like I can just CreateFeatureClass and then cast to an ILayer, but there are 6 arguments for CreateFeatureClass including CLSID so I get the impression I am missing some conceptual points. Thanks for any advice : )
//IFeatureClass featureclass = tableWorkspace.CreateFeatureClass //req six args, incl. CLSID
ILayer layer = featureclass as ILayer;
mapControl.AddLayer(layer);
Apparently DBF files are not for viewing and only shape files are for rendering and apparently somehow the DBF contains data necessary for the shapefiles. This is what I was told anyway feel free to enlighten me.