Question

Problem

Using Director 11.5 and Windows 7, with MouseWheel Xtra (wheelmouse.zip), I have the folowing message in the message window when I scroll the mouse while the debugger is stopped:

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

Then, usually, it is no longer possible to continue stepping the code or inspect variables, open lists, etc. Sometimes Director crashes.

If I don't scroll when stopped in the debugger, there is no problem. But it is really hard not to scroll when debugging...

How to reproduce

  • create a new director movie
  • put something on the stage
  • paste the following code in a movie script
  • put a breakpoint in the on mouseDown handler
  • click on the stage
  • scroll the mouse wheel
  • try to step by step in the handler and open the list in the variable inspector

Lingo Code:

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
Was it helpful?

Solution

I don't have a real solution, but a workaround.

As explained in the comments, just add a put with an integer in the WheelMouseEvent handler and the problem is gone.

put nVal 

If someone find another solution, more discrete than filling the message window, I am interested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top