Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Headless server searches incorrect path for FrooxEngine.dll when post-processing plugins #2638

Open Aerizeon opened 3 years ago

Aerizeon commented 3 years ago

Describe the bug

When loading a Neos plugin using -LoadAssembly, the headless server fails to complete the post-processing step due to searching for FrooxEngine.dll in an incorrect location, relative to the headless executable.

Relevant issues

None

To Reproduce

  1. Place a Neos Plugin DLL somewhere accessible to the headless server (for example, the sample plugin)
  2. start a copy of the headless server using the command line, with the -LoadAssembly argument appended (ex: ./Neos.exe -LoadAssembly "Libraries\NeosTestLibrary.dll")
  3. Observe that PostX attempts to load FrooxEngine.dll from .\HeadlessClient\Neos_Data\Managed\FrooxEngine.dll instead of .\HeadlessClient\FrooxEngine.dll

Expected behavior

Plugin should load successfully - FrooxEngine.dll should be retrieved from the directory the headless client is present in.

Log Files

Error Log

Bug information (please complete the following information):

Reporters:

Epsilion Faolan Jeana

RoxyBoxxy commented 2 years ago

Quick fix is to manually point to the FrooxEngine.dll in the PostX.dll

e.g,

moduleDefinition = ModuleDefinition.ReadModule("/home/user/NeosVR/FrooxEngine.dll"));
zkxs commented 2 years ago

A similar issue occurs on non-headless Linux clients:

System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/myusername/.local/share/Steam/steamapps/common/NeosVR/Neos_Data\Managed/FrooxEngine.dll".

Workarounds

This can be worked around via an evil symlink hack.

Linux Non-Headless

cd "$HOME/.local/share/Steam/steamapps/common/NeosVR"
ln -s Neos_Data/Managed 'Neos_Data\Managed'

# make sure it worked
file 'Neos_Data\Managed/FrooxEngine.dll'

Linux Headless

cd '<your_headless_install>'
mkdir 'Neos_Data\Managed' # awful hack :(
cd 'Neos_Data\Managed'
ln -s ../FrooxEngine.dll FrooxEngine.dll
cd ..

# make sure it worked
file 'Neos_Data\Managed/FrooxEngine.dll'

Windows Headless

Do this in a command prompt:

cd "<your_headless_install>"
mkdir Neos_Data\Managed
cd Neos_Data\Managed
mklink FrooxEngine.dll ..\..\FrooxEngine.dll
cd ..\..

:: make sure it worked
fc FrooxEngine.dll Neos_Data\Managed\FrooxEngine.dll