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

mask and tint throwing errors in the live editor with PJS programs #746

Open
grantjenkins opened this issue Jan 22, 2021 · 2 comments
Open

Comments

@grantjenkins
Copy link

grantjenkins commented Jan 22, 2021

Approx. two months ago mask and tint started throwing errors in PJS programs. Issue was with existing projects that were originally working fine, and any new projects.

Error message for mask is: __env__.img.mask is not a function
Error message for tint is: Cannot read property '0' of undefined

A lot of KA users have mentioned that they've logged the issue with KA support, but I haven't heard anything more about it, and issue persists. Just wondering if this has been logged in your internal issue tracker, and any status update?

My KA username is grantjenkins.

@MatthiasPortzel
Copy link
Contributor

I was going to report this, but at the time the bug first appeared, this repository hadn’t had any recent commits. Additionally, when I went to bisect the bug, the minimum reproduction case I was using showed issues in year-old builds.

For these reasons, an internal change to the build process is a very possible culprit.

If anyone has a reproduction case of a program that was confirmed to work before this change, and is now broken (I know such programs exist), sharing would be appreciated.

@grantjenkins
Copy link
Author

grantjenkins commented Jan 24, 2021

Hi Matthias - this was one of my programs that was working fine, then was just broken.
https://www.khanacademy.org/computer-programming/cat-in-a-storm-animated/5165045920251904

Note that I've put /* jshint ignore: start */ on line 50 to get around the issue temporarily. If you remove that it'll get the original error.

Another one that got the error (was working fine before):
https://www.khanacademy.org/computer-programming/rover-game/6053666578055168

/* jshint ignore: start */ on line 33 for that one.

For tint I get a separate error (see updated initial message with both error messages). See simple code snippet below that will generate the error.

var img = getImage("avatars/robot_male_3");
image(img, 0, 0);
tint(10, 10, 10, 200);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants