2010-10-23 16 views
11

Tengo este extraño problema en este código:Error # 1030: La profundidad de pila es desequilibrada

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]); 
     } 
    } 
} 

produce este monstruo feo en 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. 

Creo que tiene algo que ver con scoping o algo así, pero estoy perplejo.

Gracias por cualquier ayuda de antemano

Respuesta

21

A Dije en comentarios anteriores, creo que esto es un error del compilador, basado en el simple hecho de que el compilador produjo un bytecode ilegal y el jugador pudo capturar este bytecode malformado y arrojar un VerifyError en consecuencia.

Sin embargo, tras algunas investigaciones, encontré un par de cosas interesantes.

En primer lugar, las conclusiones de Joony me pusieron en el camino correcto.Aparentemente, como muestra su código, puede engañar al compilador para que traduzca lo que hay entre los corchetes como acceso a la propiedad.

lo tanto, esto:

foo[foo,'length'] 

es equivalente a:

foo["length"] 

Hay un problema aquí, pero lo explicaré en un segundo.

También puede llamar a los métodos, así:

var foo:Array = []; 
foo[foo,'push'](1); 
trace(foo); 

Esto hará que efectivamente 1 en foo

Con un poco de engaño adicionalmente, puede cadena de todo esto para conseguir este desagradable bestia:

var inner:Array  = [10]; 
var outter:Array = [1,2,inner]; 
(inner[outter, 'pop']).call(null)[inner,'push'].call(null,20); 

trace(inner); 
trace(outter); 

Esto es equivalente a:

var inner:Array  = [10]; 
var outter:Array = [1,2,inner]; 
outter.pop().push(20); 

Esto es, sacamos inner de outter y luego pulsamos 20.

empecé a notar que aquí

inner[outter, 'pop'] 

inner no se utiliza.

De hecho, se puede cambiar a:

null[outter,'pop'] 

o incluso

(void)[outter,'pop'] 

y el compilador no se quejan de ello (ni va a hacer el jugador). Dudo que lo anterior sea válido Actionscript sintacticamente (en cuyo caso el compilador debería negarse a compilarlo), pero no estoy 100% seguro. Sin embargo, este objeto no utilizado es la raíz del problema. (Lo siguiente requiere algunos conocimientos básicos sobre cómo funciona el ensamblaje flash o cualquier otro montaje basado en pila, pero espero poder explicarlo para que pueda entenderse sin asumir demasiado).

Desensamblé el bytecode generado por este código ActionScript :

var arr:Array = [10]; 
null[arr,'length']; 

código desensamblado:

function private::initLevel():void /* disp_id 0*/ 
{ 
    // local_count=2 max_scope=1 max_stack=3 code_len=17 
    0  getlocal0  
    1  pushscope  
    2  pushbyte  10 
    4  newarray  [1] 
    6  coerce   Array 
    8  setlocal1  
    9  pushnull   
    10 getlocal1  
    11 pushstring  "length" 
    13 getproperty  null 
    15 pop    
    16 returnvoid  
} 

Vamos a ir paso a paso. instr es el desplazamiento de la instrucción; stack_state muestra el estado actual de la pila después de que se ejecuta la instrucción; comments es auto-explicativo;)

instr stack_state    comments 
    -------------------------------------------------------------------------------------------  
    0  this     "this" is always passed in local register 0 to instance methods 
    1        "this" is added to the scope chain and popped 
    2  10      now, we have 10 on the stack  
    4  [10]     an array is created and initialized taking 1 element from the stack 
    6  [10]     this is sort of like doing [10] as Array 
    8        the array is assigned to local variable 1 
    9  null     null is pushed. That is the null in this line: 
           null[arr,'length'] 
           HERE BEGINS THE PROBLEM! 
    10 null,local1    local 1 is pushed 
    11 null,local1,"length" the string constant "length" is pushed 
    13 null,local1["length"] getproperty null is used for dynamic lookup (object["prop"]). Both operands are popped from the stack 
    15 null     in the previous step, the result of local1["lengtht"] was pushed. But we dind't use it, so it's discarded 
    16 null     here the method returns. The stack should be empty, but it's not. 
           The generated code should have popped the null pushed at #9, 
           or it shouldn't have pushed it in the first place 

El problema es que después de dejar el método, todos los objetos inserta en la pila por el método debería haber sido reventado. Este no es el caso, ya que la constante null permanece en la pila después de que el método retorna. En otras palabras, tenemos una pila desequilibrada. Ahora, el jugador aparentemente no le importa o no controla.Creo que debería, y no debería ejecutar este código, ya que esto podría (al menos potencialmente) conducir a un desbordamiento de la pila si esto crece lo suficientemente grande.

