AngryAnt/Behave-release — Issue #25: Runtime error on empty decorator
Author: ricardojmendez
Created: 2011-10-17 11:41:53+00:00
State: open

If a decorator on a tree does not have any children, Behave will raise a IndexOutOfRangeException and the "Compiling" window will remain open. There is no way to close the window/progress bar other than fixing the library and re-compiling the asset.

System.IndexOutOfRangeException: Array index is out of range.
at Behave.Editor.Compilers.CSharp.BuildDecorator (Behave.Assets.Decorator componentAsset, Int32 componentIdx) [0x00000] in :0
at Behave.Editor.Compilers.CSharp.BuildTreeClasses () [0x00000] in :0
at Behave.Editor.Compilers.CSharp.Compile () [0x00000] in :0
at Behave.Editor.Compilers.Unity.Compile () [0x00000] in :0
UnityEngine.Debug:LogError(Object)
Behave.Runtime.Resources:LogError(String)
Behave.Editor.Compilers.Unity:Compile()
Behave.Editor.Compiler:Run()
Behave.Editor.Compiler:DoCompile(IBehaveAsset, Boolean)
Behave.Editor.Compiler:Compile(IBehaveAsset, Boolean)
BehaveMenu:Compile(Boolean) (at Assets/Behave/Editor/BehaveMenu.cs:55)
BehaveMenu:Compile() (at Assets/Behave/Editor/BehaveMenu.cs:31)
BehaveAssetEditor:Update() (at Assets/Behave/Editor/BehaveAssetEditor.cs:36)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()