Select to view content in your preferred language

Suddenly getting an error about key not found in dictionary for renderer component. Any ideas?

1070
5
02-23-2023 09:15 PM
zmarvin
Emerging Contributor

Here is the console error:

 

KeyNotFoundException: The given key '4157' was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <f3aec01a34d14c7080754e28743c8472>:0)
Esri.ArcGISMapsSDK.Renderer.RenderCommandClient.ExecuteRenderCommand (Esri.GameEngine.RCQ.RenderCommand renderCommand) (at Library/PackageCache/com.esri.arcgis-maps-sdk@d1c578d68416/SDK/Renderer/RenderCommandClient.cs:216)
Esri.ArcGISMapsSDK.Renderer.ArcGISRenderer.Update () (at Library/PackageCache/com.esri.arcgis-maps-sdk@d1c578d68416/SDK/Renderer/ArcGISRenderer.cs:131)
Esri.ArcGISMapsSDK.Components.ArcGISRendererComponent.Update () (at Library/PackageCache/com.esri.arcgis-maps-sdk@d1c578d68416/SDK/Components/ArcGISRendererComponent.cs:99)

 

The ArcGISRenderer and ArcGISRendererComponent.cs have not been updated. Any ideas why I'm suddenly getting this error?

0 Kudos
5 Replies
TomoTakeda
Esri Contributor

Hello,

We'd like to know how you start getting the error.


Does this error happen with your custom scene or one of our samples?
If the error happens with your custom scene, can you explain how your scene is set up? (Are you creating game objects programmatically? Do your scene have anything enabled/disabled during playtime?)
Do you get this error with the editor mode or play mode?

Any information about the situation you are getting this error will help us dig into it.

Thanks

0 Kudos
zmarvin
Emerging Contributor

Thanks for replying. This error happens in a custom (but very basic scene). I have added an ArcGISMap Game Object with a Map Type of Global. I have also imported a slpk layer. The error shows up in the editor mode and play mode. It shows in editor mode anytime I zoom in or out of the scene.

0 Kudos
TomoTakeda
Esri Contributor

Hello,

I'm trying to reproduce the error but I haven't managed yet so far.

How did you set up your map? With the Map Creator UI? Attaching components manually to game objects?

I'm also wondering if the same error is logged when you recreate the same scene.

Thanks,

0 Kudos
zmarvin
Emerging Contributor

I created and empty scene and copied over the game objects from the sample scene for the ArcGISCamera gameobject and the ArcGISMap gameobject. I uncommented the flag in the ArcGISMap script to stop hiding arcgis renderer components in the hierarchy. Added a hosted scenelayer package and api key to the ArcGISMap component. Everything was working at one point and then I started recieving the no key found error in the ArcGIS Renderer. I recreated the scene and reimported the package and I'm still encountering the issues. I'm in the process of recreating the entire Unity project to see if that works.

0 Kudos
Tenebros
New Contributor

I just started the tutorials and got the exact same error, did you manage to resolve it ?

0 Kudos