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

Add null check for 2d context in CanvasView #1860

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dobesv
Copy link
Contributor

@dobesv dobesv commented Oct 2, 2020

Description

Sometimes we are getting errors logged and reported with the vague error message "null is not an object (evaluating r.save)".

I traced it to this line.

It seems there was already a similar check & error in CanvasProvider so I copied that error here.

Although this does not prevent the problem, it at least will give us a clearer error when the problem occurs.

As for why a 2D context cannot be created, we are still looking into it. Maybe the device (iPad) is running out of graphics memory?

@dobesv
Copy link
Contributor Author

dobesv commented Oct 2, 2020

I believe I found the cause of the issue that led me to this: https://bugs.webkit.org/show_bug.cgi?id=195325

Just a side-note for anyone running into this issue. This PR does not fix that issue, it just makes the error message clearer when it does happen.

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

Successfully merging this pull request may close these issues.

1 participant