错误#1030:堆栈深度不平衡

时间:2010-10-23 09:24:42

标签: flash actionscript-3

我在这段代码中遇到了这个奇怪的问题:

private function initLevel():void {
    var levelMap:Array = 
    [ 
           [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
           [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    ];
    for (var y:* in levelMap) {
        for (var x:* in levelMap[y]) {
            trace(y, x);
            trace(levelMap[y, x]);
        }
    }
}

在flashdevelop中产生这个丑陋的怪物:

typecheck Level/initLevel()
  outer-scope = [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ flash.display::MovieClip$ Level$]
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
  0:debugfile "L:\svntest\flashgame\src;com\thom\TD;Level.as"
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
  2:debugline 66
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
  4:getlocal0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} (Level[O])
  5:pushscope
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  6:pushundefined
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (void[A])
  7:coerce_a
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (*[A])
  8:setlocal2
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  9:pushundefined
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (void[A])
  10:coerce_a
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (*[A])
  11:setlocal3
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  12:debug
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  17:debug
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  22:debugline 69
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} ()
  24:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I])
  26:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I])
  28:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I])
  30:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I])
  32:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I])
  34:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I])
  36:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  38:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  40:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  42:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  44:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  46:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  48:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  50:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  52:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  54:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  56:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  58:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  60:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  62:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  64:newarray 20
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O])
  66:debugline 70
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O])
  68:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I])
  70:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I])
  72:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I])
  74:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I])
  76:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I])
  78:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I])
  80:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  82:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  84:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  86:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  88:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  90:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  92:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  94:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  96:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  98:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  100:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  102:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  104:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  106:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...10: int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  108:newarray 20
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O])
  110:debugline 71
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O])
  112:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I])
  114:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I])
  116:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I])
  118:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I])
  120:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I])
  122:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I])
  124:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  126:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  128:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  130:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  132:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  134:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  136:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  138:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  140:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  142:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  144:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  146:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  148:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...10: Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  150:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...11: int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  152:newarray 20
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O])
  154:debugline 72
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O])
  156:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I])
  158:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I])
  160:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I])
  162:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I])
  164:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I])
  166:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I])
  168:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  170:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  172:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  174:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  176:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  178:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  180:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  182:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  184:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  186:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  188:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  190:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...10: Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  192:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...11: Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  194:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...12: int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  196:newarray 20
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O])
  198:debugline 73
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O])
  200:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I])
  202:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I])
  204:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I])
  206:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I])
  208:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I])
  210:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I])
  212:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  214:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  216:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  218:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  220:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  222:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  224:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  226:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  228:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  230:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (Array[O] Array[O] Array[O] Array[O] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I] int[I])
  232:pushbyte 0
                       [Level[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Level[O]} (...10: Array[O] 
//SIXTY THOUSAND CHAR SNIP  
  804:callproperty trace 1
                       [Level[O] Array[O] *[A] *[A] int[I] *[A] int[I] *[A]] {Level[O]} (global[O] *[A])
  807:pop
                       [Level[O] Array[O] *[A] *[A] int[I] *[A] int[I] *[A]] {Level[O]} (global[O])
------------------------------------
MERGE CURRENT 808:     [Level[O] Array[O] *[A] *[A] int[I] *[A] int[I] *[A]] {Level[O]} (global[O])
MERGE TARGET B808:     [Level[O] Array[O] *[A] *[A] int[I] *[A] int[I] *[A]] {Level[O]} ()
[Fault] exception, information=VerifyError: Error #1030: Stack depth is unbalanced. 1 != 0.

我认为它与范围界限或类似事情有关,但我很难过。

感谢您提前提供任何帮助

6 个答案:

答案 0 :(得分:23)

答案 1 :(得分:1)

Doh,我用[y,x]

取代[y][x]解决了这个问题

不确定为什么它没有给出一个更清楚的信息我做错了什么。

答案 2 :(得分:1)

这很时髦,我喜欢它。真是个错误!

levelMap[y, x]

其中 y 是一个对象而 x y 的属性。

快速测试:

var levelMap:Array = [[0, 100],
                      [20, 21]];
var something:* = levelMap[levelMap[0], 1]; // 100 - The second element of the first array!
trace(something);
something = levelMap[levelMap[0], 'length']; // 2
trace(something);

一些有趣的行为。有谁能解释?

更新:

我认为我们只是错误地使用它。

var a:Object = {num:0, fun:function(num:uint):void{this.num = num;}};
var b:Object = {num:0};
b[a, 'fun'](10);                                                                                                                                                                              
trace(a.num); // 
trace(b.num); // 10

b 是范围, a 是对象,'fun' a 的属性,和(10)是参数。这等于(但仍然使用堆栈上的额外对象):

a.fun.call(b, 10);

b 没有从堆栈弹出的原因是因为它是重复的,并且副本被用于函数调用。

90:getscopeobject 1
    stack: StackTest
    locals: StackTest StackTest * 
92:getslot 2
    stack: Object? (b)
    locals: StackTest StackTest * 
94:dup
    stack: Object? (b) Object? (Copy of b)
    locals: StackTest StackTest * 
95:setlocal2
    stack: Object? (b)
    locals: StackTest StackTest Object? (Copy of b) 
96:getscopeobject 1
    stack: Object? (b) StackTest
    locals: StackTest StackTest Object? (Copy of b)
98:getslot 1
    stack: Object? (b) Object? (a)
    locals: StackTest StackTest Object? (Copy of b)
100:pushstring "fun"
    stack: Object? (b) Object? (a) String ("fun")
    locals: StackTest StackTest Object? (Copy of b)
102:getproperty {StackTest...Object}::[]
    stack: Object? (b) * (a.fun)
    locals: StackTest StackTest Object? (Copy of b)
104:getlocal2
    stack: Object? (b) * (a.fun) Object? (Copy of b)
    locals: StackTest StackTest Object? (Copy of b)
105:pushbyte 10
    stack: Object? (b) * (a.fun) Object? (Copy of b) int (10)
    locals: StackTest StackTest Object? (Copy of b)
107:call 1 (Call a closure. 1 is the argument count. Stack: function (a.fun), receiver (Copy of b), arg (10).  The result (void) is pushed on the stack.)
    stack: Object? (b) * (void)
    locals: StackTest StackTest Object? (Copy of b)
109:pop
    stack: Object? (b)
    locals: StackTest StackTest Object? (Copy of b)
110:kill 2
    stack: Object? (b)
    locals: StackTest StackTest *

此外,使用以下语法可以看到一些时髦的行为:

b[1, true, a, 'fun'](10);

似乎你可以继续将未使用的对象添加到堆栈中,只评估最后的2个。

答案 3 :(得分:1)

对于遇到类似错误的人,我从一个不寻常的深夜错字中得到了这个错误:

SomeClass.staticMethod[var1,var2] 

而不是

SomeClass.staticMethod(var1,var2)

答案 4 :(得分:0)

你很可能只是解决了几乎杀了我的神秘问题^ _ ^ 我试图从转储中重新创建一个swf文件:

`[SWF]
  Header:
    Version: 10
    FileLength: 623
    FileLengthCompressed: 454
    FrameSize: (180,160)
    FrameRate: 8
    FrameCount: 10
  Tags:
    [69:FileAttributes] AS3: true, HasMetadata: false, UseDirectBlit: false, UseGPU: false, UseNetwork: false
    [09:SetBackgroundColor] Color: #666666
    [86:DefineSceneAndFrameLabelData]       Scenes:        [0] Frame: 0, Name: Scene 1
    [83:DefineShape4] ID: 1, ShapeBounds: (-100,1100,-100,1100), EdgeBounds: (0,1000,0,1000)
      FillStyles:
        [1] [SWFFillStyle] Type: 0 (solid), Color: FFFF0000
      LineStyles:`(and so on) 

使用as3swf(一个几乎只使用字节码本身的库)但今天(使用新下载的flex sdk 4.1)我得到的只是一个奇怪的痕迹(多次收到):

    [SWF]
    Version: 10
    FileLength: 21
    FileLengthCompressed: 21
    FrameSize: (14,14)
    FrameRate: 50
    FrameCount: 1
  Tags:

对我来说最奇怪的是它是一个全局存储ByteArray变量的痕迹,很可能只在运行时读取,但它存储的信息并没有丢失部分 - 几乎每个值都改变了< / p>

所以,谢谢你的回答,它为我解释了很多)

答案 5 :(得分:0)

在错字上错过=导致这个疯狂的错误。

赞:array.var[x,y];而不是array.var = [x,y];

相关问题