ThinkGeo.com    |     Documentation    |     Premium Support

MapSuiteCore 8.0.0.351 FileBitmapTileCache overdrawing

I recently upgraded from MapSuiteCore 8.0.0.83 to 8.0.0.351 and observed this problem. Please guide me towards a solution.

My application is using FileBitmapTileCache as a tile cache. Omitting the cache fixes the problem, but i require it for optimization since my image is large. My test scenario uses EPSG 4326, but the BBOX is purposefully outside of the max extents of 4326.

This is the observed defect
[Left image] Version 8.0.0.83 (BBOX=-180,0,0,180 WIDTH=256 HEIGHT=256 EPSG=4326)

[Right image] Version 8.0.0.351 (BBOX=-180,0,0,180 WIDTH=256 HEIGHT=256 EPSG=4326)

Relevant information

  1. I am using the following API - FileBitmapTileCache with a GdiPlusRasterLayer. There are no options set for Interpolation or TileMatrix, its all defaults.
  2. I can provide code if requested. Code is a stable product developed using Version 6 and upgraded a few times to 8.0.0.83.

Alternative scenario in which problem is observed

  1. If the BBOX is not a square, the same defect is observed.

Can you guide me on the following

  1. Does thinkgeo really support a mechanism to return transparent pixels for the region outside the max extents ? Version 8.0.0.83 returned a correct result.

  2. Is this a defect of the thinkgeo , or should i look to adjust my application to never request tiles outside the maxextents of 4326 ?

  3. Does thinkgeo support BBOX which is not a square ? Should i adjust my application to only use BBOX which is a square ?

Let me know your thoughts. I can provide a sample application if requested to. It will take me some time to write such application, but its easily reproducible.

*ps - i could not upload 2 images because i was a new user. Let me know if this post is confusing and i will try to clear it up.

Hi Andrew,

I guess there is a client to sending request to the WMS server based on the information you provided here. If so, could you please tell us which product is used to request the WMS server?

Please check the following responses.

1) Does thinkgeo really support a mechanism to return transparent pixels for the region outside the max extents ?
Yes, it will return transparent pixels for the region outside of the max extents. but any one of our other products it will not send request if the tile’s bbox outside of the max extents.

2) Is this a defect of the thinkgeo , or should i look to adjust my application to never request tiles outside the max extents of 4326 ?
As I mentioned before it will not send the request if the tile’s bbx outside of the max extent, so we don’t need to look to whether the tiles outside the max extents of 4326.

3) Does thinkgeo support BBOX which is not a square ? Should i adjust my application to only use BBOX which is a square ?
Yes, the map suite support BBox is not a square. We can change it by tile width and height, but usually we don’t need to change it.

If something misunderstood here, could you please provide us a sample?

Thanks,
Peter

Hi Andrew,

If the size of sample exceeds the limitation of the maximum size, please send it to forumsupport@thinkgeo.com(Limit attachment sizes to under 20MB) or contact the forumsupport@thinkgeo.com to get a new account(Has no limitation).

Thanks,
Peter

Thank you for the reply.
These are my product details. Let me know if it is incorrect

  1. WmsServerEdition Full 8.0.0.351
  2. The application uses openlayers, but for testing, i have written the test to use an image tag with the following url
    https://server/Maptest/WmsHandler/WmsHandler.axd?LAYERS=MultiGeoRaster&STYLES=DEFAULT&FORMAT=image%2Fpng&DISPLAY=mapteststadium&CACHE_ID=1459293559594&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=-180,0,0,180&WIDTH=256&HEIGHT=256.

Relevant snippets of code (i can supply a test program, but will require some time to write). This code is heavily abbreviated for the purpose of testing.

protected override System.Drawing.Bitmap GetMapCore(GetMapRequest getMapRequest, MapConfiguration cachedMapConfiguration, System.Web.HttpContext context)
{
GdiPlusRasterLayer layer = new GdiPlusRasterLayer(pathFilename);
mapConfiguration.Layers.Add(WorldLayerName, layer);
var fileCache = new FileBitmapTileCache(displayPath);
fileCache.TileAccessMode = TileAccessMode.ReadOnly
fileCache.CacheId = cacheId;
mapConfiguration.TileCache = fileCache; // defect not present if this line is omitted
return base.GetMapCore(getMapRequest, mapConfiguration, context);
}

*i could not get formatting to work properly. If the code is unclear , please let me know.

Hi Andrew,

Thanks for the more information. Here attached is the sample, please check it.

The code fileCache.TileAccessMode = TileAccessMode.ReadOnly above means that the tile cache won’t save the tiles, please refer to here. In this case we need to use a tile generator to generate the tiles and copy them into the caching folder. We can download the tools from here:
http://wiki.thinkgeo.com/wiki/map_suite_services_edition_all_samples#tile_cache_generator

