GoaLitiuM / RmlUi

The RmlUi plugin for Flax Engine
MIT License
12 stars 3 forks source link

Plugin load exception #2

Closed Withaust closed 1 year ago

Withaust commented 1 year ago

This happens on https://github.com/FlaxEngine/FlaxEngine/commit/ca5cbf05befb6355ff3207609593db4c295ee7c3 and https://github.com/GoaLitiuM/RmlUi/commit/55ec8a439d5d1f295b87837270a48c2573a5ba18 Exception thrown at 0x00007FFC976805BE in FlaxEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

    00007ffc976805be()
    00007ffc97470cac()
    00007ffc9746d69c()
>   [Inline Frame] FlaxEditor.exe!CallStaticMethod(void *) Line 193
    FlaxEditor.exe!MMethod::Invoke(void * instance, void * * params, DotNetObject * * exception) Line 1285
    RmlUi.dll!RegisterRmlUiImporters() Line 71
    RmlUi.dll!RmlUiEditorPlugin::Initialize() Line 109
    FlaxEditor.exe!PluginManagerService::InvokeInitialize(Plugin * plugin) Line 119
    FlaxEditor.exe!PluginManagerImpl::LoadPlugin(MClass * klass, bool isEditor) Line 163
    FlaxEditor.exe!PluginManagerImpl::OnAssemblyLoaded(MAssembly * assembly) Line 187
    FlaxEditor.exe!PluginManagerImpl::OnBinaryModuleLoaded(BinaryModule * module) Line 256
    [Inline Frame] FlaxEditor.exe!Delegate<BinaryModule *>::operator()(BinaryModule *) Line 612
    FlaxEditor.exe!Scripting::LoadBinaryModules(const String & path, const String & projectFolderPath) Line 422
    FlaxEditor.exe!Scripting::LoadBinaryModules(const String & path, const String & projectFolderPath) Line 305
    FlaxEditor.exe!Scripting::Load() Line 520
    FlaxEditor.exe!ManagedEditor::Init() Line 228
    FlaxEditor.exe!Editor::Init() Line 664
    FlaxEditor.exe!Engine::Main(const wchar_t * cmdLine) Line 144
    FlaxEditor.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 55
Withaust commented 1 year ago

There seems to be an issue with hot-reloading assemblies, since sometimes when it does not outright crash, it spits out this:

[ 00:00:00.903 ]: [Warning] Failed to load 'S:\SpaceRisk/RmlUi/Binaries/RmlUiEditorTarget/Windows/x64/Development/RmlUi.HotReload.1.dll' (GetLastError=126)
[ 00:00:00.904 ]: [Error] Failed to load library 'S:\SpaceRisk/RmlUi/Binaries/RmlUiEditorTarget/Windows/x64/Development/RmlUi.HotReload.1.dll' for binary module RmlUi.
[ 00:00:00.904 ]: [Error] Failed to load reference.
[ 00:00:00.905 ]: [Error] Failed to load Game assemblies.
Withaust commented 1 year ago

Closing this since this is primarily a Flax issue.