ThinkGeo.com    |     Documentation    |     Premium Support

Random errors

I upgraded to the Desktop Edition beta that includes the google maps support. When I switched to the new libraries, there were a couple items that I had to change in my code to match the new method names and such.


When I run my application now though, without any changes other than the ones to make it compile, I am coming up with the error shown below. This doesn't come up in my code, but rather sometime after the map_load method completes. I'm loading the form containing the map with a show dialog call and the form shows for a second and then comes up with the null pointer error. (Actually, one time it had an error about dividing by zero, another time it complained about a file lock, but the one I saw most was the null pointer.) At one point, the map did actually load and stay visible without any changes in the code, just trying again.


Here is the stack trace of the error.


"   at ThinkGeo.MapSuite.Core.xc968c5331358f6a0.GetHeaderFromStream(Stream stream)\r\n   at ThinkGeo.MapSuite.Core.xdad12102199d8695.Open(FileAccess fileAccess)\r\n   at ThinkGeo.MapSuite.Core.ShapeFileFeatureSource.xad2da028b66b25e8()\r\n   at ThinkGeo.MapSuite.Core.ShapeFileFeatureSource.OpenCore()\r\n   at ThinkGeo.MapSuite.Core.FeatureSource.Open()\r\n   at ThinkGeo.MapSuite.Core.FeatureLayer.OpenCore()\r\n   at ThinkGeo.MapSuite.Core.Layer.Open()\r\n   at ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.xa6cb874f7090c07f(GeoCanvas x31c084515ae9393f)\r\n   at ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas)\r\n   at ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)\r\n   at ThinkGeo.MapSuite.DesktopEdition.xf0380b1a0bc40ca6.StartDraw()\r\n   at ThinkGeo.MapSuite.DesktopEdition.x601a5561df898600.x7510a5c148e0acfd(Object x19b0b2213afc2289)\r\n   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)\r\n   at System.Threading.ExecutionContext.runTryCode(Object userData)\r\n   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)\r\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)"


I then went in and started trying the examples for the Google maps, and the map now loads consistently. I made only the changes shown in the example for the Google maps and also somewhere on here about changing projections. I have some other issues that I'm not sure what the cause of is yet, but I thought I'd let you know about this first issue I had.



Kimberly, 
  
   Thanks for reporting this.  I think the new threading we added to the Desktop Edition in the latest beta is having problem and this would cause the random error messages.  We are going to release a refresh of the beta next week without the threading and see how many issues it clears up.  You are not alone on this, not that it makes you feel any better.  We will then go back through all of these posts and try an find out the root cause and get it fixed.  While the threading is causing everyone allot of headache there were allot of good features in the latest beta we want you to be able to take advantage of.  After we fix these threading issues we will turn it back on and you can get the great real-time panning. 
  
 David

Hi David,


Thanks for responding so quickly, it certainly minimizes the frustration.


Kimberly



Kimberly, 
  
 We are working on the new edition (without multithreading) and hopefully it will be ready in 2 weeks. Sorry for the inconvenience for now. 
  
 Thanks, 
  
 Ben