# MacOS DllNotFoundException: fmodstudioL

**URL:** <https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452>\
**Category:** Unity\
**Tags:** mac\
**Created:** [November 20, 2020, 9:15pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452 "2020-11-20T21:15:39Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [February 4, 2021, 9:35pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/22 "2021-02-04T21:35:33Z")

</div>

Firstly, I don’t think the issues I experienced are the same as you, since these issues gave macOS error messages on double click of the app, where what you describe was a crash when displaying the splash screen.

Some googling revealed a plausible explanation for the access denied issue I encountered, simply due to zipping the .app as seen on [Stackoverflow](https://stackoverflow.com/questions/42488915/unity3d-osx-application-cant-be-opened).

The developer unknown issue will be due to you building your app locally without the proper app signing / notarization for distribution, for reference I ignored this by going into macOS Settings → Security and Privacy and allowing execution of the untrusted application.

Can you confirm unzipping the app you sent me still causes the crash on your end?  
If so, what version of macOS are you running?

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 5, 2021, 10:34am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/23 "2021-03-05T10:34:14Z")

</div>

I don’t have the time to go back to the original build but we got this issue again in our newest build.

We’re now using Unity Integration 2.01.08 and the Windows builds run just fine.

This is the splash screen setup  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c740c2cd180cea039a2c1575f40c5949b3a082f3.png)

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/696d321445599edaa494bf59732eaf6af13a3541.png)

Here’s the Player.log  
[Crash log.txt](https://qa.fmod.com/uploads/short-url/vGHB7EZUBoQcUh5iAnc1nI9y2I.txt) (30.2 KB)

and here’s the actual build, a zipped version + a separate .app in case Dropbox messes up the .zip one.

> **[TOEM Bootup Mac crash](https://www.dropbox.com/sh/0pkz97aa2rsrkwe/AAD6vv5_0Iu4R3ruHPlR_Np4a?dl=0)**
>
> Shared with Dropbox

All help is appreciated, cheers!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 9, 2021, 3:04am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/24 "2021-03-09T03:04:11Z")

</div>

Thank you so much for providing your .app, I was able to reproduce the issue here on my Mac. So the problem is actually due to a codesign validity check triggered because the FMOD bundle has been tampered with. The tampering is the line endings for the Info.plist file contained within fmodstudio.bundle and fmodstudioL.bundle. I was able to quickly fix it here by installing dos2unix via homebrew and running it on the file.

We ship the Info.plist files with Unix style line endings as is the norm on macOS, so I suspect the endings got flipped by your source control, possibly due to wrong settings, or possibly checking the file out on Windows, copying it to a Mac, then checking it in on the Mac.

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 9, 2021, 7:56am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/25 "2021-03-09T07:56:30Z")

</div>

Aahh yeah we did something with the line endings a while ago to fix something else but I don’t suspect it’s actively done anymore.

How can I go about solving this issue, completely reinstalling the unity intregration?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 10, 2021, 12:44am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/26 "2021-03-10T00:44:39Z")

</div>

Reinstalling is one method, in practice you just need to update the Info.plist files, but unpacking the Unity package to get the correct ones is not always straight forward, so reapplying the whole thing can be easier. If you have homebrew set up, then install `dos2unix` and run it on each of the Info.plist files to fix them is another option, there are other ways to swap line endings but that was the quickest I found to test here.

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 10, 2021, 11:59am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/27 "2021-03-10T11:59:56Z")

</div>

I deleted the whole FMOD folder and reinstalled it, now I’m getting `ArgumentException: An item with the same key has already been added. Key: StandaloneWindows` when saving the unity project… 😕

Editor log:

```
ArgumentException: An item with the same key has already been added. Key: StandaloneWindows
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 
  at FMODUnity.Settings.DeclareBuildTarget (UnityEditor.BuildTarget buildTarget, FMODUnity.Platform platform) [0x00001] in D:\Github\TOEM\Assets\Plugins\FMOD\src\Runtime\Settings.cs:390 
  at FMODUnity.PlatformWindows.DeclareUnityMappings (FMODUnity.Settings settings) [0x00028] in D:\Github\TOEM\Assets\Plugins\FMOD\platforms\win\src\PlatformWindows.cs:52 
  at FMODUnity.Settings.LinkPlatform (FMODUnity.Platform platform) [0x00009] in D:\Github\TOEM\Assets\Plugins\FMOD\src\Runtime\Settings.cs:384 
  at FMODUnity.Settings.ForEachPlatform (System.Action`1[T] action) [0x00019] in D:\Github\TOEM\Assets\Plugins\FMOD\src\Runtime\Settings.cs:320 
  at FMODUnity.Settings.OnEnable () [0x0013c] in D:\Github\TOEM\Assets\Plugins\FMOD\src\Runtime\Settings.cs:883

