Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MovieClip fails at installPlugin with RangeError: Maximum call stack size exceeded #973

Open
david-polak opened this issue Jul 15, 2018 · 0 comments
Assignees
Labels

Comments

@david-polak
Copy link

Issue Details

  • Version: 2.0.0-Beta2
  • Libraries: Webpack (4.15.0)
  • Chrome Version 67.0.3396.99 (Official Build) (64-bit)

Importing this

import { Stage, Shape, MovieClip } from '@createjs/easeljs'

And trying to instantiate a Movie clip

var mc = new MovieClip({loop: -1, labels: {myLabel: 20}})

I get an RangeError: Maximum call stack size exceeded

Tween.js:315 Uncaught RangeError: Maximum call stack size exceeded
    at Function.installPlugin (Tween.js:315)
    at Function.install (easeljs.module.js?:formatted:3611)
    at Function.installPlugin (Tween.js:316)
    at Function.install (easeljs.module.js?:formatted:3611)
    at Function.installPlugin (Tween.js:316)
    at Function.install (easeljs.module.js?:formatted:3611)
    at Function.installPlugin (Tween.js:316)
    at Function.install (easeljs.module.js?:formatted:3611)
    at Function.installPlugin (Tween.js:316)
    at Function.install (easeljs.module.js?:formatted:3611)

In easeljs.module.js

class MovieClipPlugin {
    constructor() {
        throw "MovieClipPlugin cannot be instantiated.";
    }
    static install() {
createjs_tweenjs_src_Tween__WEBPACK_IMPORTED_MODULE_0__["default"].installPlugin(MovieClipPlugin);
// ^^^^^^^^^^^^^^^^^  RangeError: Maximum call stack size exceeded
    }
    static init(tween, prop, value) {
        return value;
    }
    static tween(tween, prop, value, startValues, endValues, ratio, wait, end) {
        if (!(tween.target instanceof MovieClip)) {
            return value;
        }
        return ratio === 1 ? endValues[prop] : startValues[prop];
    }
}

in Tween.js

static installPlugin (plugin, props) {
// ^^^^^^^^^^^^^^^^^ 
		plugin.install(props);
		const priority = (plugin.priority = plugin.priority || 0), arr = (Tween._plugins = Tween._plugins || []);
		for (let i = 0, l = arr.length; i < l; i++) {
			if (priority < arr[i].priority) { break; }
		}
		arr.splice(i, 0, plugin);
	}
@lannymcnie lannymcnie added the 2.0 label Nov 21, 2018
@tehvgg tehvgg self-assigned this Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants