diff options
author | Justin Clark-Casey (justincc) | 2014-02-20 23:36:50 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-02-20 23:36:50 +0000 |
commit | 11b4f534c28b150643704c75f1630eda42ec9c9e (patch) | |
tree | 28f58f8fc684db0b4ed0cfa0a8103e699882c31c /OpenSim/Region/CoreModules | |
parent | If GetFolderContent called by WebFetchInvDescHandler.Fetch() fails for some r... (diff) | |
download | opensim-SC_OLD-11b4f534c28b150643704c75f1630eda42ec9c9e.zip opensim-SC_OLD-11b4f534c28b150643704c75f1630eda42ec9c9e.tar.gz opensim-SC_OLD-11b4f534c28b150643704c75f1630eda42ec9c9e.tar.bz2 opensim-SC_OLD-11b4f534c28b150643704c75f1630eda42ec9c9e.tar.xz |
If texture decode fails in Warp3D map maker, log uuid of asset that failed to decode along with exception
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 5728731..be328a7 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -631,16 +631,29 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
631 | private warp_Texture GetTexture(UUID id) | 631 | private warp_Texture GetTexture(UUID id) |
632 | { | 632 | { |
633 | warp_Texture ret = null; | 633 | warp_Texture ret = null; |
634 | |||
634 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); | 635 | byte[] asset = m_scene.AssetService.GetData(id.ToString()); |
636 | |||
635 | if (asset != null) | 637 | if (asset != null) |
636 | { | 638 | { |
637 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); | 639 | IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); |
638 | Bitmap img = (Bitmap) imgDecoder.DecodeToImage(asset); | 640 | Bitmap img = null; |
641 | |||
642 | try | ||
643 | { | ||
644 | img = (Bitmap)imgDecoder.DecodeToImage(asset); | ||
645 | } | ||
646 | catch (Exception e) | ||
647 | { | ||
648 | m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); | ||
649 | } | ||
650 | |||
639 | if (img != null) | 651 | if (img != null) |
640 | { | 652 | { |
641 | return new warp_Texture(img); | 653 | return new warp_Texture(img); |
642 | } | 654 | } |
643 | } | 655 | } |
656 | |||
644 | return ret; | 657 | return ret; |
645 | } | 658 | } |
646 | 659 | ||