From 11b4f534c28b150643704c75f1630eda42ec9c9e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Feb 2014 23:36:50 +0000 Subject: If texture decode fails in Warp3D map maker, log uuid of asset that failed to decode along with exception --- .../CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World') 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 private warp_Texture GetTexture(UUID id) { warp_Texture ret = null; + byte[] asset = m_scene.AssetService.GetData(id.ToString()); + if (asset != null) { IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface(); - Bitmap img = (Bitmap) imgDecoder.DecodeToImage(asset); + Bitmap img = null; + + try + { + img = (Bitmap)imgDecoder.DecodeToImage(asset); + } + catch (Exception e) + { + m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); + } + if (img != null) { return new warp_Texture(img); } } + return ret; } -- cgit v1.1