Hi Andreas,<div><br></div><div>Ah that sounds genius!<div><br></div><div>I&#39;m cloning the layers, probably while the layers are not completely loaded. So, I&#39;m guessing an OpenLayers bug following your logic. Hey, we might get to the bottom of this yet. Will have another look at OL tomorrow, but it seems you are spot on, Andreas. Can you let me know if you have time to look at it. You seem to know that part of OL better.</div>
<div><br></div><div>Cheers,<br></div><div>Tim<br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 8:08 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 only occasions I could think of that could potentially make<br>
this.backBuffer both non-null and not a child of this.div is when a<br>
layer is cloned during tile loading, or when the layer is added to a<br>
second map without cloning it. The latter would be an application bug,<br>
the former an OpenLayers one.<br>
<br>
Andreas.<br>
<div><div class="h5"><br>
On Wed, Mar 14, 2012 at 6:16 AM, Eric Lemoine<br>
&lt;<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Wednesday, March 14, 2012, Tim-Hinnerk Heuer &lt;<a href="mailto:th.heuer@gmail.com">th.heuer@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Hi Eric,<br>
&gt;&gt; I couldn&#39;t reproduce the problem in any simple example. However, I did fix<br>
&gt;&gt; it within OpenLayers. Basically, I changed a couple of lines:<br>
&gt;&gt;     /**<br>
&gt;&gt;      * Method: removeBackBuffer<br>
&gt;&gt;      * Remove back buffer from DOM.<br>
&gt;&gt;      */<br>
&gt;&gt;     removeBackBuffer: function() {<br>
&gt;&gt;         if(this.backBuffer) {<br>
&gt;&gt;             if (this.div.hasChildNodes(this.backBuffer)) { // ADDED THIS<br>
&gt;&gt; LINE<br>
&gt;&gt;                 this.div.removeChild(this.backBuffer);<br>
&gt;&gt;             } // AND OF COURSE THIS<br>
&gt;&gt;             this.backBuffer = null;<br>
&gt;&gt;             this.backBufferResolution = null;<br>
&gt;&gt;             if(this.backBufferTimerId !== null) {<br>
&gt;&gt;                 window.clearTimeout(this.backBufferTimerId);<br>
&gt;&gt;                 this.backBufferTimerId = null;<br>
&gt;&gt;             }<br>
&gt;&gt;         }<br>
&gt;&gt;     },<br>
&gt;&gt; It&#39;s in my public repo. Should I make a pull request? I know it&#39;s yet<br>
&gt;&gt; another check and might slow down things, but stability seems more<br>
&gt;&gt; important. What do you think?<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m sure this fixes it. The thing is I really don&#39;t understand how<br>
&gt; this.backBuffer can be both non-null and not a child of this.div. I think<br>
&gt; this should never occur. It may occur there&#39;s some code that empties the<br>
&gt; layer div without calling removeBackBuffer beforehands, but the lib does not<br>
&gt; have such code as far as I know.<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Eric Lemoine<br>
&gt;<br>
&gt; Camptocamp France SAS<br>
&gt; Savoie Technolac, BP 352<br>
&gt; 73377 Le Bourget du Lac, Cedex<br>
&gt;<br>
&gt; Tel : <a href="tel:00%2033%204%2079%2044%2044%2096" value="+33479444496">00 33 4 79 44 44 96</a><br>
&gt; Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
&gt; <a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Dev mailing list<br>
&gt; <a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</font></span></blockquote></div><br></div></div>