Ahora, si cambiamos la sección de código problemático para ser incluido dentro de un bloque de salto (como el bloque alcanzado después de un salto condicional como un if), el jugador rechaza el código con el mensaje:

VerifyError: Error #1030: Stack depth is unbalanced. 1 != 0. 

Lo mismo que el OP. Entonces, parece que la presencia de una rama desencadena algún tipo de control de la integridad de la pila en el jugador. En este punto, se debe tener en cuenta que se implementa un bucle Actionscript (cualquier tipo de bucle) en el nivel bytecode como un salto condicional, al igual que un ìf. Entonces, aunque no tenemos un bucle en el siguiente código (un if produce un código que es más corto y más simple de analizar), ya que activa este control en el reproductor, para nuestros propósitos, es lo mismo que tener un bucle, como lo hizo el OP

En AS código:

var dummy:int = 1; 
var arr:Array = [10]; 
if(dummy != 0) { 
    null[arr,'length']; 
} 

desensamblado:

function private::initLevel():void /* disp_id 0*/ 
{ 
    // local_count=3 max_scope=1 max_stack=3 code_len=27 
    0  getlocal0  
    1  pushscope  
    2  pushbyte  1 
    4  setlocal1  
    5  pushbyte  10 
    7  newarray  [1] 
    9  coerce   Array 
    11 setlocal2  
    12 getlocal1  
    13 pushbyte  0 
    15 ifeq   L1 

    19 pushnull   
    20 getlocal2  
    21 pushstring  "length" 
    23 getproperty  null 
    25 pop    

    L1: 
    26 returnvoid  
} 

Paso a paso:

instr stack_state    comments 
    -------------------------------------------------------------------------------------------  
    0  this     "this" is always passed in local register 0 to instance methods  
    1        "this" is added to the scope chain and popped 
    2  1      now, we have 1 on the stack  
    4        1 is popped and assigned to the local variable 1 (the dummy var in the code) 
    5  10      10 is pushed 
    7  [10]     an array is created and initialized taking 1 element from the stack 
    9  [10]     this is sort of like doing [10] as Array 
    11       the array is assigned to local variable 2 (the arr var in the code) 
    12 local1     local1 (dummy) is pushed 
    13 local1,0    0 is pushed 
    15       this instruction consumes (pops) both local1 and 0 to compare them 
           If this condition is satisfied, it jumps to the label L1 
           If it is not, it falls-through to the next instruction 
           (the same as a case label in a switch statement that does not have a break, in Actionscript code) 
    19 null     null is pushed. That is the null in this line: 
           null[arr,'length'] 
           Again, HERE BEGINS THE PROBLEM! 
    20 null,local2    local2 is pushed 
    21 null,local2,"length" the string constant "length" is pushed 
    23 null,local2["length"] getproperty null is used for dynamic lookup (object["prop"]). Both operands are popped from the stack 
    25 null     the value returned by local2["length"] is discarded 

    26 null     the method returns, but null is not properly popped from the stack! 

Así, de nuevo, null es todavía en la pila después el procedimiento vuelve; la pila es desequilibrada. Pero esta vez, el jugador comprueba esto, encuentra el problema, arroja un VerifyError y anula el código.

En cualquier caso, para concluir, mis conclusiones son: el compilador genera bytecode ilegal en ambos casos. Creo que esto es un error. El jugador rechaza este código si es capaz de detectarlo. Pero parece que solo es capaz de detectarlo si el código problemático está dentro de un bloque de salto (también parece un error).

Adición:

Joony menciona en un comentario que "Si regresa inmediatamente antes del salto entonces ningún error". Cual es verdad. El motivo es que el código dentro del If, pero después del retorno, es "código muerto", por lo que el compilador lo quita del bytecode.

Por lo tanto, no es el salto en sí lo que hace que el jugador verifique la integridad de la pila. Busqué en Google un poco y encontré this on the haxe site.

Error de desequilibrio de la pila. Significa que dos ramas de un salto dan como resultado diferentes tamaños de pila cuando se unen. Todos los saltos o el código que conducen a una posición determinada deben dar como resultado el mismo tamaño de pila.

Lo que lo hace todo más claro.

En el segundo ejemplo de código anterior, eso es lo que realmente está sucediendo.

