[mapguide-commits] r8685 - sandbox/adsk/2.6l/Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jun 2 18:45:08 PDT 2015
Author: hubu
Date: 2015-06-02 18:45:08 -0700 (Tue, 02 Jun 2015)
New Revision: 8685
Modified:
sandbox/adsk/2.6l/Server/src/Services/Feature/ServerFeatureUtil.cpp
Log:
#2551, merge fix to adsk/2.6l branch.
#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.
Modified: sandbox/adsk/2.6l/Server/src/Services/Feature/ServerFeatureUtil.cpp
===================================================================
--- sandbox/adsk/2.6l/Server/src/Services/Feature/ServerFeatureUtil.cpp 2015-05-28 09:55:30 UTC (rev 8684)
+++ sandbox/adsk/2.6l/Server/src/Services/Feature/ServerFeatureUtil.cpp 2015-06-03 01:45:08 UTC (rev 8685)
@@ -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: sandbox/adsk/2.6l/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/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/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