Invalid texture operations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nux |
Fix Released
|
Medium
|
Unassigned | ||
nux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
** Critical Design Error!! **
In IOpenGLTexture2
How to reproduce it:
First of all you need to compile without optimisations (otherwise you will see nothing):
export CXXFLAGS=-O0
export CFLAGS=-O0
make AM_DEFAULT_
Then add this line at the beginning of the IOpenGLTexture2
printf(
Then go to the gputests and run the texture_copy_blur example.
You won't get an image and at some points you will get prints like that:
IOpenGLTexture2D texture destructor: 0xa917338, function called: virtual nux::IOpenGLTex
IOpenGLTexture2D texture destructor: 0xa917338, function called: virtual nux::IOpenGLTex
The exact same function (same pointer, same name, that is the IOpenGLTexture destructor) is called 2 times for some textures.
Now, if you change the case RTTEXTURE of the function void RenderingStats:
case RTTEXTURE:
{
int id = NUX_STATIC_
printf("I am not a texture, I can't be deleted\n");
break;
}
and recompile (WITHOUT optimisations) you will get something like this:
IOpenGLTexture2D texture destructor: 0xa917338, function called: virtual nux::IOpenGLTex
I am not a texture, I can't be deleted
IOpenGLTexture2D texture destructor: 0xa917338, function called: virtual nux::IOpenGLTex
I am not a texture, I can't be deleted
IOpenGLTexture2D texture destructor: 0xa917338, function called: virtual nux::IOpenGLTex
I am not a texture, I can't be deleted
Because an already deleted texture can't be deleted again.
If we add optimisations again, the texture_copy_blur example runs as usual but it still tries to delete the same texture multiple times.
comment #2: This happens because 2 different IOpenGLTexture2D objects have the same texture id.
summary: |
- Critical design issue: The IOpenGLTexture2D destructor calls its own - destructor + Critical design issue: The IOpenGLTexture2D destructor calls a function + that calls the destructor again (loop) |
summary: |
- Critical design issue: The IOpenGLTexture2D destructor calls a function - that calls the destructor again (loop) + Critical: The IOpenGLTexture2D destructor calls a function that calls + the destructor again (loop) |
summary: |
- Critical: The IOpenGLTexture2D destructor calls a function that calls - the destructor again (loop) + Critical issue: The IOpenGLTexture2D destructor calls a function that + calls the destructor again (loop) |
description: | updated |
description: | updated |
summary: |
- Critical issue: The IOpenGLTexture2D destructor calls a function that - calls the destructor again (loop) + Invalid texture operations |
Changed in nux: | |
assignee: | Eleni Maria Stea (hikiko) → nobody |
Changed in nux: | |
status: | Fix Committed → Fix Released |
Changed in nux (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
We might need to make changes on Nux design to solve this issue. In some cases we might end up with an infinite loop.