Closed MrScautHD closed 9 months ago
You have own joltc.dll? In that case I cannot help, if it happens with joltc.dll from this repo I can try to help.
Try also to install visual studio 2022 C++ runtime in case, you can open the joltc.dll in dependency walker and see what is missing.
I got some reports, here one that has a few more details:
[Sparkle.CSharp.Game :: Run] Initialize physics...
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'joltc' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Users/artha/Downloads/Test(1)/joltc.dylib, 0x0001): tried: '/Users/artha/Downloads/Test(1)/joltc.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/artha/Downloads/Test(1)/joltc.dylib' (no such file), '/Users/artha/Downloads/Test(1)/joltc.dylib' (no such file)
dlopen(joltc.dylib, 0x0001): tried: 'joltc.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSjoltc.dylib' (no such file), '/usr/lib/joltc.dylib' (no such file, not in dyld cache), 'joltc.dylib' (no such file), '/usr/local/lib/joltc.dylib' (no such file), '/usr/lib/joltc.dylib' (no such file, not in dyld cache)
dlopen(/Users/artha/Downloads/Test(1)/libjoltc.dylib, 0x0001): tried: '/Users/artha/Downloads/Test(1)/libjoltc.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/artha/Downloads/Test(1)/libjoltc.dylib' (no such file), '/Users/artha/Downloads/Test(1)/libjoltc.dylib' (no such file)
dlopen(libjoltc.dylib, 0x0001): tried: 'libjoltc.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibjoltc.dylib' (no such file), '/usr/lib/libjoltc.dylib' (no such file, not in dyld cache), 'libjoltc.dylib' (no such file), '/usr/local/lib/libjoltc.dylib' (no such file), '/usr/lib/libjoltc.dylib' (no such file, not in dyld cache)
dlopen(/Users/artha/Downloads/Test(1)/joltc, 0x0001): tried: '/Users/artha/Downloads/Test(1)/joltc' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/artha/Downloads/Test(1)/joltc' (no such file), '/Users/artha/Downloads/Test(1)/joltc' (no such file)
dlopen(joltc, 0x0001): tried: 'joltc' (no such file), '/System/Volumes/Preboot/Cryptexes/OSjoltc' (no such file), '/usr/lib/joltc' (no such file, not in dyld cache), 'joltc' (no such file), '/usr/local/lib/joltc' (no such file), '/usr/lib/joltc' (no such file, not in dyld cache)
dlopen(/Users/artha/Downloads/Test(1)/libjoltc, 0x0001): tried: '/Users/artha/Downloads/Test(1)/libjoltc' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/artha/Downloads/Test(1)/libjoltc' (no such file), '/Users/artha/Downloads/Test(1)/libjoltc' (no such file)
dlopen(libjoltc, 0x0001): tried: 'libjoltc' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibjoltc' (no such file), '/usr/lib/libjoltc' (no such file, not in dyld cache), 'libjoltc' (no such file), '/usr/local/lib/libjoltc' (no such file), '/usr/lib/libjoltc' (no such file, not in dyld cache)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
at JoltPhysicsSharp.JoltApi.OnDllImport(String libraryName, Assembly assembly, Nullable`1 searchPath)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at JoltPhysicsSharp.JoltApi.JPH_Init(UInt32 tempAllocatorSize)
at JoltPhysicsSharp.Foundation.Init(UInt32 tempAllocatorSize, Boolean doublePrecision)
at Sparkle.CSharp.Physics.Simulation..ctor(PhysicsSettings settings) in F:\projects\Sparkle\src\Sparkle\CSharp\Physics\Simulation.cs:line 26
at Sparkle.CSharp.Game.Run(Scene scene) in F:\projects\Sparkle\src\Sparkle\CSharp\Game.cs:line 96
at Program.<Main>$(String[] args) in F:\projects\Sparkle\src\Test\Program.cs:line 11
fish: Job 1, './Test' terminated by signal SIGABRT (Abort)
artha@CookieMac ~/D/Test(1) [SIGABRT]>
Can you try with latest github version?
Can you try with latest github version?
Sadly not, my project base on the nuget packet and if i try to compile it with the Source code (Github) i get some errors:
Please try with version 2.2.2
from nuget
Please try with version
2.2.2
from nuget
Same error
looks like you're need to include libjoltc.dylib
looks like you're need to include libjoltc.dylib
That's should be automatically be added by .net compiler
it do not work then, only the C# library
Don't know what to do, I don't have a macos, so it's impossible for me to debug and fix the issue
Same on happans on linux, create a virtual machine for linux and try to debug it. (just on win does it work)
ops sry nope it just happans on MacOS.
Don't know what to do, I don't have a macos, so it's impossible for me to debug and fix the issue
You dont need one, just get sure the .dll get added to the build.
Lol, feel free to fix it and submit PR
Lol, feel free to fix it and submit PR
Oh and it just happans for nuget if i build it with the github source code it works fine.
Lol, feel free to fix it and submit PR
I got the bug!
the problem is you use '$(RuntimeIdentifier)'=='osx-universal'"
instead of '$(RuntimeIdentifier)'=='osx-x64'"
With '$(RuntimeIdentifier)'=='osx-x64'"
the .dll get generated.
Fixed
Issue description
Hello, I'm encountering an issue with the .dll importer in C#. It's a bit puzzling because it seems to work on some PCs but not others. On my main development machine, everything runs smoothly. However, on my test PC, I consistently encounter an error. Interestingly, on my sister's PC, it works flawlessly. It's quite perplexing, but I found that replacing the .dll with the original joltc one resolves the issue on any PC.
Issue screenshot