Search Issue Tracker
Fixed in 4.6.5
Votes
0
Found in
4.6.3f1
Issue ID
681778
Regression
Yes
Calling WebCamTexture.Stop() after GetPixels() leads to memory corruption or crashes.
The issue is that WebCamTexture.Stop() frees internal memory buffer used by GetPixels(), but doesn't mark it as deleted. So subsequent requests by GetPixels() will write into freed memory, as well as crash when it tries to delete the buffer a second time when WebCamTexture is GC'ed or Stop() is called again.
Unfortunately, the only workaround is to never call Stop() and make sure that WebCamTexture is never freed. 4.6 users can consider to revert to 4.6.4p1.
To reproduce:
1) Download and open project
2) Build and run on iOS
3) Press capture button
4) Press Unload button
5) Notice crash
NOTE: commenting out line 24 (which calls GetPixels()) seems to not cause crash
Reproduced on 4.6.4f1 and 4.6.2p2 using iPad Air (8.1.1) (no difference when using mono or il2cpp)
Doesn't reproduce on 4.6.2p1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Add comment