Attempt to release <unknown> object warning

BlitzPlus Forums/BlitzPlus Programming/Attempt to release <unknown> object warning

JoshK(Posted 2004) [#1]
For the longest time, I thought something was wrong with my OpenGL code. Run this with the debugger on:

i=CreateImage(1,1)
SetBuffer ImageBuffer(i)
FreeImage i



skidracer(Posted 2004) [#2]
I would have thought that was a logical error as in this situation the freeing of an image will make the current GraphicsBuffer invalid.

Or are you saying the error is not descriptive enough?


JoshK(Posted 2004) [#3]
That error is not instant:
i=CreateImage(1,1)
SetBuffer ImageBuffer(i)
FreeImage i
Delay 3000
End


...which is why it took me so long to figure out. Apparently, BlitzPlus does something with the graphics buffer when the program ends, and if the buffer is invalid, it crashes...only when the program ends.


CS_TBL(Posted 2004) [#4]
add

setbuffer desktopbuffer()

before FreeImage I think :)


JoshK(Posted 2004) [#5]
I already KNOW how to not cause it, I am just saying it is kind of a weird error with no explanation.