Hi Andreas,<div><br></div><div>Just looking in the source, I see what you mean:</div><div><div>    /**</div><div>     * Method: clone</div><div>     * Create a clone of this layer</div><div>     *</div><div>     * Returns:</div>
<div>     * {&lt;OpenLayers.Layer.WMS&gt;} An exact clone of this layer</div><div>     */</div><div>    clone: function (obj) {</div><div><br></div><div>        if (obj == null) {</div><div>            obj = new OpenLayers.Layer.WMS(<a href="http://this.name">this.name</a>,</div>
<div>                                           this.url,</div><div>                                           this.params,</div><div>                                           this.getOptions());</div><div>        }</div>
<div><br></div><div>        //get all additions from superclasses</div><div>        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]); // POINTS TO Grid</div><div><br></div><div>        // copy/set any non-init, non-simple values here</div>
<div><br></div><div>        return obj;</div><div>    },</div><div><br></div><div>but</div><div><br></div><div><div>    /**</div><div>     * APIMethod: clone</div><div>     * Create a clone of this layer</div><div>     *</div>
<div>     * Parameters:</div><div>     * obj - {Object} Is this ever used?</div><div>     * </div><div>     * Returns:</div><div>     * {&lt;OpenLayers.Layer.Grid&gt;} An exact clone of this OpenLayers.Layer.Grid</div><div>
     */</div><div>    clone: function (obj) {</div><div><br></div><div>        if (obj == null) {</div><div>            obj = new OpenLayers.Layer.Grid(<a href="http://this.name">this.name</a>,</div><div>                                            this.url,</div>
<div>                                            this.params,</div><div>                                            this.getOptions());</div><div>        }</div><div><br></div><div>        //get all additions from superclasses</div>
<div>        obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);</div><div><br></div><div>        // copy/set any non-init, non-simple values here</div><div>        if (this.tileSize != null) {</div><div>
            obj.tileSize = this.tileSize.clone();</div><div>        }</div><div><br></div><div>        // we do not want to copy reference to grid, so we make a new array</div><div>        obj.grid = []; // THIS IS WHAT YOU MEAN, RIGHT?</div>
<div>        obj.gridResolution = null;</div><div><br></div><div>        return obj;</div><div>    },</div></div><div><br></div><div>I don&#39;t know how to figure out the problem quickly. I might just have to leave the fix as is for now, but this might be good to keep in the back of our minds in case we stumble upon this problem again.</div>
<div><br></div><div>Cheers,</div><div>Tim</div><div><br></div><div><br></div>++Tim Hinnerk Heuer++<br><br>Twitter: @timhheuer<br><div>Blog: <a href="http://www.thheuer.com/" target="_blank">http://www.thheuer.com</a></div>
<br>
<br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 9:14 PM, Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The clone method does not clone the grid, so it is not affected by the<br>
state of any images in the grid, and it also does not clone any<br>
backbuffer related properties. So the issue must be a different one.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Mar 14, 2012 at 8:36 AM, Tim-Hinnerk Heuer &lt;<a href="mailto:th.heuer@gmail.com">th.heuer@gmail.com</a>&gt; wrote:<br>
&gt; Just guessing here:<br>
&gt; Maybe the state of a layer changes when the tiles finish loading to<br>
&gt; something more consistent that can be cloned and maybe the &lt;img&gt; element is<br>
&gt; in a different state or not even there while it is loading? I seem to<br>
&gt; remember something like that when I was doing the VideoWMS. Correct me if<br>
&gt; I&#39;m wrong.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Tim<br>
&gt;<br>
&gt; On Wed, Mar 14, 2012 at 8:28 PM, Eric Lemoine &lt;<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Mar 14, 2012 at 8:08 AM, Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; The only occasions I could think of that could potentially make<br>
&gt;&gt; &gt; this.backBuffer both non-null and not a child of this.div is when a<br>
&gt;&gt; &gt; layer is cloned during tile loading<br>
&gt;&gt;<br>
&gt;&gt; I had thought about this too. But I&#39;m still failing to understand how<br>
&gt;&gt; cloning can lead to this state. Do you mind elaborating a bit? Thank<br>
&gt;&gt; you.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Eric Lemoine<br>
&gt;&gt;<br>
&gt;&gt; Camptocamp France SAS<br>
&gt;&gt; Savoie Technolac, BP 352<br>
&gt;&gt; 73377 Le Bourget du Lac, Cedex<br>
&gt;&gt;<br>
&gt;&gt; Tel : <a href="tel:00%2033%204%2079%2044%2044%2096" value="+33479444496">00 33 4 79 44 44 96</a><br>
&gt;&gt; Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
&gt;&gt; <a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br></div>