[Flash8] [AS2] MovieClip.removeMovieClip doesn't return?!

MovieClip.removeMovieClip doesn’t return?!

I am maintaining a legacy AS2 project in which a bug is identified recently. After extensive tracing, I found the the offending statement in a class (let’s name it ClassA):


        trace("script is in depth " + _root.script.getDepth());
        _root.script.removeMovieClip();
        trace("successfully removed script MC.");

The 1st trace prints 65535, and the 2nd trace is no where to be found in the debug log. The call to removieMovieClip() never returns, which ‘blocks’ the whole process.
The MC ‘_root.script’ is created dynamically:

_root.createEmptyMovieClip("script",65536);

And it has a non-negative depth value.

There’s something very strange: I compared many historical versions of the code, and found the ‘root’ cause in another class (ClassB’s MethodA):


        var pf:util.Converter = new util.Converter(refStg, this);

If I comment out the call to ‘new util.Converter()’ and compile, the ‘removeMovieClip’ call mentioned above works properly. (I use Flash CS4 to compile the fla’s in the project.)
Restore this call and compile, the ‘removeMovieClip’ fails silently.
Though ClassB is instantiated, it’s MethodA is NEVER CALLED at all. Including the call and compiling the code is enough to trigger the bug.
ClassA and ClassB are completely irrelevant to each other.

I am completely at a loss of what’s going on behind the scene. Can anyone help?

Much thanks in advance.