And you can switch the ThreadingMode to SingleThreaded, let me know if it still throws exception or not.
If you make sure you’re in the same bug, you can contact our supports support@thinkgeo.com and let them give you the DLL package 3.1.302 for DesktopEdition.
Or you think it’s another issue, please give me more information about it.
Thanks for your more information! No exception in singlethead is a proof of the bug which fixed in 3.1.302.
Have you ever disable the preview, if throw exception still, that means the bug is not related to preview, in this condition, maybe you can try the 3.1.302.
I tested 3.1.302 in multithread, it has not any exception if I do any operation.
If still can not find your problem, maybe you can make a small sample to reproduce this bug, I think that’s the best and fast way to find the bug.
Hi, this bug seems to be still reproducible … :( Here is a new exception on 3.1.302 with multithread and preview tile; it occured while zoomin with mouse wheel …
L’exception System.ArgumentException n’a pas été gérée Message=“Le paramètre n’est pas valide.” Source=“System.Drawing” StackTrace: à System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format) à System.Drawing.Bitmap…ctor(Int32 width, Int32 height) à ThinkGeo.MapSuite.Core.BitmapTileCache.MergeBitmaps(IEnumerable`1 tilesToMerge, Double scale) à ThinkGeo.MapSuite.Core.FileBitmapTileCache.GetHigherScaleTileCore(RectangleShape tileBoundingBox, Double tileScale) à ThinkGeo.MapSuite.Core.BitmapTileCache.GetHigherScaleTile(RectangleShape tileBoundingBox, Double tileScale) à ThinkGeo.MapSuite.DesktopEdition.Overlay.xb3186ca70b77c0af(GeoCanvas x31c084515ae9393f, BitmapTile x8a53648d37fcd628) à ThinkGeo.MapSuite.DesktopEdition.Overlay.DrawPreviewCore(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.Overlay.DrawPreview(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x13b023a82ad02573(Overlay x8c3bff8200340d24, RectangleShape x178b193eec228e6e, Boolean x991dc8ddc7528b44) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x7d52d0ad1d6779cd(Boolean x991dc8ddc7528b44, RectangleShape x178b193eec228e6e) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xb348bd4011a858f2(Int32 xb565f4681f05557a) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39(Int32 xb565f4681f05557a) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xc8fbf8304fe7558e(InteractionArguments x195facd4ef5d753d) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xfeca3317d3c75bbb(Object xd9272088e65bd176, x6a8380ab1a7ebb4c xc2fd4c0ed406cdb7) à ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.OnMouseEvent(x6a8380ab1a7ebb4c e) à ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.AnalyseMouseWheel(Double screenX, Double screenY, Double worldX, Double worldY, Int32 delta) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xb0cb8571d4771126(Object xd9272088e65bd176, MouseEventArgs xc2fd4c0ed406cdb7) à System.Windows.Forms.Control.OnMouseWheel(MouseEventArgs e) à System.Windows.Forms.Control.WmMouseWheel(Message& m) à System.Windows.Forms.Control.WndProc(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) à System.Windows.Forms.Application.Run(Form mainForm) à ArpentGIS.Program.Main() dans D:\ToBackup\D3E\ArpentGIS\Program.cs:ligne 20 à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) à System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) à System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) à System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) à System.Activator.CreateInstance(ActivationContext activationContext) à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() à System.Threading.ThreadHelper.ThreadStart_Context(Object state) à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) à System.Threading.ThreadHelper.ThreadStart() InnerException:
L’exception System.InvalidOperationException n’a pas été gérée Message=“This method will return too many cells that might cause performance problem. Please using GetIntersectingRowColumnRange method instead.” Source=“MapSuiteCore” StackTrace: à ThinkGeo.MapSuite.Core.Matrix.GetIntersectingCells(RectangleShape worldExtent) à ThinkGeo.MapSuite.Core.BitmapTileCache.GetTiles(RectangleShape worldExtent) à ThinkGeo.MapSuite.Core.FileBitmapTileCache.GetHigherScaleTileCore(RectangleShape tileBoundingBox, Double tileScale) à ThinkGeo.MapSuite.Core.BitmapTileCache.GetHigherScaleTile(RectangleShape tileBoundingBox, Double tileScale) à ThinkGeo.MapSuite.DesktopEdition.Overlay.xb3186ca70b77c0af(GeoCanvas x31c084515ae9393f, BitmapTile x8a53648d37fcd628) à ThinkGeo.MapSuite.DesktopEdition.Overlay.DrawPreviewCore(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.Overlay.DrawPreview(GeoCanvas canvas) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x13b023a82ad02573(Overlay x8c3bff8200340d24, RectangleShape x178b193eec228e6e, Boolean x991dc8ddc7528b44) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x7d52d0ad1d6779cd(Boolean x991dc8ddc7528b44, RectangleShape x178b193eec228e6e) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xb348bd4011a858f2(Int32 xb565f4681f05557a) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39(Int32 xb565f4681f05557a) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xc8fbf8304fe7558e(InteractionArguments x195facd4ef5d753d) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xfeca3317d3c75bbb(Object xd9272088e65bd176, x6a8380ab1a7ebb4c xc2fd4c0ed406cdb7) à ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.OnMouseEvent(x6a8380ab1a7ebb4c e) à ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.AnalyseMouseWheel(Double screenX, Double screenY, Double worldX, Double worldY, Int32 delta) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xb0cb8571d4771126(Object xd9272088e65bd176, MouseEventArgs xc2fd4c0ed406cdb7) à System.Windows.Forms.Control.OnMouseWheel(MouseEventArgs e) à System.Windows.Forms.Control.WmMouseWheel(Message& m) à System.Windows.Forms.Control.WndProc(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) à System.Windows.Forms.Application.Run(Form mainForm) à ArpentGIS.Program.Main() dans D:\ToBackup\D3E\ArpentGIS\Program.cs:ligne 20 à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) à System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) à System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) à System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) à System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) à System.Activator.CreateInstance(ActivationContext activationContext) à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() à System.Threading.ThreadHelper.ThreadStart_Context(Object state) à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) à System.Threading.ThreadHelper.ThreadStart() InnerException:
It seems the 2 excetions are 2 different issues, right?
I am very familiar with the second one. The problem is you set wrong unit for your map control, for example, your data should be in DecimalDegrees , while your set your map control unit to Meter or feet etc, which will cause wrong caculation when dealing with Tiles.
The 2 issues occurs when I play (scroll/pan) with the map in multithread environment with preview tiles on. in single thread and without preview tile, with the same data, it works well.
I’m using decimaldregrees data, projected to meters and displayed with map control unit to meter.
I’m pretty sure that there is an issue somewhere in your tiling system ; I can reproduce it very easily but only in multithread+previewtile mode. Remember that I’m french and the issue maybe related to my locale.
add. info, I set map.minscale = 10; I don’t know if it’s related Add. info2 : I can also reproduce case where one tile is missing/misplaced/misaligned when displaying; again only in multithread+preview only
We have already created a virtual machine which using French environment instead of English environment. That machine has recreated many issues before, some of them are solved, and some of them are not. But this time, I can not recreate the exception, I follow the setting as you mentioned: use multi-threaded mode, turn on preview, project data from decimal degree to meter unit, set MapUnit to meter, set mini scale to 10.
So if you could provide a small and simple sample, it will be very helpful to recreate this problem and solve it.
I am sorry about the problem of info2, to be frank they were the known issues which we could not solve recently, if another users mentioned this problem, we will let them use single-threaded temporary until we solve it. I am so sorry given you so many inconveniences, I am sure that if we fix it I will let you know as soon as possible.
Your sample code can not work because it will throw exception at the penultimate line of code: winformsMap1.CurrentExtent = worldLayer.GetBoundingBox();
The reason is that the worldLayer is not Open.
We can easily add worldLayer.Open() to make your sample code works, but I am afraid this code might not the original one which will throw the exception in FR not in EN. Could you review the code and verify it?
I can not recreate your problem so far, sometimes it will very easy to solve the problem if we can recreate the problem easily, So could you provide a more certainly sample, for example, if I click a button, the exception will be thrown. I remember you have provided a sample about tile cache, if I click the button, it will generate cached images in specific folder, in French environment, the double contain ‘,’ so the folder name is not as we expected, when we recreate the problem, at the same time, we solve the problem.
I will keep testing it, and if I make any progresses I will let you know.
Here is a more simpler sample that raise the exception on XP 32 bits FR machine. it works perfectly on my W7 64 bits FR computer.
I build using 3.1.302; x86 mode; .net 3.5 sp1
Here, we are in singlethread, with no layer loaded and we can see a large red cross on the screen and the exception is raised. à System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format) à System.Drawing.Bitmap…ctor(Int32 width, Int32 height) (…) à ThinkGeo.MapSuite.DesktopEdition.WinformsMap.OnPaint(PaintEventArgs e)
Please note that the cache tile folders do not exist before we launch the program and MS only create staticOverlayTileCache1; staticOverlayTileCache is not created.
This time, the result is that the map will show a white screen without logo, but still won’t throw exception with the red cross. I will do more test on it and let you know the result.
I am worse than you that I don’t have so many machines to test , but from the stack trace, I located the method which throws the exception, it contains the code that create a bitmap by passing the width and height, so I added a check to avoid input the invalid value, It is just a try, I am not very sure that can solve your problem.
I will test the new DLL tomorrow and send you a temporary package.
You still can provide additional if you think it’s helping.