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

DLL not found #26

Open
YoruCathy opened this issue Mar 17, 2023 · 7 comments
Open

DLL not found #26

YoruCathy opened this issue Mar 17, 2023 · 7 comments

Comments

@YoruCathy
Copy link

DllNotFoundException: taichi_unity assembly:<unknown assembly> type:<unknown type> member:(null)
Taichi.Generated.Ffi.TixImportNativeRuntimeUnity () (at Assets/Taichi/Generated/taichi_unity.cs:26)
Taichi.Runtime.get_Singleton () (at Assets/Taichi/Runtime.cs:20)
Taichi.AotModule..ctor (System.String module_path) (at Assets/Taichi/AotModule.cs:10)
Taichi.AotModuleAsset.Load () (at Assets/Taichi/AotModuleAsset.cs:24)
Taichi.AotModuleAsset.GetAllKernels () (at Assets/Taichi/AotModuleAsset.cs:47)
ImplicitFem.Start () (at Assets/Scripts/ImplicitFem.cs:81)

Hi team, I'm trying to run this example on Ubuntu 20.04, with Unity 2023.1.0a21. It is complaining about the error above. Any suggestions for resolving this?

@PENGUINLIONG
Copy link
Member

Sorry that we don't have prebuilt binary for Linux platform, but the examples should work out of the box on either Windows/macOS. You can follow the instruction here (https://github.com/taichi-dev/taichi-unity2) and see if you can build libtaichi_c_api.so and libtaichi_unity2.so and put them to Assets/Plugins.

@sarahhaha
Copy link

I am getting the same issue on both Windows/macOS... Is there anything I can look into for this issue on Windows/macOS?

@PENGUINLIONG
Copy link
Member

That's funny. Could you provide more information like unity logs etc about that? The repo is continuously covered by our CI so it shouldn't break.

@sarahhaha
Copy link

It is the same DLLNotFoundException as above.
DllNotFoundException: taichi_unity assembly: type: member:(null)
Taichi.Generated.Ffi.TixImportNativeRuntimeUnity () (at Assets/Taichi/Generated/taichi_unity.cs:26)
Taichi.Runtime.get_Singleton () (at Assets/Taichi/Runtime.cs:20)
Taichi.AotModule..ctor (System.String module_path) (at Assets/Taichi/AotModule.cs:10)
Taichi.AotModuleAsset.Load () (at Assets/Taichi/AotModuleAsset.cs:24)
Taichi.AotModuleAsset.GetAllKernels () (at Assets/Taichi/AotModuleAsset.cs:47)
Mpm88.Start () (at Assets/Scripts/Mpm88.cs:33)

There is also a NullReferenceException which I believe is caused by the DLL not being found.
NullReferenceException: Object reference not set to an instance of an object
Mpm88.Update () (at Assets/Scripts/Mpm88.cs:102)

@PENGUINLIONG
Copy link
Member

Well I just upgraded the prebuilts in #27. Please check if the latest master still have the problem. At least I tried a bit and it simply works. Otherwise I would recommend you to double check if you have installed the MSVC redistributables https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170 but it should come with any Windows 10 or higher. If it again crashes I can hardly help.

@YoruCathy
Copy link
Author

Hi @PENGUINLIONG , in the readme there's a unity version requirement saying it needs 2022.3.14 or above to operate, but we can not find this version anywhere. Is this a typo?

@sarahhaha
Copy link

@PENGUINLIONG Thank you for upgrading the prebuilt. I have ended up fixing this issue by getting a fresh build and following the developer installation here https://docs.taichi-lang.org/docs/dev_install.

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

3 participants