We recommend to upgrade the MapSuiteCore to the newest version(9.0.0.273).

NOTE:
Please remember to upgrade the merge modules, please click here to download the correct version.

FileBitmapCacheWmsLayerPlugin.cs (2.5 KB)

Any questions please let us know.

Thanks,
Peter

Hi Peter

Thank you for your reply. The tiles are generated by a dedicated application which makes the tilecache correctly. I omitted it from this thread because the tilecache looked correct. For testing purposes, i am testing a tilecache which only has a single level so there is only 1 file , 0.png within the cache. Generally, our application uses 6 - 7 levels but for this test, i am testing with 1 level only.

I attempted to upgrade to MapSuiteCore 9 but encountered an exception (i didnt really analyze yet, got some minidumps for it).

Do you recommend we just go ahead with 9 ? Would it be possible to try with 8.0.0.351 because its stable with every other feature that is used. Upgrading to 9 will require more testing on my side and is not trivial for us at this point.

Hi Andrew,

Sorry, I don’t clear if the issue has been resolved here. The reason why we recommend to upgrade to MapSuite 9 is that we only update the version 9 if there are some new features or bugs.

Thanks,
Peter

Hi Peter

I have upgraded my test harness to MapSuiteCore 9.0.0.265 to test this defect. The results are that i have an exception when using a BBOX which is out of bounds of EPSG 4326.

The BBOX i am using is purposefully -180,-80,0,100. This causes a nullreference exception. Using a BBOX within the extends of EPSG 4326 does not result in an exception. Omitting the TileCache also does not result in an exception.

The code sample is the same as above in this thread.

The exception record is as follows. I can also supply a minidump if required. Let me know where i can copy the minidump to. The minidump is 300mb+.

0:032> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

*** WARNING: Unable to verify checksum for mscorlib.ni.dll
CoInitialize failed 80010106
GetUrlPageData2 (WinHttp) failed: 12002.

FAULTING_IP:
KERNELBASE!RaiseException+58
76adc42d c9 leave

EXCEPTION_RECORD: ffffffff – (.exr 0xffffffffffffffff)
ExceptionAddress: 76adc42d (KERNELBASE!RaiseException+0x00000058)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 00000000
Attempt to read from address 00000000

DEFAULT_BUCKET_ID: WRONG_SYMBOLS

PROCESS_NAME: w3wp.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1: 00000000

EXCEPTION_PARAMETER2: 00000000

READ_ADDRESS: 00000000

FOLLOWUP_IP:
KERNELBASE!RaiseException+58
76adc42d c9 leave

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

APP: w3wp.exe

MANAGED_STACK:
SP IP Function
113AE798 0FFB639C UNKNOWN!ohM=.BRQ=.ERQ=(System.Collections.ObjectModel.Collection`1<ThinkGeo.MapSuite.Core.Tile>, ThinkGeo.MapSuite.Core.RectangleShape, ThinkGeo.MapSuite.Core.RectangleShape, System.Drawing.Bitmap, Int32, Int32)+0x19c
113AE7F8 0FFB2F19 UNKNOWN!ThinkGeo.MapSuite.WmsServerEdition.WmsLayerPlugin.GetMapCore(ThinkGeo.MapSuite.WmsServerEdition.GetMapRequest, ThinkGeo.MapSuite.WmsServerEdition.MapConfiguration, System.Web.HttpContext)+0x561
113AE924 0FFB2798 UNKNOWN!MapPlugin.Implementation.MultiGeoRasterWmsLayerPlugin.GetTile(ThinkGeo.MapSuite.WmsServerEdition.GetMapRequest, ThinkGeo.MapSuite.WmsServerEdition.MapConfiguration, System.Web.HttpContext)+0x28

StackTraceString:
HResult: 80004003

EXCEPTION_OBJECT: !pe 26da064
Exception object: 026da064
Exception type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
InnerException:
StackTrace (generated):
SP IP Function
113AE798 0FFB639C UNKNOWN!ohM=.BRQ=.ERQ=(System.Collections.ObjectModel.Collection`1<ThinkGeo.MapSuite.Core.Tile>, ThinkGeo.MapSuite.Core.RectangleShape, ThinkGeo.MapSuite.Core.RectangleShape, System.Drawing.Bitmap, Int32, Int32)+0x19c
113AE7F8 0FFB2F19 UNKNOWN!ThinkGeo.MapSuite.WmsServerEdition.WmsLayerPlugin.GetMapCore(ThinkGeo.MapSuite.WmsServerEdition.GetMapRequest, ThinkGeo.MapSuite.WmsServerEdition.MapConfiguration, System.Web.HttpContext)+0x561
113AE924 0FFB2798 UNKNOWN!MapPlugin.Implementation.MultiGeoRasterWmsLayerPlugin.GetTile(ThinkGeo.MapSuite.WmsServerEdition.GetMapRequest, ThinkGeo.MapSuite.WmsServerEdition.MapConfiguration, System.Web.HttpContext)+0x28

