-
Notifications
You must be signed in to change notification settings - Fork 922
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
browser crash (safari/iphone) if the scene contains more than 8 nft-markers #140
Comments
Hello, I tested your code and it also crash on my iPhone 11 Pro Max (4 GB RAM) so it could be a memory restriction with Safari on iOS, on another test with a Samsung A60 (6 GB RAM) using Chrome and it works fine, just the camera is zoomed at load so you need to fix that, and finally tested on Safari on Mac and I got a memory warning, a workaround is using different scenes for all the markers then implement a QR reader inside each scene to switch between them using QR codes, another workaround would be to combine pattern markers with nft markers to be able to show everything in the same scene, I hope this info could help you |
@innovaciones thanks for the test results with your Samsung and Safari on Mac.. Yes my first thought was also a memory restriction in Safari... the idea with the qr codes would work, but in our project we kinda use the images as "codes" in order to be redirected to landingpages (so no typical AR, we only use the image recognition), so if we'd add qr codes, there would be no need for the images anymore x) But thank you anyway. I'm aware that there will probably always be a max number of images per scene, but I think 10 or 20 images per scene should be possible in future? I'm not a professional programmer, and the only idea I have (without knowing the details of the code) is the following: the memory probably gets that high because while scanning, [assumption:] the phone searches in all markers at the same time (so if we have 10 it's too much -> safari crashes). What about changing the code, that it searches in groups of about 8 markers at the same time (--> if no match, search in next group of 8 markers, and so on...). Depending on the number of markers it would then take 2,3 or 4 seconds for the marker to be recognized, but better than a crash. What do you all think about that? @kalwalt |
Multiple NFT is not supported at this time. You can read in this post artoolkitx/jsartoolkit5#95. |
@kalwalt uhmm in march I had the same problem with jsartoolkit5 like described in the post you linked: the problem was, that only 1 marker was possible (not 2 or more). Now with ar.js it doesn't seem to be impossible, because 8(!) multi nft-markers are possible, this works perfectly. But if it's more than 8, it crashes. |
Yes, exactly. It's supported by AR.js (it's easier to try it out with aframe version) BUT it not behaves with good performance. There are issues on the design but you have also to keep in mind that image tracking in real-time, using image descriptors, is 'still' heavy as of 2020 mobile devices. It can be enhanced - As I said, we can fix some design and technical bugs - but It will not support a lot of images as you can do with markers now. |
Do you want to request a feature or report a bug?
bug report
What is the current behavior?
I do have a scene in which I have 10 nft markers --> in Safari on iPhone the website reloads after a few seconds and then again after a few seconds crashes. When I delete 2 of the 10 markers (so that I have only 8 markers), it works. but from 9 or 10 upwards the browser crashes.
If the current behavior is a bug, please provide the steps to reproduce.
Here's an example of a scene with 10 nft markers: https://www.i-sticker.eu/testcrash.php
You don't have to scan anything. The safari browser crashes either way. Would be interesting if the problem appears also on Samsung or other phones? On my computer browser (chrome) everything's fine. Doesn't crash.
Please mention other relevant information such as the browser version, Operating System and Device Name
iPhone SE (2020), iOS 13.5.1, Safari
What is the expected behavior?
automatical page reload after less than 10 seconds, then browser crash again after less than 10 seconds.
If this is a feature request, what is motivation or use case for changing the behavior?
no feature request.
The text was updated successfully, but these errors were encountered: