From ece27a3631f9928312180a00d81226ffd9a7eee6 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 17 Nov 2008 23:08:37 +0000 Subject: Make texture decode errors nonfatal. The texture send is simply dropped --- .../Agent/TextureDownload/TextureDownloadModule.cs | 58 ++++++++++++---------- 1 file changed, 33 insertions(+), 25 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index af51df6..aac6e35 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs @@ -176,44 +176,52 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { ITextureSender sender = null; - try - { +// try +// { while (true) { - sender = m_queueSenders.Dequeue(); - - if (sender.Cancel) + try { - TextureSent(sender); + sender = m_queueSenders.Dequeue(); - sender.Cancel = false; - } - else - { - bool finished = sender.SendTexturePacket(); - if (finished) + if (sender.Cancel) { TextureSent(sender); + + sender.Cancel = false; } else { - m_queueSenders.Enqueue(sender); + bool finished = sender.SendTexturePacket(); + if (finished) + { + TextureSent(sender); + } + else + { + m_queueSenders.Enqueue(sender); + } } - } - // Make sure that any sender we currently have can get garbage collected - sender = null; + // Make sure that any sender we currently have can get garbage collected + sender = null; - //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); + //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); + } + catch(Exception e) + { + m_log.ErrorFormat( + "[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e); + } } - } - catch (Exception e) - { - // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened - m_log.ErrorFormat( - "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", - e); - } +// } +// catch (Exception e) +// { +// // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened +// m_log.ErrorFormat( +// "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", +// e); +// } } /// -- cgit v1.1