An item with the same key has already been added

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 :slight_smile:

Log warning

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


FMODStudioSettings.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

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. Perhaps looking at that thread might reveal some possible lines of investigation?

Thanks for the reply.

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

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 and see if it helps?

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

Updating to 2.01.09 not help too.

Got the same problem here… Any solution yet?

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 (52.6 KB)

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