Si el código sigue el salto en la instrucción 15, cae directamente en la última instrucción (26) para regresar al llamante. null no se ha insertado y no hay nada más en la pila, por lo que llegamos a este punto con un tamaño de pila de 0.

Si el código no salta y se cae, null se presionará (19) y no se abrirá. Entonces, este camino alcanzará la última instrucción (26) con null en la pila, lo que significa que el tamaño de la pila es 1. Esta última instrucción es el punto donde ambas ramas se unen, pero después de una rama, el tamaño de la pila es 0, mientras después del otro, es 1. Y esto es lo que hace que el jugador se queje de una pila desequilibrada.

+0

¡muy interesante! – grapefrukt

+0

Excelente publicación. Yo también estaba persiguiendo el 'salto'. Si regresas inmediatamente antes del salto, entonces no hay error. Me encanta el (inner[outter, 'pop']).call(null)[inner,'push'].call(null,20); Me pregunto de dónde vino esta extraña sintaxis. Tal vez alguien de Adobe puede explicarlo. – Joony

+0

@Joony. Gracias. Buen punto sobre el regreso inmediato. Que tiene sentido. Googleando un poco encontré lo que realmente significa este mensaje de error en el sitio haxe. Lo cual explica el problema más claramente. He agregado esto a mi respuesta. –

1

Doh, me lo resolvieron mediante la sustitución de [y,x] con [y][x]

No sé por qué no dio un mensaje más claro lo que estaba haciendo mal.

+0

yo diría que ha encontrado un error en el compilador, si se trataba de un mensaje en tiempo de ejecución. El tiempo de ejecución detectó bytecode ilegal. El compilador produjo ese bytecode de actionscript no válido. Debería haberle dado un error y negarse a compilar su código. –

+0

Posiblemente. Estoy usando FlashDevelop con la versión de Flex SDK 4.1.0: 16076 Si estoy de acuerdo con el archivo flex-sdk-description.xml. Puede ser útil si alguien quiere reproducir esto. –

+0

Tengo SKD 3.5.0.12683 disponible ahora mismo, pero pude reproducir el error simplemente pegándote código, compilando y ejecutándome. Definitivamente parece un error de compilación. –

1

Esto es funky, me encanta. ¡Qué error!

levelMap[y, x] 

Dónde y es un objeto y x es una propiedad de y.

Una prueba rápida:

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); 

Algunos comportamiento interesante. ¿Alguien capaz de explicar?

ACTUALIZACIÓN:

Creo que sólo estamos usando mal.

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 

Dónde b es el alcance, un es un objeto, 'diversión' es la propiedad de un, y (10) es el argumento. Esto es igual a (pero aún con el objeto extra en la pila):

a.fun.call(b, 10); 

La razón b no consigue apareció de la pila es porque se duplica y el duplicado se está utilizando para la llamada de función .

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 * 

Además, un comportamiento cobarde puede verse mediante el siguiente sintaxis:

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

Parece que sólo puede seguir añadiendo objetos no utilizados a la pila y sólo se evalúan los 2 últimos.

+0

He encontrado un par de cosas interesantes sobre esto. Mira mi respuesta para los detalles. –

+0

¡Excelente investigación! Ojalá pudiera +3. –

+0

Mmm. Interesante. Entonces, de alguna manera, aquí 'b [a, 'diversión'] (10); ',' b' se está utilizando como el objeto de contexto? Lo miraré de cerca cuando tenga un poco de tiempo libre. –

0

OMG es muy probable que acabamos de resolver el problema misterioso que casi me mata^_^ yo estaba tratando de volver a crear un archivo SWF de un vertedero:

`[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) 

usando as3swf (una biblioteca que utiliza casi Sólo el código de bytes dentro de sí mismo) pero hoy en día (con un SDK de Flex recién descargado 4.1) todo lo que tengo una extraña traza (recieved muchas veces):

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

y lo más extraño para mí fue que era un rastro de Variable ByteArray de almacenamiento global que muy probablemente fue o ólo leer durante el tiempo de ejecución, pero la información que se almacena no tenía sólo una parte faltante - casi cada valor cambiado

así que gracias por su respuesta, se explicó mucho para mí)

1

Para cualquiera que venga a través de errores similares, tengo este error de una noche error tipográfico inusual:

SomeClass.staticMethod[var1,var2] 

en lugar de

SomeClass.staticMethod(var1,var2) 
0

omitida un = en un error tipográfico lo que resulta en este error loco.

igual: array.var[x,y]; en lugar de array.var = [x,y];

Cuestiones relacionadas