Hi,
We are migrating Thinkgeo to a WPF core version.
When I run our application, in the loaded event, I get an “Object reference not set to an instance of an object” error.
However this error appears randomly, sometimes the application starts, everything works well and other times the error message appears.
The error appears when adding an overlay on the map (_wpfMap.Overlays.Add (overlay))
Have you ever encountered this problem ?
Thank you.
Regards.
Steph.
Error message :
at ThinkGeo.Core.MapViewBase.gEQ=(Object sender, AddedGeoCollectionEventArgs e)
at ThinkGeo.Core.GeoCollection1.OnAdded(AddedGeoCollectionEventArgs e) at ThinkGeo.Core.GeoCollection
1.Add(String key, T item)
at ThinkGeo.Core.GeoCollection1.Add(T item) at Workspaces.Cartographie.Layers.LayerService.CréerOverlayRaster(IEnumerable
1 couches, IEnumerable`1 coucheCartoIds, Boolean isBaseMap) in C:\StephTFSCore\Workspaces.Cartographie\Layers\LayerService.cs:line 204
- $exception {“Object reference not set to an instance of an object.”} System.NullReferenceException
- Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
HResult -2147467261 int
HelpLink null string - InnerException null System.Exception
Message “Object reference not set to an instance of an object.” string
Source “ThinkGeo.UI.Wpf” string
StackTrace " at ThinkGeo.Core.MapViewBase.gEQ=(Object sender, AddedGeoCollectionEventArgs e)\r\n at ThinkGeo.Core.GeoCollection1.OnAdded(AddedGeoCollectionEventArgs e)\r\n at ThinkGeo.Core.GeoCollection
1.Add(String key, T item)\r\n at ThinkGeo.Core.GeoCollection1.Add(T item)\r\n at Workspaces.Cartographie.Layers.LayerService.CréerOverlayRaster(IEnumerable
1 couches, IEnumerable`1 coucheCartoIds, Boolean isBaseMap) in C:\StephTFSCore\Workspaces.Cartographie\Layers\LayerService.cs:line 204" string - TargetSite {Void gEQ=(System.Object, ThinkGeo.Core.AddedGeoCollectionEventArgs)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
Attributes Private | HideBySig System.Reflection.MethodAttributes
CallingConvention Standard | HasThis System.Reflection.CallingConventions
ContainsGenericParameters false bool
CustomAttributes La méthode System.Reflection.MemberInfo.get_CustomAttributes ne peut pas être appelée dans ce contexte. System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> - DeclaringType {Name = “MapViewBase” FullName = “ThinkGeo.Core.MapViewBase”} System.Type {System.RuntimeType}
IsAbstract false bool
IsAssembly false bool
IsCollectible La méthode System.Reflection.RuntimeMethodInfo.get_IsCollectible ne peut pas être appelée dans ce contexte. bool
IsConstructedGenericMethod La méthode System.Reflection.MethodBase.get_IsConstructedGenericMethod ne peut pas être appelée dans ce contexte. bool
IsConstructor false bool
IsFamily false bool
IsFamilyAndAssembly false bool
IsFamilyOrAssembly false bool
IsFinal false bool
IsGenericMethod false bool
IsGenericMethodDefinition false bool
IsHideBySig true bool
IsPrivate true bool
IsPublic false bool
IsSecurityCritical La méthode System.Reflection.RuntimeMethodInfo.get_IsSecurityCritical ne peut pas être appelée dans ce contexte. bool
IsSecuritySafeCritical La méthode System.Reflection.RuntimeMethodInfo.get_IsSecuritySafeCritical ne peut pas être appelée dans ce contexte. bool
IsSecurityTransparent La méthode System.Reflection.RuntimeMethodInfo.get_IsSecurityTransparent ne peut pas être appelée dans ce contexte. bool
IsSpecialName false bool
IsStatic false bool
IsVirtual false bool
MemberType Method System.Reflection.MemberTypes
MetadataToken 100663828 int - MethodHandle {System.RuntimeMethodHandle} System.RuntimeMethodHandle
MethodImplementationFlags La méthode System.Reflection.MethodBase.get_MethodImplementationFlags ne peut pas être appelée dans ce contexte. System.Reflection.MethodImplAttributes - Module {ThinkGeo.UI.Wpf.dll} System.Reflection.Module {System.Reflection.RuntimeModule}
Name “gEQ=” string - ReflectedType ‘((System.Reflection.RuntimeMethodInfo)($exception).TargetSite).ReflectedType’ threw an exception of type ‘System.NotSupportedException’ System.Type {System.NotSupportedException}
- ReturnParameter {System.Void } System.Reflection.ParameterInfo
- ReturnType {Name = “Void” FullName = “System.Void”} System.Type {System.RuntimeType}
ReturnTypeCustomAttributes La méthode System.Reflection.RuntimeMethodInfo.get_ReturnTypeCustomAttributes ne peut pas être appelée dans ce contexte. System.Reflection.ICustomAttributeProvider