Skip to content

UJavascriptComponent hot reload issue (UE 4.12.3) #86

Open
@Akimi

Description

@Akimi

Hi, I have strange issue with hot reload. I am trying to attach UJavascriptComponent in C++. I have added a new property of type UJavascriptComponent. When hot reload is now initiated the editor crashes with following crash report:

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

UE4Editor_V8_5339!v8::internal::Isolate::FindOrAllocatePerThreadDataForThisThread()
UE4Editor_V8_5339!v8::internal::Isolate::Enter()
UE4Editor_V8_5339!FJavascriptDelegate::Fire() [d:\unreal\unrealjstest\plugins\unrealjs\source\v8\private\delegates.cpp:305]
UE4Editor_V8_5339!UJavascriptDelegate::ProcessEvent() [d:\unreal\unrealjstest\plugins\unrealjs\source\v8\private\delegates.cpp:404]
UE4Editor_JavascriptEditor!UJavascriptEditorTick::FJavascriptEditorTickSignature::ExecuteIfBound() [d:\unreal\unrealjstest\plugins\unrealjs\source\javascripteditor\javascripteditortick.h:20]
UE4Editor_JavascriptEditor!FJavascriptEditorTick::Tick() [d:\unreal\unrealjstest\plugins\unrealjs\source\javascripteditor\javascripteditortick.cpp:19]
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

I am using UE 4.12.3.

This is my source header

#pragma once
#include "GameFramework/GameMode.h"
#include "V8/Public/JavascriptComponent.h"
#include "UnrealJSTestGameMode.generated.h"

UCLASS()
class AUnrealJSTestGameMode : public AGameMode
{
    GENERATED_BODY()

public:
    AUnrealJSTestGameMode();

    virtual void BeginPlay() override;

    UPROPERTY()
    UJavascriptComponent* JavascriptComponent;
};

and cpp file (I don't actually need to create instance of UJavascriptComponent to crash editor):

#include "UnrealJSTest.h"
#include "UnrealJSTestGameMode.h"
#include "UnrealJSTestHUD.h"
#include "UnrealJSTestCharacter.h"
#include "Engine.h"

#include "V8/Public/JavascriptContext.h"
#include "V8/Public/JavascriptIsolate.h"
#include "V8/Public/IV8.h"

AUnrealJSTestGameMode::AUnrealJSTestGameMode()
    : Super()
{
    // set default pawn class to our Blueprinted character
    static ConstructorHelpers::FClassFinder<APawn> PlayerPawnClassFinder(TEXT("/Game/FirstPersonCPP/Blueprints/FirstPersonCharacter"));
    DefaultPawnClass = PlayerPawnClassFinder.Class;

    // use our custom HUD class
    HUDClass = AUnrealJSTestHUD::StaticClass();
}

void AUnrealJSTestGameMode::BeginPlay()
{
    Super::BeginPlay();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions