From: Frank Warmerdam <warmerda@ho...> - 2000-08-18 21:43:01
I have spent a good deal of the afternoon working on our problems with Xi
Graphics drivers. This is the problem where zooming in and out will
sometimes result in losing the connection to the X Server.
First, I discovered that I can pass --sync to gvtest to cause it to run
in X synchronous mode. Then by running in gdb, and stopping in gdb I was
able to traceback the failure to the glTexImage2D() call.
This didn't help much though, because everything looked fine in the parameters.
I tried to check for re-entrancy problems with the idle handlers, but there
didn't appear to be any direct issues. I did discover that the "missing_tex"
list of textures to update wasn't being cleared in some circumstances, causing
unusual numbers of calls to gv_raster_layer_texture_load(). I fixed this.
I tried checking for gl errors just before glTexImage2D(), and found that
the error (otherwise fairly repeatable) went away completely. This let me
to feel that the problem was some sort of loss of synchronization with the
X server or something similar, and that the glGetError() call blocked things
for a roundtrip message and held things together.
After various further testing I was never able to generate a crash when doing
the error testing, and found that I could very reliably reproduce the crash
by just loading all the textures in one big pass. Further testing showed that
it was sufficient to call glGetError() just occasionally.
So my resolution is to call glGetError() once for every one hundred textures
that are loaded. This adds minimal overhead, and makes things stable on
Frankly, this is a hack. I don't really understand what is happening or why
this fixes it. I would appreciate it if more testing could be done on
William's machine with the fix applied.
I also find it hard to believe that the problem on William and my system is
really the same as what Peter runs into on Windows. The mechanisms are so
different that I find it hard to believe they problem could be the same. Of
course, Peter hasn't had much luck reproducing his problem on Windows lately.
In summary, I am not happy with the solution, but I hope we have at least a
pragmatic improvement in stability for OpenEV.
I set the clouds in motion - turn up | Frank Warmerdam, warmerda@...
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent