Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo跑不起来 #6

Closed
ChaimHong opened this issue Mar 30, 2017 · 14 comments
Closed

demo跑不起来 #6

ChaimHong opened this issue Mar 30, 2017 · 14 comments

Comments

@ChaimHong
Copy link

[2017-03-30 15:11:13 023] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2[System.UInt16,KBEngine.Property].get_Item (UInt16 key) [0x000a2] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150
at KBEngine.KBEngineApp.onUpdatePropertys_ (Int32 eid, KBEngine.MemoryStream stream) [0x000e1] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:1576
at KBEngine.KBEngineApp.Client_onUpdatePropertys (KBEngine.MemoryStream stream) [0x00020] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:1536
at KBEngine.KBEngineApp.Client_onCreatedProxies (UInt64 rndUUID, Int32 eid, System.String entityType) [0x0010e] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:1454
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115
at KBEngine.Message.handleMessage (KBEngine.MemoryStream msgstream) [0x0006d] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/Message.cs:126
at KBEngine.MessageReader.process (System.Byte[] datas, UInt32 offset, UInt32 length) [0x003c7] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/MessageReader.cs:164
at KBEngine.PacketReceiver.process () [0x00035] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/PacketReceiver.cs:64
at KBEngine.NetworkInterface.process () [0x00022] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/NetworkInterface.cs:224
at KBEngine.KBEngineApp.process () [0x00012] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:285
at KBEngine.KBEngineAppThread.process () [0x00008] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:2699
at KBEngine.KBEngineAppThread+KBEThread.run () [0x00019] in /Users/chaim/github.com/kbengine/kbengine_unity3d_demo/Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:2629
UnityEngine.Debug:LogError(Object)
KBEngine.Dbg:ERROR_MSG(Object) (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/Dbg.cs:53)
KBEngine.KBEThread:run() (at Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs:2633)
`
登陆的时候 unity3d 的报错
unity3d版本是5.5.1f1

@kbengine
Copy link
Owner

插件什么版本

@ChaimHong
Copy link
Author

@kbengine 0.9.12 直接git clone 到本地

@ChaimHong
Copy link
Author

204dcc4c-9ddc-4c42-bc93-854c62748731
版本是匹配的

@kbengine
Copy link
Owner

无法重现。

刚用unity5.3.5测试没问题,理论上5.5也不会有问题, 你的错误不涉及到资源和u3d相关

@ChaimHong
Copy link
Author

@kbengine 有什么方法可以调试么?跟环境有关系没?server启在ubuntu,客户端在mac,能正常创建账号,就是登陆不了

@kbengine
Copy link
Owner

你服务器的kbengine_assets_demos也是0.9.12吗? 这个版本如果不对是有可能出现你这个问题的, 因为数据过来c#代码解析不正确。

调试很简单啊, 你用VC调试unity代码就好了, 看看数据是什么, 为何转换失败

@ChaimHong
Copy link
Author

我的服务器demo 也是同样0.9.12,上面截图已经看得到了。

可以测试,但是不确定什么样的数据才是对的

@ChaimHong
Copy link
Author

或者你提供一个更简洁的demo 我试试

@kbengine
Copy link
Owner

截图只是引擎的版本, 脚本版本从未做过改变, 所以即使0.6.0版本的脚本依然可以用这个引擎来跑。

这就是简洁的demo

@kbengine
Copy link
Owner

你那个出错时是服务器更新客户端实体的属性时发生的, 所以你可以加点日志, 在那个出错函数里打印一下是在更新哪个属性时错了

@ChaimHong
Copy link
Author

服务端确定没问题,我朋友能连我的服务端。客户端代码和unity 都是同样版本的,就是系统不一样(windows/mac),他能正常运行,我的报错在属性变更。

顺便问下,多人一起玩的时候,别人会有一卡一卡的问题

@ChaimHong
Copy link
Author

我的朋友用我的项目在windows上运行也没问题,怀疑还是系统问题,会不会数据传输大小端的问题

@kbengine
Copy link
Owner

如果是大小端问题, 你都不可能登陆成功了

@kbengine
Copy link
Owner

还是要针对那个错误的数据看是那个属性, 什么数据才行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants