Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Crash on iOS with CCTransitionFade  #283

@heiko-holz

Description

@heiko-holz

I have a problem with CCTransitionFade on iOS devices.

var scene = GameScene (this.Window, this.Level);
var trans = new CCTransitionFade (2f, scene);
Director.ReplaceScene (trans);

Sometimes, the following error occurs:

Array index is out of range.
  at CocosSharp.CCRenderer.PushLayerGroup (Microsoft.Xna.Framework.Matrix& viewMatrix, Microsoft.Xna.Framework.Matrix& projMatrix) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCLayer.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCNode.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCScene.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCTransitionSceneContainerNode.VisitRenderer (CocosSharp.CCAffineTransform& worldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCNodeGrid.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCNode.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCLayer.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCNode.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCScene.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCNode.Visit () [0x00000] in <filename unknown>:0 
  at CocosSharp.CCWindow.Draw (CocosSharp.CCGameTime gameTime) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCWindow.MainLoop (CocosSharp.CCGameTime gameTime) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCApplication.Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game.<.cctor>b__18 (IDrawable drawable, Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game+SortingFilteringCollection`1[Microsoft.Xna.Framework.IDrawable].ForEachFilteredItem[GameTime] (System.Action`2 action, Microsoft.Xna.Framework.GameTime userData) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game.Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 
  at CocosSharp.CCGame.Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game.DoDraw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.Game.Tick () [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.iOSGamePlatform.Tick () [0x00000] in <filename unknown>:0 
  at Microsoft.Xna.Framework.iOSGameView.DoTick () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00000] in <filename unknown>:0 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0 
  at Prosodia.iOS.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0 

When I directly replace the scene Director.ReplaceScene(scene) instead of the transition, it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions