1

問題

Director 11.5 と Windows 7 を使用し、 MouseWheel Xtra (wheelmouse.zip) を使用すると、デバッガーが停止しているときにマウスをスクロールすると、メッセージ ウィンドウに次のメッセージが表示されます。

lcr_stk_PopFrame: unbalanced stk lcr_stk_PopFrame: unbalanced stk prev=1560 top=1568

その後、通常は、コードのステップ実行を続行したり、変数を検査したり、リストを開いたりすることができなくなります。Director がクラッシュすることがあります。

デバッガで停止時にスクロールしなければ問題ありません。しかし、デバッグ時にスクロールしないのは本当に難しいです...

再現方法

  • 新しいディレクター ムービーを作成する
  • ステージに何かを置いて
  • 次のコードをムービー スクリプトに貼り付けます
  • on mouseDown ハンドラにブレークポイントを設定します
  • ステージをクリック
  • マウスホイールをスクロールする
  • ハンドラーでステップごとに試して、変数インスペクターでリストを開きます

用語コード:

on startmovie
  put "sartWheelMouse"
  startWheelMouse()
end

on stopMovie
  put "closeWheelMouse"
  closeWheelMouse()
end 


on WheelMouseEvent (nVal)
  -- This is a workaround. Putting the param or an integer allows further operation.
  -- Without it, putting a string or even assigning a string to a var will 
  -- produce problem if user scrolls while stopped in debugger
  --put nVal

  -- this one doesn't harm
  aa = 45

  -- problem if the workaround is not present
  aa = "SAGFD"

  -- problem if the workaround is not present
  aa = string(34)

  -- problem if the workaround is not present
  put "wheelMouseEvnt enter"

end


on mouseDown me
  put "mousedown"

  -- Put a breakpoint here. THen step by step and open the list in the variable inspector
  -- Without the workaround in WheelMouseEvent, if you scroll while the debugger is stopped, 
  -- the debugger doesent work anymore, the list cannot be inspected and sometimes, Director crashes.
  a = 32
  b = "a234"

  lst = ["asdfk asldjasdflkj", "asdfk asldjasdflkj", "asdfk asldjasdflkj"]

  a = 32
  b = "a234"

end
4

1 に答える 1

1

本当の解決策はありませんが、回避策があります。

コメントで説明されているように、WheelMouseEvent ハンドラーに整数の put を追加するだけで、問題はなくなります。

put nVal 

誰かが別の解決策を見つけたら、メッセージ ウィンドウをいっぱいにするよりも離散的で、興味があります。

于 2012-06-15T01:56:14.677 に答える