ThinkGeo.com    |     Documentation    |     Premium Support

Strange behavior with ScaleBarPrinterLayer

Hi Guys,



We are using MS Desktop Production version 8.0.0.351.

Recently we have begun to experience strange behavior with the ScaleBarPrinterLayer. I have attached a sample project so you can reproduce the issue. In order to see the problem, start the project, then use the mouse wheel to zoom into the scalebar. Zoom in very close. As you zoom in the ScaleBarPrinterLayer begins to draw incorrectly (see the screenshot below).



Here is the error and stacktrace:


System.OverflowException was unhandled
Message: An unhandled exception of type ‘System.OverflowException’ occurred in MapSuiteCore.dll
 
Additional information: Overflow error.
 
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.Layer.Draw(ThinkGeo.MapSuite.Core.GeoCanvas canvas, System.Collections.ObjectModel.Collection
<thinkgeo.mapsuite.core.simplecandidate> labelsInAllLayers)    Unknown

DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.PrinterInteractiveOverLay.DrawCore(ThinkGeo.MapSuite.Core.GeoCanvas canvas) Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.Overlay.axQ=(ThinkGeo.MapSuite.Core.GeoCanvas bBQ=) Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(ThinkGeo.MapSuite.Core.GeoCanvas canvas)   Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.FhQ=(ThinkGeo.MapSuite.Core.RectangleShape nxc=, ThinkGeo.MapSuite.DesktopEdition.Overlay oBc=, int oRc=, int ohc=, ThinkGeo.MapSuite.Core.GeographyUnit oxc=)  Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.CxQ=(System.Collections.Generic.IEnumerable
<thinkgeo.mapsuite.desktopedition.overlay> pRc=) Unknown

DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.9xM=(ThinkGeo.MapSuite.Core.RectangleShape lRc=)    Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.8xM=(int kRc=, ThinkGeo.MapSuite.Core.RectangleShape khc=)  Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.4BM=(ThinkGeo.MapSuite.DesktopEdition.InteractionArguments ghc=)    Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.0hM=(object dhc=, IBQ=.0xU= dxc=)   Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.MouseEventAnalyzer.OnMouseEvent(IBQ=.0xU= e)    Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.MouseEventAnalyzer.txQ=(double uBQ=, double uRQ=, double uhQ=, double uxQ=) Unknown
DesktopEdition.dll!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.fBc=(object fRc=, System.Windows.Forms.MouseEventArgs fhc=) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs e)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseMove(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)  Unknown
[Native to Managed Transition]  
[Managed to Native Transition]  
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData)  Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context)  Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()    Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(string[] commandLine)   Unknown
[Native to Managed Transition]  
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()   Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)    Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()    Unknown









Thanks!



Steve

006_005_004_003_002_001_ScaleBarTest.zip (56.5 KB)

Hi Steven,

Thanks for your sample, it is very helpful.

The issue proved a bug and we fixed it. However, as we are ready for the map suite 9.0 release and froze the dll package build, would you mind to wait some days till 9.0 release? The map suite 9.0 are planed to release in this month. Another option is we build a specify modified dll version for you if this fix is urgent for you.



Please let us know your idea.

Thanks,

Troy

Hi Troy, 
  
 We can wait for the 9.0 release no problem. Do you guys know the release date? 
  
 Thanks! 
  
 Steve

Hello Steve, 
  
 As I know, the release will be at the end of this month. Thanks for the waiting. 
  
 Thanks, 
  
 Troy