DestructibleMesh crush engine

After upgrade project from 4.10 to 4.12 when DM take some damage, engine get the error. DM i put in Blueprint:

When DM not in Blueprint his destruction works correctly
Access violation - code c0000005 (first/second chance not available)

UE4Editor_RoyaleShooter_4066
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:5077]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:641]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2060]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:866]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:765]
UE4Editor_CoreUObject!UObject::execVirtualFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2166]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:866]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:5077]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1245]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\actor.cpp:639]
UE4Editor_Engine!FLatentActionManager::TickLatentActionForObject() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:174]
UE4Editor_Engine!FLatentActionManager::ProcessLatentActions() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:104]
UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1241]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1349]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:368]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2775]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launch.cpp:148]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

When bullet hit some surface i spawn decal and put on this surface. For increase fade distance of decal i write custome node. If i switch of this node DM works correctly.

and code of this node
.h

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "RoyaleFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class ROYALESHOOTER_API URoyaleFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
public:

	UFUNCTION(BlueprintCallable, Category = "RoyalCustomNode")
	static void SetFadeScreenSize(class UDecalComponent* Decal, float FadeScreenSize);
	
	
};

.cpp

#include "RoyaleShooter.h"
#include "RoyaleFunctionLibrary.h"

void URoyaleFunctionLibrary::SetFadeScreenSize(class UDecalComponent* Decal, float FadeScreenSize)
{
	Decal->FadeScreenSize = FadeScreenSize;
}

Hello CyberKatana,

Have you tried running the project in Debug to see where the crash is occurring? I’m assuming since you pointing out this single node that this is where you believe the crash is occurring?

From the error message “Access violation - code c0000005 (first/second chance not available)”, this is something to do with a null pointer being referenced.

My knowledges is not enough, where i can read more about debug mode and what i must try to find? But i have one more bug, may be this errors is linked: Error when add new class from editor - C++ - Unreal Engine Forums

1)Visual Studio for some reason worked very strange(same strange actions and i fix it)
2) You was right it was null pointer. Fixed it so

void URoyaleFunctionLibrary::SetFadeScreenSize(class UDecalComponent* Decal, float FadeScreenSize)
         {
             if (Decal)
             Decal->FadeScreenSize = FadeScreenSize;
         }