{"action":"closed","issue":{"url":"https://api.github.com/repos/mono/CocosSharp/issues/263","labels_url":"https://api.github.com/repos/mono/CocosSharp/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/mono/CocosSharp/issues/263/comments","events_url":"https://api.github.com/repos/mono/CocosSharp/issues/263/events","html_url":"https://github.com/mono/CocosSharp/issues/263","id":94575978,"number":263,"title":"CCNode.DrawSegment with a width of < 0 throws an OutOfMemoryException","user":{"login":"vchelaru","id":729631,"avatar_url":"https://avatars.githubusercontent.com/u/729631?v=3","gravatar_id":"","url":"https://api.github.com/users/vchelaru","html_url":"https://github.com/vchelaru","followers_url":"https://api.github.com/users/vchelaru/followers","following_url":"https://api.github.com/users/vchelaru/following{/other_user}","gists_url":"https://api.github.com/users/vchelaru/gists{/gist_id}","starred_url":"https://api.github.com/users/vchelaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchelaru/subscriptions","organizations_url":"https://api.github.com/users/vchelaru/orgs","repos_url":"https://api.github.com/users/vchelaru/repos","events_url":"https://api.github.com/users/vchelaru/events{/privacy}","received_events_url":"https://api.github.com/users/vchelaru/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mono/CocosSharp/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-12T15:55:34Z","updated_at":"2015-07-13T04:00:18Z","closed_at":"2015-07-13T04:00:18Z","body":"I haven't investigated the code but it seems like there's prob some math that causes endless drawing if a width is negative. \r\n\r\nThis occurred by creating a custom action which creates a line using various easing methods. Methods such as back and elastic will \"overshoot\" the value, so interpolating from a large value to a small value may cause the value to temporarily dip below 0, triggering this exception.\r\n\r\nExpected behavior would be to treat negative values as 0.\r\n\r\nStack trace included for convenience:\r\n\r\n\r\n  at (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr)\r\n  at (wrapper alloc) object:AllocVector (intptr,intptr)\r\n  at CocosSharp.CCRawList`1[CocosSharp.CCV3F_C4B].set_Capacity (Int32 value) [0x0001e] in <filename unknown>:0 \r\n  at CocosSharp.CCRawList`1[CocosSharp.CCV3F_C4B].Add (CocosSharp.CCV3F_C4B& item) [0x00017] in <filename unknown>:0 \r\n  at CocosSharp.CCRawList`1[CocosSharp.CCV3F_C4B].Add (CCV3F_C4B item) [0x00000] in <filename unknown>:0 \r\n  at CocosSharp.CCDrawNode.AddTriangleVertex (CCV3F_C4B triangleVertex) [0x00000] in <filename unknown>:0 \r\n  at CocosSharp.CCDrawNode.DrawSolidArc (CCPoint pos, Single radius, Single startAngle, Single sweepAngle, CCColor4B color) [0x00103] in <filename unknown>:0 \r\n  at CocosSharp.CCDrawNode.DrawSegment (CCPoint from, CCPoint to, Single radius, CCColor4F color) [0x00121] in <filename unknown>:0 \r\n  at ActionProject.LineNode.UpdateLine () [0x0004b] in /Users/vchelaru/Projects/ActionProject/ActionProject/ActionProject.Common/LineNode.cs:36 \r\n  at ActionProject.LineNode.set_Width (Single value) [0x00009] in /Users/vchelaru/Projects/ActionProject/ActionProject/ActionProject.Common/LineNode.cs:22 \r\n  at ActionProject.Common.LineWidthState.Update (Single time) [0x00024] in /Users/vchelaru/Projects/ActionProject/ActionProject/ActionProject.Common/LineWidthAction.cs:53 \r\n  at CocosSharp.CCEaseElasticOutState.Update (Single time) [0x00012] in <filename unknown>:0 \r\n  at CocosSharp.CCFiniteTimeActionState.Step (Single dt) [0x00056] in <filename unknown>:0 \r\n  at CocosSharp.CCActionManager.Update (Single dt) [0x000d8] in <filename unknown>:0 \r\n  at CocosSharp.CCScheduler.Update (Single dt) [0x00053] in <filename unknown>:0 \r\n  at CocosSharp.CCApplication.Update (Microsoft.Xna.Framework.GameTime gameTime) [0x00118] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.Game.<.cctor>b__19 (IUpdateable updateable, Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.Game+SortingFilteringCollection`1[Microsoft.Xna.Framework.IUpdateable].ForEachFilteredItem[GameTime] (System.Action`2 action, Microsoft.Xna.Framework.GameTime userData) [0x0007d] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.Game.Update (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 \r\n  at CocosSharp.CCGame.Update (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.Game.Tick () [0x000ee] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.iOSGamePlatform.Tick () [0x0002d] in <filename unknown>:0 \r\n  at Microsoft.Xna.Framework.iOSGameView.DoTick () [0x00000] in <filename unknown>:0 \r\n  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)\r\n  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/UIKit/UIApplication.cs:63 \r\n  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/UIKit/UIApplication.cs:47 \r\n  at ActionProject.AppDelegate.Main (System.String[] args) [0x00008] in /Users/vchelaru/Projects/ActionProject/ActionProject/ActionProject.iOS/AppDelegate.cs:31 "}}