While running an animation loop, I encountered a peculiar error message that reads...
GL ERROR :GL_INVALID_OPERATION : glDrawElements: Source and destination textures of the draw are the same.
This error seems to occur randomly after 2 or 3 animation frame requests, with no consistent pattern even after screen refreshes. Sometimes a hard refresh delays the error to the third request, but most of the time it occurs after the second request. This inconsistency hints at a potential issue in an asynchronous component. Despite simplifying the program down to just displaying a stationary cube, I have not been able to pinpoint the source of the problem yet.
The complexity of the program makes it difficult to narrow down the problematic code section here. Therefore, I am seeking guidance on how to approach such issues more broadly. Can you advise on the key areas of focus when troubleshooting this type of error? Once I understand this, I can better direct my efforts towards resolving similar situations in the future.
If further clarification is needed, please let me know. Thank you!
Update:
An interesting observation - removing all objects from the scene eliminates the error, suggesting a connection between object presence and the occurrence of the error.
I'm also considering if a lost context could be responsible for triggering such errors, as mentioned here.