Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

Plugin Development: Actionbreakableflownode Game - Crash #1909

Open Xlinka opened 5 months ago

Xlinka commented 5 months ago

Describe the bug?

Loading any action breakable flow node as a separate .DLL plugin with binding causes the game to instantly close after initialization. The game crashes with "System.ArgumentException: Member 'FrooxEngine.SyncRef`1' is declared in another module and needs to be imported". Log file supplied.

To Reproduce

  1. Make a plugin with the node and binding and build.
  2. Load the .DLL with load assembly.
  3. The game will then proceed not to fully launch and close. You can even just copy the breakable flow action nodes from the game and rename them for testing.

Expected behavior

The game should launch and continue, adding the node in the respective area so it can be used in the game.

Screenshots

No response

Resonite Version Number

2024.5.1.68

What Platforms does this occur on?

Windows, Linux

What headset if any do you use?

Vive Pro Eye

Log Files

XLINKA - 2024.5.1.68 - 2024-05-01 21_44_48.log

Additional Context

No response

Reporters

No response

Frooxius commented 5 months ago

Are you able to provide us with a sample code & plugin to test this?

Xlinka commented 5 months ago

Absolutely can do let me just build the dll and I'll attach to the issue plus the repo https://github.com/Xlinka/Project-Obsidian/tree/main/ProjectObsidian%2FProtoFlux

The file causing the crash is

https://github.com/Xlinka/Project-Obsidian/blob/main/ProjectObsidian%2FProtoFlux%2FSlots%2FCreateEmptySlot.cs

The project has a source generator for bindings the binding file is correct.

Xlinka commented 5 months ago

Project-Obsidian.zip Had to compress dll into zip as GitHub wont allow uploading of dll to issues.

Xlinka commented 4 months ago

If you need to build the DLL, simply pull the main project. It will find dependencies and download sources from NuGet. The references to Resonite are handled by a Resonite path in the Obsidian solution. So, if your installation is in an odd place, add the path to the top of the sln.

This will enable you to build the DLL.

Xlinka commented 4 months ago

Moved the problematic code to a branch as I need the main branch for releases. https://github.com/Xlinka/Project-Obsidian/tree/Issue-%231909/

https://github.com/Xlinka/Project-Obsidian/blob/Issue-%231909/ProjectObsidian/ProtoFlux/Slots/CreateEmptySlot.cs

shiftyscales commented 4 months ago

This issue seemingly has all that it needs to be looked into further.