Do you have a sample data to reproduce this?<br><br>Best regards,<br><br>Tamas<br><br><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style><div class="gmail_quote">
2010/7/26 mail2vajram <span dir="ltr"><<a href="mailto:mail2vajram@gmail.com">mail2vajram@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
in my application i need to create multiple images with large size using C#.<br>
while creating multiple files first three images created successfully after<br>
that i got the following exception.<br>
<br>
ContextSwitchDeadLock was detecteed<br>
<br>
<br>
<br>
The CLR has been unable to transition from COM context 0x204d28 to COM<br>
context 0x204e98 for 60 seconds. The thread that owns the destination<br>
context/apartment is most likely either doing a non pumping wait or<br>
processing a very long running operation without pumping Windows messages.<br>
This situation generally has a negative performance impact and may even lead<br>
to the application becoming non responsive or memory usage accumulating<br>
continually over time. To avoid this problem, all single threaded apartment<br>
(STA) threads should use pumping wait primitives (such as<br>
CoWaitForMultipleHandles) and routinely pump messages during long running<br>
operations.<br>
<br>
<br>
my code is.....<br>
<br>
<br>
for (i = 1; i < vallist; i++)<br>
{<br>
<br>
// create new trans images....<br>
Driver createtransdriver = Gdal.GetDriverByName("HFA");<br>
Dataset createtransdataset =<br>
createtransdriver.Create(startuppath + "\\Transimages\\Calss_" +<br>
i.ToString() + ".IMG", band.XSize, band.YSize, 1, DataType.GDT_Float32,<br>
null);<br>
Band createtransband = createtransdataset.GetRasterBand(1);<br>
<br>
<br>
for (j = 0; j < band.YSize; j++)<br>
{<br>
<br>
for (k = 0; k < band.XSize; k++)<br>
{<br>
band.ReadRaster(k, j, 1, 1, value, 1, 1, 1, 1);<br>
if (value[0] == 0)<br>
{<br>
<br>
createtransband.WriteRaster(k, j, 1, 1, value,<br>
1, 1, 1, 1);<br>
}<br>
else<br>
{<br>
imgval = arrayprobs[value[0] - 1, i - 1];<br>
value[0] = Convert.ToInt32(imgval);<br>
createtransband.WriteRaster(k, j, 1, 1, value,<br>
1, 1, 1, 1);<br>
<br>
}<br>
}<br>
<br>
}<br>
createtransband = null;<br>
createtransdataset = null;<br>
createtransdriver = null;<br>
<br>
<br>
}<br>
<br>
<br>
<br>
how to overcome this..............<br>
<br>
<br>
help me please<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/exception-while-creating-large-image-tp5337330p5337330.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/exception-while-creating-large-image-tp5337330p5337330.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br>