Needle Engine 4.15.0, Samsung Galaxy S25, Android Chrome. When I click a custom button inside #arui (which is inside needle-engine tag) during WebXR AR session, Chrome crashes with âAw Snapâ immediately. The button click doesnât even reach the JS event handler (no console logs). This seems to be a GPU-level crash, not a JS error. Other buttons like resetBtn work fine without crash. The only difference is the shutter button was previously using setAttribute(âstyleâ, âŠ) which overwrote CSS position styles. I fixed that but crash still happens. Any known fix for button click crash during AR session?
This sounds like a known WebGL context loss issue in Chrome on some Samsung devices when DOM interactions trigger GPU reallocation during an AR session. The âAw Snapâ crash before JS reaches the handler means the GPU process died.
Since you already cleaned up setAttribute('style', ...), check if the shutter button uses CSS transitions, gradients, will-change, or transform â these can cause compositor crashes in WebXR. Try removing all custom CSS on that button and use inline styles only. Also test without any #arui content to isolate.
If still crashing, share a URL to your deployed scene so we can inspect. For a quick test, create a minimal scene at Needle-engine - Vite Template (duplicated) - StackBlitz with just a button and see if it crashes there. If it does, itâs a device/browser bug; if not, the issue is in your sceneâs structure or styles.
Sources: Needle Engine Docs (69%)
1 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
I tested with minimal HTML - just a single button inside needle-engine tag in AR mode.
Still crashes on Samsung Galaxy S25, Android Chrome.
Button CSS: position:absolute, no transitions, no transforms.
JS click handler never fires before crash.
This seems to be a device/browser level GPU crash.
Can you reproduce this on S25?
This is almost certainly a Samsung GPU driver bug in Chrome/WebXR on the S25, not a Needle Engine issue â especially since it crashes before JS executes and persists with minimal HTML.
Quick test: Open the official Immersive AR sample on your S25 and add a <button> via DevTools overlay. If it also crashes, itâs Samsung/Chrome specific. If it doesnât, something in your scene triggers the crash (e.g., a specific glTF extension, lightmaps, or physics body).
Workaround to try:
- Replace
clickwithpointerdownevent on the button - Add
touch-action: manipulationCSS to the button - Disable Chrome GPU rasterization at
chrome://flags/#enable-gpu-rasterization(set to Disabled)
Best next step: Share a URL to your deployed scene so we can inspect. If you canât deploy publicly, create a minimal reproducible example at engine.needle.tools/new and link it here.
Sources: Needle Engine Docs (63%)
1 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
Update: Tested official Needle Engine AR samples on S25 Chrome.
Previous/Next buttons work fine in AR mode, no crash.
So the issue is specific to my scene, not Samsung/Chrome bug.
My scene differences from samples:
- Custom GLB models (palm trees, tiger, monkey animations)
- ShadowMaterial for ground shadows
- hit-test + anchors placement
- Custom TypeScript component (PalmAR.ts)
- camera-access optionalFeature requested
What in my scene could cause button clicks to crash GPU?
Can I share my scene URL for inspection?
Given that official Needle samples work fine on your S25 but your scene crashes, the issue is likely GPU overload during AR. Since crash happens before JS executes, itâs a WebGL context loss â Chrome kills the GPU process when a GPU operation fails.
Your THREE.ShadowMaterial with custom GLB models (especially with animations) plus camera-access is the most common trigger: camera feed forces GPU reallocation and can conflict with other GPU work when a DOM event fires.
Try these:
- Disable camera-access and test
- Replace ShadowMaterial with a simpler ground plane
- Reduce texture resolution on your GLBs
Share your scene URL for inspection â I can help identify the specific cause.
1 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
Further testing results:
- Empty AR scene (no GLB objects, no ShadowMaterial) - button still crashes
- camera-access disabled - still crashes
- The crash happens specifically when getCameraImage() is called on XRWebGLBinding
- Before getCameraImage: getBinding=OK, camera-access=true, view.camera=true
- getCameraImage() itself causes immediate GPU process crash
This seems to be a Samsung S25 specific issue with XRWebGLBinding.getCameraImage().
Has anyone successfully called getCameraImage() on Samsung S25 Chrome?
Is there a known workaround?
This is a Samsung/Chrome WebXR bug with getCameraImage(), not a Needle Engine issue. Youâve isolated it perfectly: minimal scene, verified all preconditions, and getCameraImage() itself crashes the GPU process.
Workarounds:
- Detect device (
navigator.userAgent.includes("SM-")for Galaxy) and skip camera texture on those devices - Use a transparent fallback texture when
getCameraImage()fails - Disable
camera-accessentirely on S25
To confirm: deploy your minimal crashing scene to a URL and share it here. I can inspect if thereâs any other factor. Also file a Chromium bug at crbug.com referencing getCameraImage() GPU crash on S25 â Samsung often fixes these in updates.
1 replies left - Become PRO for more replies.
Sources: Needle Engine Docs (60%)
1 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
Here is the URL to test: https://ceremony-curse-survivor.ngrok-free.dev
Steps to reproduce on Samsung S25 Chrome:
- Open URL
- Press START
- Scan floor and place objects
- Press the white circle button (shutter) on the left side
- Chrome crashes immediately
The getCameraImage() call on XRWebGLBinding causes GPU crash.
Please test on S25 if possible.
This is a Samsung S25 Chrome WebXR bug with getCameraImage(), not a Needle Engine issue. Youâve already proven it with a minimal test case.
Workaround: Detect Galaxy S25 devices (navigator.userAgent.includes("SM-") and Chrome) and skip getCameraImage() entirely â use a transparent fallback texture instead.
To verify: test on another Android device or Samsung S24 â if it works, itâs S25-specific.
Next step: file a bug at crbug.com referencing XRWebGLBinding.getCameraImage() GPU crash on S25 Chrome â include your ngrok URL as a repro.
Your scene works fine. The fix needs to come from Samsung/Google in a Chrome update.
0 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
Update: Also tested on Samsung Galaxy S9+ (SM-G965N).
Same crash with getCameraImage().
This is not S25-specific - it affects multiple Samsung devices.
Both devices crash on getCameraImage() call.
Is there any Samsung-specific workaround for getCameraImage()?
Or is there another way to capture AR camera feed on Samsung devices?