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

通过 exSprite Component 的快捷选栏,列表中选择 TextureInfo/exBitmapFont, 快速切换None和Assets,之后确认选择,最终会导致crash. 在此过程中还会产生 null reference 的问题 #28

Open
jwu opened this issue Aug 23, 2013 · 4 comments
Assignees
Labels

Comments

@jwu
Copy link
Contributor

jwu commented Aug 23, 2013

h_gc _m16quve nt o 0ix1
ml w4r iu c4 pub89fnq

有图有真相。

@ghost ghost assigned jareguo Aug 23, 2013
@jwu
Copy link
Contributor Author

jwu commented Aug 23, 2013

NullReferenceException: Object reference not set to an instance of an object
exSprite.SimpleUpdateVertexBuffer (.exList`1 _vertices, Int32 _startIndex, UnityEngine.Matrix4x4& _spriteMatrix) (at Assets/ex2D/Runtime/Components/exSprite.cs:540)
exSprite.GetVertices (UnityEngine.Matrix4x4& _spriteMatrix) (at Assets/ex2D/Runtime/Components/exSprite.cs:455)
exSpriteBase.GetWorldVertices () (at Assets/ex2D/Runtime/Components/Internal/exSpriteBase.cs:550)
exSceneEditor.DrawBoundingRect (.exSpriteBase _node) (at Assets/ex2D/Editor/exSceneEditor.cs:865)
exSceneEditor.DrawScene (Rect _rect) (at Assets/ex2D/Editor/exSceneEditor.cs:774)
exSceneEditor.SceneViewField (Rect _rect) (at Assets/ex2D/Editor/exSceneEditor.cs:563)
exSceneEditor.Layout_SceneViewField (Int32 _width, Int32 _height) (at Assets/ex2D/Editor/exSceneEditor.cs:550)
exSceneEditor.OnGUI () (at Assets/ex2D/Editor/exSceneEditor.cs:199)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

@jareguo
Copy link
Contributor

jareguo commented Aug 23, 2013

已在GetVertices中加入保护,由于未能重现,还需要你测试一下。

@jwu
Copy link
Contributor Author

jwu commented Aug 24, 2013

NullReference 的错误已经解决,但是 Crash 仍然存在。一个比较简单的重现方法是在 None 的下面的那个 TextureInfo上按 "箭头上",这样他会在 None 和 TextureInfo之间快速反复切换。多试几次后,confirm,就会在反复试验中crash

@jwu
Copy link
Contributor Author

jwu commented Aug 25, 2013

Crash 的原因被锁定在 exEditorUtility.Init() 代码里。由于初始化了资源,并且初始化是在 Unity 推荐的 [InitializeOnLoad] 中进行。目前通过将 Init 中的代码挪到 Property 中来解决。

但是还是会出现另外一个叫做 PPtr cast failed when dereferencing! Casting from Texture2D to MonoBehaviour! 的报错信息。

发生的方法就是不断地点击 Camera 中的 Color 颜色,然后enter 确定颜色选择
我暂时认为这个是我们代码内照成的bug,虽然我网上找了下,有很多插件都有这种问题

@ghost ghost assigned jwu Aug 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants