[mapguide-commits] r8617 - in trunk/MgDev: . Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 2 04:58:33 PDT 2015


Author: jng
Date: 2015-04-02 04:58:33 -0700 (Thu, 02 Apr 2015)
New Revision: 8617

Modified:
   trunk/MgDev/
   trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
Log:
Merged revision(s) 8584 from sandbox/adsk/3.0m:
#2551,Zoom in/out raster file (sid file) in flexible web layout results in server down.
http://trac.osgeo.org/mapguide/ticket/2551, submit on behalf of Andy Zhang.

For raster data sources, the property exists only when the data model type is FdoRasterDataModelType_Palette. But we call the GetProperty(L"Palette") when bits of pixel is 8. So for some raster files, FdoCommandException will be thrown several times, which results in Server unstable. Now we add a check of the data model type to fix the issue. 
........



Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/sandbox/adsk/3.0m:8563
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/sandbox/adsk/3.0m:8563,8584
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163

Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-04-02 11:57:10 UTC (rev 8616)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-04-02 11:58:33 UTC (rev 8617)
@@ -20,6 +20,7 @@
 #include "ServerDataReaderPool.h"
 #include "ServerFeatureReaderPool.h"
 #include "ByteSourceRasterStreamImpl.h"
+#include "Fdo/Raster/RasterDataModelType.h"
 
 static std::map<FdoPropertyType, INT32>                 s_FdoPropertyType;
 static std::map<FdoDataType, INT32>                     s_FeatureUtilFdoDataType;
@@ -485,8 +486,8 @@
             retVal->SetBitsPerPixel(dm->GetBitsPerPixel());
             retVal->SetDataModelType(dm->GetDataModelType());
 
-            //if image is color mapped, get the palette
-            if (dm->GetBitsPerPixel() == 8)
+            //if data model type is Palette and image is color mapped, get the palette
+            if (dm->GetDataModelType() == FdoRasterDataModelType_Palette && dm->GetBitsPerPixel() == 8)
             {
                 //try to get the palette -- if there isn't one,
                 //an exception will be thrown. It's simpler to catch


Property changes on: trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/jng/convenience_apis/Server/src/Services/Feature/ServerFeatureUtil.cpp:8264-8268
/sandbox/jng/createruntimemap/Server/src/Services/Feature/ServerFeatureUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6250-6326
   + /branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/adsk/3.0m/Server/src/Services/Feature/ServerFeatureUtil.cpp:8584
/sandbox/jng/convenience_apis/Server/src/Services/Feature/ServerFeatureUtil.cpp:8264-8268
/sandbox/jng/createruntimemap/Server/src/Services/Feature/ServerFeatureUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6250-6326



More information about the mapguide-commits mailing list