Bug / Crash DllNotFoundException after migrating 2020 Win to 2021 Mac - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Bug / Crash DllNotFoundException after migrating 2020 Win to 2021 Mac (/thread-3173.html) Pages:
1
2
|
DllNotFoundException after migrating 2020 Win to 2021 Mac - fishing-rod - 10-11-2021 Hi, I tried to keep the subject short. I migrated my project from Unity 2020 LTS on a Windows 10 Laptop to Unity 2021.2.1f1 on a M1 Mac. It actually went way better than I though but when I enter play mode I get these type of errors spammed with different call stacks. Here are two examples: Code: DllNotFoundException: libOni assembly:<unknown assembly> type:<unknown type> member:(null) Code: DllNotFoundException: libOni assembly:<unknown assembly> type:<unknown type> member:(null) I tried reimporting from package manager and restarting unity. I still get those errors. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - josemendez - 10-11-2021 (10-11-2021, 09:57 PM)fishing-rod Wrote: Hi, Hi, Make sure the /Obi/Plugins folder exists and actually contains the library file for your platform (libOni.a on mac). I’ve only seen this fail when A) the asset was freshly imported with no Unity restart , or B) missing plugin files. If neither is the case, would you mind sending your project to support(at)virtualmethodstudio.com so that I can take a closer look? Thanks! RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - fishing-rod - 11-11-2021 Thanks for your support! I do see one libOni.a which is in the iOS folder. Is that correct? Does it matter that I'm on apple silicon (M1)? The screenshot is from the package importer, but I can't tick the checkboxes. I think this is because everyhting is already imported. I don't see anything missing in the project view. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - josemendez - 12-11-2021 (11-11-2021, 06:48 PM)fishing-rod Wrote: Thanks for your support! Everything looks fine! Upon further research, looks like the M1 processor is not backwards compatible with Intel architectures at a hardware level, Apple is using a binary translator (Rosetta 2) to allow binaries compiled for Intel to run on the M1. This might be the culprit since Unity libs might not be correctly translated (or at all) will have to test the precompiled libraries and see if they run on the M1, if they don't, I will have to recompile the libs for M1. In the meantime you can switch to the Burst backend (which should be used when possible anyway), that will solve the issue as it does not require precompiled libs. See: http://obi.virtualmethodstudio.com/manual/6.2/backends.html RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - fishing-rod - 12-11-2021 (12-11-2021, 08:48 AM)josemendez Wrote: Everything looks fine! Upon further research, looks like the M1 processor is not backwards compatible with Intel architectures at a hardware level, Apple is using a binary translator (Rosetta 2) to allow binaries compiled for Intel to run on the M1. This might be the culprit since Unity libs might not be correctly translated (or at all) will have to test the precompiled libraries and see if they run on the M1, if they don't, I will have to recompile the libs for M1. Alright, thanks for your effort. Actually I already set Burst as the backend to use. I do see the warning that it depends on the 4 packages though. Is the warning only visible when a package is missing? I tried to look them up in the package manager, but I could only find Burst and Mathematics. Collections and Jobs don't show up. Neither in the Unity Registry nor in the Built In category. Compilation on Jobs is enabled and Safety Checks is disabled. I don't have the Leak Detection and JobsDebugger menu points. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - josemendez - 12-11-2021 (12-11-2021, 09:08 AM)fishing-rod Wrote: I tried to look them up in the package manager, but I could only find Burst and Mathematics. Collections and Jobs doesn't show up. Neither in the Unity Registry nor in the Built In category. They're preview packages, you need to enable preview packages in the editor: https://docs.unity3d.com/Manual/pack-preview.html Quote:I do see the warning that it depends on the 4 packages though. Is the warning only visible when a package is missing? Once you've got the right package dependencies installed, the ObiSolver component will no longer show up any warnings when you select Burst as your backend, and the DllNotFound exception will go away. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - fishing-rod - 13-11-2021 (12-11-2021, 09:36 AM)josemendez Wrote: They're preview packages, you need to enable preview packages in the editor: I couldn't see the packages even after enabling pre-release packages but I could install them by name. So they are installed now and Jobs has version 0.11.0-preview.6 and Collections 1.0.0-pre.6. Now I get this error: Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs(7,19): error CS0101: The namespace 'Obi' already contains a definition for 'BurstContact' And it makes sense when I check the folder structure. There is a struct BurstContact under .../DataStructure/BurstContact.cs and .../DataStructure/Queries/BurstContact.cs. I have no idea how I did mess up this. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - josemendez - 13-11-2021 There's no ".../DataStructures/BurstContact.cs" file included in the package, not sure how it ended up there. The correct path is "/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs" You can try simply deleting the /DataStructure/BurstContact.cs one, or removing the entire /Obi folder and reimporting the package to make sure files are where they should. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - josemendez - 13-11-2021 On a side note regarding Apple's M1: https://forum.unity.com/threads/unity-on-apple-silicon-and-big-sur-known-issues-and-workarounds.929220/page-7 Seems like the Unity 2021.1 version installed by the hub runs on M1 using Rosetta, the native version needs to be manually downloaded and installed. Under "Component Installers macOS" you'll see a link to "Unity Editor (Apple silicon, preview)": https://unity3d.com/beta/2021.2b#downloads Ran into this myself while testing the libs: the Intel version of the editor doesn't run the Intel lib nor the native M1 lib. RE: DllNotFoundException after migrating 2020 Win to 2021 Mac - fishing-rod - 13-11-2021 (13-11-2021, 10:36 AM)josemendez Wrote: On a side note regarding Apple's M1: That info is not up to date. You can download apple silicon version with unity hub 3: https://forum.unity.com/threads/now-available-native-apple-silicon-editor-preview-builds.1122712/page-6#post-7602034 (13-11-2021, 10:29 AM)josemendez Wrote: There's no ".../DataStructures/BurstContact.cs" file included in the package, not sure how it ended up there. The correct path is "/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs" Thank you so much! Everything is now working as expected. The warning for Burst backend has gone and my fishin rods are working again after reimporting. |