Coder Social home page Coder Social logo

Comments (5)

jhildenbiddle avatar jhildenbiddle commented on May 29, 2024

Interesting.

Unfortunately, this is the kind of error you will see in some browsers when you try to render a canvas element that exceeds the bounds or memory limitations of the browser/device. Older browsers were particularly bad with these hard crashes, but most modern browsers are able to handle these scenarios more gracefully by failing silently without taking down the entire tab/process/browser.

Is this happening on a real device or simulator / VM? The reason I ask is because virtual environments can produce inconsistent results due to the "virtualized" hardware they use. This is covered in the Known Issues section of the docs:

  1. Virtual environments may produce inconsistent results

Tests conducted on virtual machines may produce results that differ from actual hardware. This is to be expected, as the virtualized hardware used in these environments can impose its own unique size limitations separate from the browser.

In some virtualized environments (mostly with older browsers), canvas-size may produce inconsistent results or fail all tests when calling maxArea(), maxHeight(), maxWidth(), and test() using options.sizes. This is a result of the virtual GPU failing after a test canvas exceeds the browser's size limitations, causing all subsequent tests to fail even for canvas dimensions that are actually supported by the browser. The easiest and most reliable way to address these issues is to use a GPU-optimized virtual machine. If this isn't possible and your VM only supports software rendering, avoid iterating over canvas dimensions that exceed the browser's size limitations and instead specify dimensions that are known to be supported by the browser.

from canvas-size.

ercgrat avatar ercgrat commented on May 29, 2024

It happens on the actual device, as I mentioned, end-user reported! I’ll comment here if I get any information from my chrome report.

from canvas-size.

jhildenbiddle avatar jhildenbiddle commented on May 29, 2024

Got it. Based on the screenshot it looked like an emulator.

from canvas-size.

ercgrat avatar ercgrat commented on May 29, 2024

You’re correct I just had to reproduce it in an emulator :)

from canvas-size.

jhildenbiddle avatar jhildenbiddle commented on May 29, 2024

@ercgrat --

It doesn't appear there is anything to do on my end here, so I'm going to close this issue for now. Happy to reopen and discuss further if/when we have more information to work with.

from canvas-size.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.