ncsoft / Unreal.js

Unreal.js: Javascript runtime built for UnrealEngine
Other
3.68k stars 351 forks source link

Editor Crash on hot reload #263

Open heyzxz opened 5 years ago

heyzxz commented 5 years ago

Hi,

I had included "JavascriptComponent.h" in c++, and did some easy thing like this:

// JSActor is a BP actor, which already has a UJavascriptComponent attached.
UJavascriptComponent* JsCom = StaticCast<UJavascriptComponent*>(JSActor->GetComponentByClass(UJavascriptComponent::StaticClass()));

The Unreal Editor will get crash every time when I 'Build' the code (from VS).
I'm using Unreal 4.22.3 and UnrealJS 0.3.6 (which would be the currently latest version I think)

The Crash report shows below:


Unhandled exception

UE4Editor_V8_0011!v8::internal::tracing::TraceEventHelper::GetTracingController()
UE4Editor_V8_0011!v8::Function::Call()
UE4Editor_V8_0011!v8::CallJavascriptFunction() [e:\sanshi\ue4\byss\ckframework_dev\plugins\unrealjs\source\v8\private\functioncall.cpp:53]
UE4Editor_V8_0011!FJavascriptDelegate::Fire() [e:\sanshi\ue4\byss\ckframework_dev\plugins\unrealjs\source\v8\private\delegates.cpp:324]
UE4Editor_V8_0011!UJavascriptDelegate::ProcessEvent() [e:\sanshi\ue4\byss\ckframework_dev\plugins\unrealjs\source\v8\private\delegates.cpp:430]
UE4Editor_JavascriptEditor_0010!UJavascriptEditorTick::FJavascriptEditorTickSignature_DelegateWrapper() [e:\sanshi\ue4\byss\ckframework_dev\plugins\unrealjs\source\javascripteditor\javascripteditortick.h:21]
UE4Editor_JavascriptEditor_0010!FJavascriptEditorTick::Tick() [e:\sanshi\ue4\byss\ckframework_dev\plugins\unrealjs\source\javascripteditor\javascripteditortick.cpp:18]
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

FYI: It looks similar with this issue: https://github.com/ncsoft/Unreal.js/issues/86 , but with different crash reports.

keicoon commented 5 years ago

Hi. heyzxz. I checked how that is defined in cpp and found UJavascriptComponent class is defined by "BlueprintType" in uclass. ... it better use that in blueprint system. Thx.