ThinkGeo.com    |     Documentation    |     Premium Support

System.AccessViolationException - JPEG2000

MapSuite,

Below is an exception being received when trying to render a JPEG2000 Raster.

I have all the latest packages. I had thought that at one point in V10 this worked. I know definitely that it worked in V9.

Thanks,
Dennis

System.AccessViolationException was unhandled
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=ThinkGeo.MapSuite.Layers.Jpeg2000
StackTrace:
at ohM=.h0c=.ikc=(IntPtr geoImage, Int32 imageType, Int32 cx, Int32 cy, Int32 width, Int32 height, Int32 targetWidth, Int32 targetHeight)
at ThinkGeo.MapSuite.Layers.Jpeg2000RasterSource.GetImageCore(RectangleShape worldExtent, Int32 canvasWidth, Int32 canvasHeight)
at ThinkGeo.MapSuite.Layers.RasterSource.GetImage(RectangleShape worldExtent, Int32 canvasWidth, Int32 canvasHeight)
at ThinkGeo.MapSuite.Layers.RasterLayer.DrawCore(GeoCanvas canvas, Collection1 labelsInAllLayers) at ThinkGeo.MapSuite.Layers.Layer.ciU=(GeoCanvas canvas, Collection1 labelsInAllLayers)
at ThinkGeo.MapSuite.Layers.Layer.Draw(GeoCanvas canvas, Collection1 labelsInAllLayers) at OriStarRaster.OriStarRasterCatalogLayer.DrawCoreJPeg(GeoCanvas TheCanvas, Collection1 TheLabelsInAllLayers) in C:\OriStarMappingIncMapSuiteV10Secondary\OriStarRaster\clsOriStarRasterCatalogLayer.cs:line 555
at OriStarRaster.OriStarRasterCatalogLayer.DrawCore(GeoCanvas TheCanvas, Collection1 TheLabelsInAllLayers) in C:\OriStarMappingIncMapSuiteV10Secondary\OriStarRaster\clsOriStarRasterCatalogLayer.cs:line 401 at ThinkGeo.MapSuite.Layers.Layer.ciU=(GeoCanvas canvas, Collection1 labelsInAllLayers)
at ThinkGeo.MapSuite.Layers.Layer.Draw(GeoCanvas canvas, Collection1 labelsInAllLayers) at ThinkGeo.MapSuite.Wpf.LayerTile.JVc=(Layer layer, ThreadSafetyLevel threadSaftyLevel, GeoCanvas geoCanvas, Collection1 labelsInAllLayers)
at ThinkGeo.MapSuite.Wpf.LayerTile.JFc=(Layer layer, ThreadSafetyLevel threadSafetyLevel, GeoCanvas geoCanvas, Collection1 labelsInAllLayers, Action4 action)
at ThinkGeo.MapSuite.Wpf.LayerTile.DrawCore(GeoCanvas geoCanvas)
at ThinkGeo.MapSuite.Wpf.Tile.Draw(GeoCanvas geoCanvas)
at ThinkGeo.MapSuite.Wpf.Tile.Hlc=(Object status)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
InnerException:

Hi Dennis,

Attached is the sample with latest package, could you please view it and modify it to reproduce this exception?

8942.zip (231.9 KB)

Regards,

Ethan

hi Ethan,

have you tried to recreate with the JPEG2000’s rasters that are on my OriStarMapping ThinkGeo user area? That’s what you did last time and were able to recreate the exception. Remember that my JPEG2000’s are quite large and so careful memory management is required. I imagine that a small JPEG2000 raster would not show this problem.

This exception occurs every time.

Thanks,
Dennis

Hi Dennis,

I cannot directly view your FTP file, so whether your folder only contains one big JPEG2000 file? If you can let me know the data file name it’s better, our data manager can sent the file to us for test.

And I want to double check whether it also throw exception every time with my test sample or just in your project?

Regards,

Ethan

hi Ethan,

You’ll find four very large JPEG2000 raster layers on my ThinkGeo FileStation at the following location–>>
home/Chicago_Data/MapRasters2014

Thanks,
Dennis

Hi Dennis,

Thanks for your information, I see your data’s size are bigger than 1GB.

I also want to know whether you just found that in the latest version, any earlier version works without exception for the same data?

Our raster developer is on holiday, any question or update I will let you know after he back to work.

Regards,

Ethan

hi Ethan,

The was another combined thread on this issue last November:
V10 - MrSidRasterLayer & Jpeg2000RasterLayer - Exceptions

In that thread we were able to get MrSid and JPEG2000 working.

Dennis

Hi Dennis,

Thanks for your information.

So if that’s hurry please just roll back to use original version, after our developer back to work and solve it, I will let you know here.

Regards,

Ethan

hi Ethan,

I can wait on the fix for this.

Thanks,
Dennis

Hi Dennis,

Our developer back to work for your problem.

He viewed your other post also, and tried to reproduce this exception but failed.

We tested all the 4 JPEG2000 files under your folder, and the sample had upgraded the latest version today.

For example:
“MapSuiteDependency-LizardTechMrsid” 11.0.0-beta003
“ThinkGeo.MapSuite.Layers.Jpeg2000” 11.0.0-beta008

Please view our sample here
8942.zip (9.9 KB)

And our developer also create a video to show the reproducing progress, you can download it here: https://ap.thinkgeo.com:5001/sharing/6psEaoLa1

Please have a try this sample, if the reproducing progress have any problem or you have any more information please let us know.

Regards,

Ethan