```

UPDATE:  
I reimported everything once again and this error didn’t appear again.

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 10, 2021, 6:07pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/28 "2021-03-10T18:07:23Z")

</div>

So reinstalling the unity integration did not fix anything. I quit unity, deleted FMOD, reimported everything, added the FMOD plugin, reimported again, and restarted to make sure all .dlls were updated and everything.

It did not solve the issue. Our team members are using macOS Catalin 10. and big Sur.

Here’s the new Editor.log after my reinstallation, seems like the same issue persists.  
[message.txt](https://qa.fmod.com/uploads/short-url/qVm1IQQT5WpRQ0dd1tLmyUunPsh.txt) (30.1 KB)

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 11, 2021, 12:01am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/29 "2021-03-11T00:01:37Z")

</div>

Completely removing FMOD and installing again should work, I’ve just tested again locally importing 2.01.08 into an empty Unity project. Just to confirm it is indeed the line ending issue, can you open a terminal and type the following:

```auto
nano -N Assets/Plugins/FMOD/lib/mac/fmodstudioL.bundle/Contents/Info.plist

```

The `-N` in the above will ensure no file endings are swapped on open, if you have incorrect line endings you will see ^M on the end of every line. If you do see this I’m super curious how that’s happening, I’m assuming you are simply running the asset package on your Mac and importing it into your project?

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 12, 2021, 8:46pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/30 "2021-03-12T20:46:43Z")

</div>

After digging further it only seems to be a problem when I’m building the macOS using our build server which is very strange as it’s the exact same files.

When I build from my personal PC there are no problems at all but when I build using the build server (which uses Windows, same Unity version etc.) The info.plist seem to be empty?..

Very weird

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 12, 2021, 9:07pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/31 "2021-03-12T21:07:46Z")

</div>

Okay so I replaced all my build servers FMOD Integration files with the ones from my personal PC and that made the builds run so something was not updated correctly through git??

Don’t really know what the issue was but now it’s working which is fantastic ❤

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 13, 2021, 10:51am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/32 "2021-03-13T10:51:09Z")

</div>

@mathew  
Nevermind my post above, it didn’t actually solve the problem as it seems to persist when I’m using the build server, everything works if I manually build the game for macOS.

The build server calls a method called `JenkingsBuild.BuildAll` that first builds to Windows64 then switches to macOS and builds that. Then it uploads those builds to the development branch on Steam. The thing that is strange here is that I can build and getting it to work IF I open up the editor and call the very same method manually…

Could there be something that goes wrong when building using these unity launch arguments maybe?  
`-nographics -batchmode -quit -executeMethod JenkingsBuild.BuildAll`

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 16, 2021, 12:05am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/33 "2021-03-16T00:05:58Z")

</div>

You mention that the build server first builds to Win64, then switches to macOS… this feels like a potential point of failure depending on how that process is managed. If all the files are checked out of Git on Windows and Git is set up to switch line endings on files to match the native OS then the Info.plist will have its line endings changed to Windows format. If when Jenkins switches to macOS to do that part of the build it uses the same files from Windows, then the line endings of the Info.plist will still be in Windows format (not Mac format).

If this is the case you’ll need to tell Git not to change the line endings for those files or have Jenkins check out the Mac files on the Mac (rather than on Windows).

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 16, 2021, 9:25am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/34 "2021-03-16T09:25:26Z")

</div>

I’m switching between build targets using Unity’s provided functions so there shouldn’t be any issues? 😕

> **[Unity - Scripting API: EditorUserBuildSettings.SwitchActiveBuildTarget](https://docs.unity3d.com/ScriptReference/EditorUserBuildSettings.SwitchActiveBuildTarget.html)**

```
bool switchResult = EditorUserBuildSettings.SwitchActiveBuildTarget(buildTargetGroup, buildTarget);
if (switchResult)
{
	Console.WriteLine("[JenkinsBuild] Successfully changed Build Target to: " + buildTarget);
}
else
{
	throw new Exception("[JenkinsBuild] Unable to change Build Target to: " + buildTarget + " Exiting...");
}
```

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 16, 2021, 11:27pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/35 "2021-03-16T23:27:10Z")

</div>

I see, I misunderstood how your build system worked.

Can you confirm whether your build server is running Windows or Mac?  
EDIT: Actually I can see you confirmed that a few posts up.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 16, 2021, 11:32pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/36 "2021-03-16T23:32:13Z")

</div>

So I’m still concerned about this Info.plist on the server.  
Can you check that file on the server and verify the line endings after the server fetches from Git.  
I still suspect that when Git pulls down the Info.plist it is switching the line endings to match the native Windows style (not knowing that file is intended for running on a Mac).

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 17, 2021, 8:44am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/37 "2021-03-17T08:44:15Z")

</div>

I no longer have a mac available to test on but here is the build server’s FMOD mac lib folder after building the game.

> **[TOEM FMOD Plugin Mac Lib.zip](https://www.dropbox.com/s/ra2mlhw1eam38b2/TOEM%20FMOD%20Plugin%20Mac%20Lib.zip?dl=0)**
>
> Shared with Dropbox

I opened it up with notepad++ on my Windows machine and it looks like this

This one is located inside `Assets/Plugins/FMOD/lib/mac/fmodstudioL.bundle/Contents/Info.plist`

```
<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>BuildMachineOSBuild</key>
    	<string>17G4015</string>
    	<key>CFBundleDevelopmentRegion</key>
    	<string>English</string>
    	<key>CFBundleExecutable</key>
    	<string>fmodstudioL</string>
    	<key>CFBundleIdentifier</key>
    	<string>com.fmod.fmodstudioL</string>
    	<key>CFBundleInfoDictionaryVersion</key>
    	<string>6.0</string>
    	<key>CFBundlePackageType</key>
    	<string>BNDL</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleSupportedPlatforms</key>
    	<array>
    		<string>MacOSX</string>
    	</array>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    	<key>CSResourcesFileMapped</key>
    	<string>no</string>
    	<key>LSRequiresIPhoneOS</key>
    	<false/>
    	<key>MinimumOSVersion</key>
    	<string>10.7</string>
    	<key>NSHighResolutionCapable</key>
    	<true/>
    	<key>NSSupportsAutomaticGraphicsSwitching</key>
    	<true/>
    </dict>
    </plist>

