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

DynDll does not work with non-ASCII characters in path #42

Open
NotNite opened this issue Mar 18, 2024 · 0 comments
Open

DynDll does not work with non-ASCII characters in path #42

NotNite opened this issue Mar 18, 2024 · 0 comments

Comments

@NotNite
Copy link

NotNite commented Mar 18, 2024

See: SlopCrew/SlopCrew#134

My mod Slop Crew uses DynDll to load GameNetworkingSockets inside of Unity. When the path to the library contains non-ASCII characters, a cryptic error is thrown:

[Error  : Unity Log] EntryPointNotFoundException: No matching entry point found for GameNetworkingSockets_Init in SlopCrew.Common.Native
Stack trace:
MonoMod.Utils.DynDll.InternalResolveDynDllImports (System.Type type, System.Object instance, System.Collections.Generic.Dictionary`2[TKey,TValue] mappings) (at <6733e342b5b549bba815373898724469>:0)
MonoMod.Utils.DynDll.ResolveDynDllImports (System.Type type, System.Collections.Generic.Dictionary`2[TKey,TValue] mappings) (at <6733e342b5b549bba815373898724469>:0)
SlopCrew.Common.Native..cctor () (at D:/code/c#/brc/SlopCrew/SlopCrew.Common/ValveSockets.cs:909)
Rethrow as TypeInitializationException: The type initializer for 'SlopCrew.Common.Native' threw an exception.
SlopCrew.Common.Library.Initialize (System.Text.StringBuilder errorMessage) (at D:/code/c#/brc/SlopCrew/SlopCrew.Common/ValveSockets.cs:830)
SlopCrew.Common.Library.Initialize () (at D:/code/c#/brc/SlopCrew/SlopCrew.Common/ValveSockets.cs:819)

(For the sake of testing, I renamed Bomb Rush Cyberfunk to Bómb Rush Cyberfunk.)

This is a problem because r2modman installs profiles into AppData by default, so users with non-ASCII characters in their Windows username will not be able to use my mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant