Skip to content

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

Description

@NotNite

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions