question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iPad IOS 14 Safari/Chrome crashes after several canvas resizes

See original GitHub issue

Describe the bug

Three js crashes on iPad IOS 14 after several canvas resizes

To Reproduce

Open https://jsfiddle.net/jfbt6zxa/4/ with iPad IOS 14, press ''Run With Three.js" button On my iPad Pro the maximum number of resizes before crash in 363 Version without Three.js works fine

Code

        const renderer = new THREE.WebGLRenderer();
        const canvas = renderer.domElement;
        document.body.appendChild( canvas );
        for (let i = 0; i < 1000; ++i) {
          canvas.width = (50+i*97)%1000;
          canvas.height = (50+i*97)%1000;
        }

Live example

Expected behavior

The page is not crashed

Screenshots

Platform:

  • Device: [iPad]
  • OS: [iOS 14]
  • Browser: [Chrome, Safari]
  • Three.js version: [121]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
Okavangocommented, Oct 5, 2020

Yes, it crashes with no Three.js I’ll report it to Apple Thanks )

1reaction
rocifracommented, Oct 16, 2020

We experience the same problem in our app since IOS 14 (Android working fine). Of course there is always the hot topic of “but what’s your use case” with the general conclusion “you’re holding it wrong” 😃. Our use case is :

  • we load a bunch of 3d objects
  • we generate an UI for drag and dropping them in the scene later on. To generate the UI we need to populate it with thumbnails of our 3d objects so as soon as we load them we iterate them, setup a special scene and snapshot our 3d objects each generating a small thumbnail canvas element to populate our UI drag sidebar.

Edit: I understand this is an Apple problem…so i’ll report to them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Safari, WKWebview Crash in iOS 15 Beta2 - Apple Developer
The same issue with WKWebView, freezes on iOS 15 when the app goes to the background and returns back, but works correctly on...
Read more >
CONTEXT_LOST_WEBGL in iOS 14.0 - Questions - Babylon.js
Describe the bug Three js crashes on iPad IOS 14 after several canvas resizes To Reproduce Open https://jsfiddle.net/jfbt6zxa/4/ with iPad IOS ...
Read more >
Total canvas memory use exceeds the maximum limit (Safari 12)
It is then impossible to create another canvas. The limit seems to be device related as on the iPad its is 256MB and...
Read more >
Some iPhone and iPad Users Seeing Strange Safari Crashes ...
Some iPhone and iPad users appear to be experiencing a curious bug in Safari at the current time, with the app crashing when...
Read more >
Why Does Procreate Keep Crashing on My iPad
Procreate can crash due to app or iPad software updates. It can also crash from using the largest canvas size with the maximum...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found