Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote method fixes #98

Merged
merged 12 commits into from
Sep 18, 2024
Merged

Remote method fixes #98

merged 12 commits into from
Sep 18, 2024

Conversation

space928
Copy link
Owner

@space928 space928 commented May 13, 2024

Various bugfixes for remote methods and textures in local plugins:

  • OmsiRemoteMethods is no longer static and can be accessed through the instance of OmsiHook/Memory
  • Updated dependent classes to use the instance of OmsiRemoteMethods
  • D3DTexture implements IDisposable to prevent memory leaks
  • Memory and OmsiHook now implement IDisposable to tidy up resources
  • Implemented fast path for local plugins for all Memory read/write/allocate operations in Memory
  • Enabled unsafe compilation of OmsiHook to support fast path for Memory operations
  • Various other local plugin related bug fixes
  • Fixed dereferencing bug in OmsiCreateTextureAsync when using local plugins
  • Improved D3D hooking reliability
  • Implemented small test for D3DTexture usage in a local plugin
  • Updated DNNE
  • Added D3DTexture mipmap support
  • Added RPC method to get texture level count
  • Added a few null checks to the local plugin path for Memory Read/Write operations to prevent crashes
  • Fixed some bugs with MonitorStateTask (used for OmsiHook events) in local plugins
  • Disposing of OmsiRemoteMethods (which is done automatically when disposing of OmsiHook) now closes the RPC session correctly
  • CloseRPCSession() is now awaitable

Fixed #96
Fixed #97
Fixed #92

space928 added 3 commits May 13, 2024 18:26
 - OmsiRemoteMethods is no longer static and can be accessed through the instance of OmsiHook/Memory
 - Updated dependent classes to use the instance of OmsiRemoteMethods
 - D3DTexture implements IDisposable to prevent memory leaks
 - Memory and OmsiHook now implement IDisposable to tidy up resources
 - Implemented fast path for local plugins for all Memory read/write/allocate operations in Memory
 - Enabled unsafe compilation of OmsiHook to support fast path for Memory operations
 - Various other local plugin related bug fixes
 - Fixed dereferencing bug in OmsiCreateTextureAsync when using local plugins
 - HookD3D
 - Implemented small test for D3DTexture usage in a local plugin
 - Updated DNNE
 - OmsiRemoteMethods is no longer static and can be accessed through the instance of OmsiHook/Memory
 - Updated dependent classes to use the instance of OmsiRemoteMethods
 - D3DTexture implements IDisposable to prevent memory leaks
 - Memory and OmsiHook now implement IDisposable to tidy up resources
 - Implemented fast path for local plugins for all Memory read/write/allocate operations in Memory
 - Enabled unsafe compilation of OmsiHook to support fast path for Memory operations
 - Various other local plugin related bug fixes
 - Fixed dereferencing bug in OmsiCreateTextureAsync when using local plugins
 - HookD3D
 - Implemented small test for D3DTexture usage in a local plugin
 - Updated DNNE
@space928 space928 marked this pull request as ready for review May 13, 2024 17:31
@space928
Copy link
Owner Author

This changes a bunch of Memory marshalling code and introduces some unsafe code, it will need thorough testing before it can be merged into main.

@amathieson amathieson self-requested a review May 14, 2024 06:06
@amathieson
Copy link
Collaborator

Will look through properly at the weekend normally

space928 and others added 8 commits May 14, 2024 10:26
 - Added D3DTexture mipmap support (fixes #92)
 - Added RPC method to get texture level count
 - Added a few null checks to the local plugin path for Memory Read/Write operations to prevent crashes
 - Fixed some bugs with MonitorStateTask in local plugins
 - Disposing of OmsiRemoteMethods (which is done automatically when disposing of OmsiHook) now closes the RPC session correctly
 - CloseRPCSession() is now awaitable
 - Various RPC/Remote method updates to support the new textrue API
 - Updated OmsiHookPlugin example to test a few more features in a local plugin -> seems to work...
 + MakeVehicle
Co-authored-by: Thomas Mathieson <thomas@mathieson.dev>
Make Vehicle & Remote Method Enhancements
 - Updated project/docfx version number
 - Added MemArray for TOList
 - Fixed some broken arrays in OmsiComplObj
 - Fixed an incorrectly parsed string in OmsiMap
 - FastBinaryWriter now uses MemoryMarshal instead of BitConverter for no particular reason
 - Improved error reporting in Memory.cs
 - Improved safety/performance of some core methods in Memory.cs
 - Replaced Marshal.SizeOf with Unsafe to SizeOf, it's more correct for our use case
 - Slightly improved the performance of string reading
 - Rewrote MarhsalStruct/UnMarshalStruct to make use of compiled Expression Trees to allow for much faster marshalling of data without the need for reflection every time. (A cached reflection based fallback has been implemented as well)
 - Fixed OmsiAmpelGroup marshalling
 - Fixed OmsiOFTTex marshalling
 - Some bugfixes to multiple sessions with OmsiHookRPCPlugin
@space928
Copy link
Owner Author

This PR should fix #103

@space928 space928 merged commit 3720035 into main Sep 18, 2024
1 check passed
@amathieson amathieson deleted the remote-method-fixes branch September 19, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants