Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.1.0a2
Issue ID
678001
Regression
No
[ComputeBuffer] Improve error messaging on ComputeBuffer constructor usage
Trying to create a new ComputeBuffer from code with
ComputeBuffer c = new ComputeBuffer (5, 5);
I get these errors printed to the Console:
"SUCCEEDED(hr)"
"SUCCEEDED(hr)"
"SUCCEEDED(hr)"
"DestroyBuffer can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function."
None if this is very helpful and the documentation for ComputeBuffer doesn't give any details on this either.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "EndLayoutGroup: BeginLayoutGroup must be called first" error is thrown when changing Shader Precision Model from the Build Profiles window
- White artifacts/outlines are visible in the Garden Scene when viewing at meshes from a distance
- Shader warnings "Sprite-Unlit-Default" are thrown after building 2D Platrformer Microgame Template
- [Android] HLSL shader becomes corrupted when running on an Android device
- Missing spaces in "Welcome to VR Mutiplayer Template Project" Welcome Dialog window
Simon-O
Aug 25, 2016 18:20
A destroyBuffer appears to be called implicitly when the runtime terminates if a buffer has been created but not released properly.
Since the cleanup thread isn't the same as the UI thread, the exception mentioned here is thrown.
Make sure you're tidying up your resources appropriately.
reefwirrax
May 05, 2016 11:56
Indeed, i even had DestroyBuffer can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
...when destroyBuffer codeword does not exist in my code,