StackTraceString:
HResult: 80004003

MANAGED_OBJECT: !dumpobj 22273f0
Name: System.String
MethodTable: 73d3224c
EEClass: 73963444
Size: 120(0x78) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String: Object reference not set to an instance of an object.
Fields:
MT Field Offset Type VT Attr Value Name
73d33aa8 40000aa 4 System.Int32 1 instance 53 m_stringLength
73d32c44 40000ab 8 System.Char 1 instance 4f m_firstChar
73d3224c 40000ac c System.String 0 shared static Empty
>> Domain:Value 012977d8:NotInit 0e8babb8:NotInit <<

EXCEPTION_MESSAGE: Object reference not set to an instance of an object.

MANAGED_OBJECT_NAME: SYSTEM.NULLREFERENCEEXCEPTION

MANAGED_STACK_COMMAND: !pe 26da064

LAST_CONTROL_TRANSFER: from 74c72a42 to 76adc42d

PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS

BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS

STACK_TEXT:
113ae798 00000000 unknown.dll!ohM=.BRQ=.ERQ=+0x19c
113ae7f8 00000000 unknown.dll!ThinkGeo.MapSuite.WmsServerEdition.WmsLayerPlugin.GetMapCore+0x561
113ae924 00000000 unknown.dll!MapPlugin.Implementation.MultiGeoRasterWmsLayerPlugin.GetTile+0x28

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: unknown.dll!ohM=.BRQ=.ERQ=

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: unknown

IMAGE_NAME: unknown.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 0

STACK_COMMAND: !pe 26da064
; ** Pseudo Context ** ; kb

FAILURE_BUCKET_ID: WRONG_SYMBOLS_c0000005_unknown.dll!ohM=.BRQ=.ERQ=

BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_unknown.dll!ohM=.BRQ=.ERQ=

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7601_17514/4ce7a5f8/KERNELBASE_dll/6_1_7601_18798/5507b485/c0000005/0000c42d.htm?Retriage=1

Followup: MachineOwner

I am unable to proceed further as the MapsuiteCore assemblies are obfuscated so i am unable to find a line number for the exception in windbg.

Hi Andrew,

Sorry for delay. It proved to be a bug which has been fixed in the Development version 9.0.288.0 or higher and Production version 9.0.0.287 or higher.

Please get one of the version and have try again.

Thanks,
Peter

Hi Peter

Thanks for the quick response. We have attempted to download production version 9.0.0.287 but am unable to find the link.

Is there something we are missing ?

Just to clarify, the version we are using is Map Suite WMS Server Edition 9.0

Hi Andrew,

The version 9.0.0.289 and 9.0.288.0 are available. Please download it from Product Center and have a try.

Any questions please let us know.

Thanks,
Peter

Hi Peter

I am still not able to download 9.0.0.289 from product center. My screen just has a link for 9.0.0.273. Is there some kind of option to see all builds ?

Hi Andrew,

There are something wrong with the uploading process of Daily builds, so I just manually upload the 9.0.0.289 and 9.0.288.0 only for the WMS Server Edition. Please get it from the “WMS Server Edition” tab.

Thanks,
Peter

Hi Peter

Thank you for the update. I have successfully downloaded and added version 9.0.0.289 to my application.

I can confirm that the usage of tile caching does not encounter an exception.

However, i am now encountering the same issue at the start of this thread, which is that requests with a BBOX outside the map extends results in a tile which has duplicate pixels instead of transparency.

Is there some kind of option which i am missing ? My application, when configured to use version 8.0.0.83 results in tiles which are correctly created.

Any advice for me to try ?

Hi Andrew,

Thanks for the feedback. It proved to be a bug, which has been fixed in the version 9.0.297.0 or later. Please get it and have a try again.

Any questions please let me know.

Thanks,
Peter

Hi Peter

Thank you for the new version. I have updated my application to use version 9.0.0.304.

I am a bit confused on the version numbers, because i am assuming version 9.0.0.304 is actually version 9.0.304.0. Let me know if my assumption is wrong an i am downloading the wrong version. My assumption is based on MapSuiteCore.dll which has version 9.0.0.304.

My application is still rendering the map tile without transparency when the BBOX is outside of the map extents and using a tile cache. The application renders correctly when not using a tile cache.

Any advice for me to try ?

Hi Andrew,

The fix is only available in the Development version 9.0.297.0 or later now, please download it and have a try again. We will move this fix into Production branch as soon if it’s stable. Any updates I’ll post it here.

About the differences between Development version and Production version please refer to http://wiki.thinkgeo.com/wiki/map_suite_daily_builds_guide

Thanks,
Peter