```

This one is inside `TOEM.app\Contents\Info.plist`

```
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>TOEM</string>
    <key>CFBundleGetInfoString</key>
    <string>Unity Player version 2019.4.21f1 (b76dac84db26). (c) 2021 Unity Technologies ApS. All rights reserved.</string>
    <key>CFBundleIconFile</key>
    <string>PlayerIcon.icns</string>
    <key>CFBundleIdentifier</key>
    <string>se.SomethingWeMade.TOEM</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>TOEM</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>Mountain Draft #1</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
      <string>MacOSX</string>
    </array>
    <key>CFBundleVersion</key>
    <string>0</string>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.games</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.9.0</string>
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true />
    </dict>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>PlayerApplication</string>
    <key>UnityBuildNumber</key>
    <string>b76dac84db26</string>
  </dict>
</plist>
```

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 17, 2021, 9:34pm UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/38 "2021-03-17T21:34:26Z")

</div>

The simplest way to check the line endings with Notepad++ is go to View → Show Symbol → Show End of Line. The Info.plist must end each line with LF (as in line feed) not CRLF (carriage return line feed) for it to work.

The text you pasted will be converted on post to the forum, so I cannot use that as a reference. The DropBox link however shows correct Info.plist files. Can you confirm whether these are from the .bundles inside the Unity Assets FMOD directory or the produced .app? If they are from the Unity Assets directory we know Git is correctly checking the files out and it’s something to do with the building process converting them. If they are from the final .app then it should be working.

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 18, 2021, 8:06am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/39 "2021-03-18T08:06:59Z")

</div>

I can confirm that the .plist files were from the Unity Assets directory but just in case I rebuild everything using Jenkins and uploaded both the Unity Assets FMOD mac lib and the build PlugIns folder from the game so you can check them out.

Same link as before

> **[TOEM FMOD Plugin Mac Lib.zip](https://www.dropbox.com/s/ra2mlhw1eam38b2/TOEM%20FMOD%20Plugin%20Mac%20Lib.zip?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 19, 2021, 12:16am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/40 "2021-03-19T00:16:53Z")

</div>

The Info.plist from the app looks correct to me, I would expect the app that they came from would not exhibit the same issue you described. If you are unable to test, if you share the full .app with me I can test here.

---

<div class="post-metadata">

**Author:** ![NikMikk](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nikmikk/32/5599_2.png) [@NikMikk](https://qa.fmod.com/u/NikMikk)\
**Post date:** [March 23, 2021, 8:37am UTC](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452/41 "2021-03-23T08:37:04Z")

</div>

Sorry for my slow response.

It seems that everything suddenly started working again…? This whole thing has been very weird but yeah, I guess it works.

I will schedule some builds today to see if that is the thing that causes the process to execute weirdly, I’ll come back later with an anwser.

[Previous page](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452.md?page=1)

[Next page](https://qa.fmod.com/t/macos-dllnotfoundexception-fmodstudiol/16452.md?page=3)
