# An item with the same key has already been added

**URL:** <https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060>\
**Category:** Unity\
**Created:** [April 15, 2021, 8:41am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060 "2021-04-15T08:41:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Racot\_A](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/racot_a/32/362_2.png) [@Racot\_A](https://qa.fmod.com/u/Racot_A)\
**Post date:** [April 15, 2021, 8:41am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/1 "2021-04-15T08:41:54Z")

</div>

Unity 2021.1.3 and 2.01.07.  
I have weird sometimes errors after a recompile script.

I attached zip archive with FMODStudioSettings and meta in FMODStudioSettings.log file. Just change .log to .zip 🙂

Log warning

> Importer(NativeFormatImporter) generated inconsistent result for asset(guid:6ff4b58ad1c086a468336b56c0b191c1) “Assets/Plugins/FMOD/Cache/Editor/FMODStudioCache.asset”

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/9/9721da2f8235e146e42280327463eae899482a6d.png)  
[FMODStudioSettings.log](https://qa.fmod.com/uploads/short-url/mEwTZDKM3kNXWl0jqZoQm0neuxz.log) (2.6 KB)

> ```
> Reloading assemblies after forced synchronous recompile.
> Begin MonoManager ReloadAssembly
> FMOD Studio: Destroying editor system instance
> 
> Symbol file LoadedFromMemory is not a mono symbol file
> Native extension for WindowsStandalone target not found
> Refreshing native plugins compatible for Editor in 0.99 ms, found 3 plugins.
> Preloading 0 native plugins for Editor in 0.00 ms.
> FMOD: Cleaning up duplicate platform: ID = 2c5177b11d81d824dbb064f9ac8527da, name = 'Windows', type = PlatformWindows
> 
> FMOD: Cleaning up duplicate platform: ID = default, name = 'Default', type = PlatformDefault
> 
> FMOD: Cleaning up duplicate platform: ID = c88d16e5272a4e241b0ef0ac2e53b73d, name = 'Low-End Mobile', type = PlatformMobileLow
> 
> FMOD: Cleaning up duplicate platform: ID = 0f8eb3f400726694eb47beb1a9f94ce8, name = 'iOS', type = PlatformIOS
> 
> FMOD: Cleaning up duplicate platform: ID = playInEditor, name = 'Editor', type = PlatformPlayInEditor
> 
> FMOD: Cleaning up duplicate platform: ID = 46fbfdf3fc43db0458918377fd40293e, name = 'WebGL', type = PlatformWebGL
> 
> FMOD: Cleaning up duplicate platform: ID = 2fea114e74ecf3c4f920e1d5cc1c4c40, name = 'Android', type = PlatformAndroid
> 
> FMOD: Cleaning up duplicate platform: ID = b7716510a1f36934c87976f3a81dbf3d, name = 'Linux', type = PlatformLinux
> 
> FMOD: Cleaning up duplicate platform: ID = 52eb9df5db46521439908db3a29a1bbb, name = 'macOS', type = PlatformMac
> 
> FMOD: Cleaning up duplicate platform: ID = e7a046c753c3c3d4aacc91f6597f310d, name = 'Apple TV', type = PlatformAppleTV
> 
> FMOD: Cleaning up duplicate platform: ID = fd7c55dab0fce234b8c25f6ffca523c1, name = 'High-End Mobile', type = PlatformMobileHigh
> 
> [MODES] ModeService[none].Initialize
> [MODES] ModeService[none].LoadModes
> [MODES] Loading mode Default (0) for mode-current-id-ColdDepth
> Mono: successfully reloaded assembly
> <b>Compilation Report</b>: 1.90 seconds
> ────────────────────────────────────
> • <i>Assembly-CSharp.dll</i> 0.00 seconds
> • <i>Assembly-CSharp.dll</i> 0.00 seconds
> • <i>Assembly-CSharp.dll</i> 0.00 seconds
> • <i>Assembly-CSharp-Editor.dll</i> 0.00 seconds
> • <i>Assembly-CSharp.dll</i> 0.00 seconds
> ────────────────────────────────────
> <b>Compilation Total:</b> 0.00 seconds
> <b>Assembly Reload Time:</b> 1.89 seconds
> 
> - Completed reload, in 1.960 seconds
> Platform modules already initialized, skipping
> ArgumentException: An item with the same key has already been added. Key: StandaloneOSX
> 
> ArgumentException: An item with the same key has already been added. Key: StandaloneOSX
> 
> ```

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [April 27, 2021, 4:23am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/2 "2021-04-27T04:23:49Z")

</div>

Unfortunately, without knowing how and where you’re setting the items that use the `StandaloneOSX` key, but evidently you have more than one of them. Can you find them in your code?

In some ways, your issue sounds similar to [this one](https://qa.fmod.com/t/fmod-cleaning-up-duplicate-platform-warning/16646/23). Perhaps looking at that thread might reveal some possible lines of investigation?

---

<div class="post-metadata">

**Author:** ![Racot\_A](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/racot_a/32/362_2.png) [@Racot\_A](https://qa.fmod.com/u/Racot_A)\
**Post date:** [April 27, 2021, 8:36am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/3 "2021-04-27T08:36:04Z")

</div>

Thanks for the reply.

> [@joseph](#):
>
> without knowing how and where you’re setting the items that use the `StandaloneOSX` key

I don’t use StandaloneOSX platform. Only windows. FMOD plugin is not modified and I build banks only for windows in streaming assets.  
These errors spammed after a random recompile.  
I think the error may appear after recompile with the option enabled Recompile After Finished Playing.  
PressPlay - ModifyAndSaveAnyScript - Focus on Unity - Wait recompile prt1(maybe here) - StopEditor - Wait recompile prt2 - Error

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [April 28, 2021, 5:07am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/4 "2021-04-28T05:07:59Z")

</div>

Unfortunately I can’t reproduce the issue with the steps you describe. I agree with @joseph - it sounds similar to the thread he linked to. You could try using the patched `Settings.cs` from [this post](https://qa.fmod.com/t/fmod-cleaning-up-duplicate-platform-warning/16646/25) and see if it helps?

---

<div class="post-metadata">

**Author:** ![Racot\_A](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/racot_a/32/362_2.png) [@Racot\_A](https://qa.fmod.com/u/Racot_A)\
**Post date:** [May 1, 2021, 6:43am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/5 "2021-05-01T06:43:20Z")

</div>

Thanks for the idea. I replaced Settings.cs and has unity errors.

 ![SettingsReplaceErrors](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/0/07fad06733b9f13a6fe85400748d98a6842484fd.png)

Updating to 2.01.09 not help too.

---

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [May 10, 2021, 2:33pm UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/6 "2021-05-10T14:33:16Z")

</div>

Got the same problem here… Any solution yet?

---

<div class="post-metadata">

**Author:** ![ben\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ben_fmod/32/1452_2.png) [@ben\_fmod](https://qa.fmod.com/u/ben_fmod)\
**Post date:** [May 13, 2021, 12:27am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/7 "2021-05-13T00:27:34Z")

</div>

> [@Racot\_A](#):
>
> Thanks for the idea. I replaced Settings.cs and has unity errors.

This looks like you might have updated to 2.01.09 before replacing `Settings.cs`? For 2.01.09, try using this file: [Settings.txt](https://qa.fmod.com/uploads/short-url/AuklyXzGo4PIThRe8zysK9wK9vO.txt) (52.6 KB)

---

<div class="post-metadata">

**Author:** ![Racot\_A](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/racot_a/32/362_2.png) [@Racot\_A](https://qa.fmod.com/u/Racot_A)\
**Post date:** [May 13, 2021, 6:09am UTC](https://qa.fmod.com/t/an-item-with-the-same-key-has-already-been-added/17060/8 "2021-05-13T06:09:06Z")

</div>

Hmm. I trying to replace the Settings file with v2.01.09 again and has no errors.  
Thanks
