Why this:: KeyNotFoundException: The given key was not present in the dictionary.
Options
njt1982
✭
in Photon Bolt
KeyNotFoundException: The given key was not present in the dictionary.My game and networking code were all working last time I used Unity. I was prompted that 5.3.6 was out (I was on 5.3.5) so I updated it.
System.Collections.Generic.Dictionary`2[Bolt.NetworkId,EntityProxy].get_Item (NetworkId key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
EntityChannel.ReadUpdate (Bolt.Packet packet)
EntityChannel.Read (Bolt.Packet packet)
BoltConnection.PacketReceived (UdpKit.UdpPacket udpPacket)
UnityEngine.Debug:LogException(Exception)
BoltLog:Exception(Exception)
BoltConnection:PacketReceived(UdpPacket)
BoltCore:Udp_PacketReceived(UdpEvent)
BoltCore:PollNetwork()
BoltCore:Poll()
BoltPoll:FixedUpdate()
Now I get this error when a client joins a server.
Just after it I also get:
exception thrown while unpacking data from [EndPoint 127.0.0.1:51234 | 9151314447111866402], disconnectingAny idea's? Anything I can do to debug this? I've tried recompiling the prefabs. I've tried reinstalling Bolt.
UnityEngine.Debug:LogError(Object)
Unity:BoltLog.IWriter.Error(String)
BoltLog:Error(String)
BoltLog:Error(String, Object)
BoltConnection:PacketReceived(UdpPacket)
BoltCore:Udp_PacketReceived(UdpEvent)
BoltCore:PollNetwork()
BoltCore:Poll()
BoltPoll:FixedUpdate()
0
Best Answers
-
I've tested Bolt on 5.3.6 and don't have any problems. Can you send your project to support@boltengine.com so we can take a look?6
-
It looks like all your Bolt dll were deleted somehow, I recommend reverting your source control to before this happened or reimporting Bolt and remaking your states etc6
-
bolt.dll, bolt.user.dll are missing in that folder5
-
They're not in the zip file you sent me5
-
New zip works perfect, have no problems playing multiplayer6
-
Debug start works fine for me on your game.
If you do play as server for the menu, Bolt will already be running when your menu tries to launch Bolt.5
Answers
-
I've tested Bolt on 5.3.6 and don't have any problems. Can you send your project to support@boltengine.com so we can take a look?6
-
I can do - is there some settings cache that might need resetting?!
I've DM'd you a zip of the project.
Thanks so much for looking into this!
0 -
It looks like all your Bolt dll were deleted somehow, I recommend reverting your source control to before this happened or reimporting Bolt and remaking your states etc6
-
Hmm... interesting. I've reviewed the commits since it worked and the old file that's changed with the "dll" in the name is
Assets/bolt/assemblies/bolt.user.dll.mdb
- but being binary, bitbucket obviously can't "diff" it.
That seems to be the file that's changed every time I compile the states.
I have already done an Assets > Bolt > Install again to be sure nothing has gone wonky there. By "remake the states" do you mean delete and make them again?0 -
Which Bolt DLL's are you expecting to see/find? (I wonder if they are excluded by gitignore?!)0
-
bolt.dll, bolt.user.dll are missing in that folder5
-
$ find . -name 'bolt.dll'
./Assets/bolt/assemblies/bolt.dll
Looks like DLL's are being ignored from Git...
$ find . -name 'bolt.user.dll'
./Assets/bolt/assemblies/bolt.user.dll
Those DLL's exist..
$ git ls-files . --ignored --exclude-standard --others | grep '.dll'
Assets/bolt/assemblies/bolt.dll
Assets/bolt/assemblies/bolt.user.dll
Assets/bolt/assemblies/editor/bolt.compiler.dll
Assets/bolt/assemblies/editor/bolt.editor.dll
Assets/bolt/assemblies/editor/protobuf-net.dll
Assets/bolt/assemblies/udpkit/udpkit.common.dll
Assets/bolt/assemblies/udpkit/udpkit.dll
Assets/bolt/assemblies/upnp/Mono.Nat.dll
...
...0 -
Ahh I have a .gitignore in my home folder which is setup to ignore "compile" stuff like DLLs, EXE and .o files...0
-
They're not in the zip file you sent me5
-
That's correct - I have just sent you a new one. My git config was not committing DLL and SO files. I've allowed them now.
I did have them locally. Just not in the repo.0 -
New zip works perfect, have no problems playing multiplayer6
-
oh good. hah.
Maybe I need to checkout the whole project again...
Or maybe it's because I'm trying to launch using Bolt Scenes?!0 -
Yup - it works if I compile a binary and run two things manually... (never thought to try this).
If I fire up the Bolt Scenes and run it through there, the client crashes when it connects.
Also, with Bolt Scenes, I have to do Play As Server directly on the Game scene, I cant launch the main menu. (This is likely a bug in my code, I imagine).0 -
Debug start works fine for me on your game.
If you do play as server for the menu, Bolt will already be running when your menu tries to launch Bolt.5 -
0