Error when using isolines
Thanks.
Hi Clay,
Thanks for your information, I guess the reason is that we are trying to load a 32bit dll into a 64bit processing. Could you please follow the steps shown as below:
1. Open Project Properties…
2. Switch to “Build” and make the Platform target as “x86”:
After these settings, please try cleaning the project and rebuild the solution to have another try.
If still runs into exception, could you provide us more details or a complete demo for test?
Thanks,
Johnny
The target is already set to x86, and I verified that the dll being distributed is 32-bit as well.
Hi Clay,
Thanks for test that.
I think the isoline don’t require some special dlls, and I am sorry we haven’t recreated your issue on our end, so could you please provide a demo to us so we can recreate that?
Thanks,
Tang
If I compile and move over the DisplayIsoLines sample from your samples page, and add a small bit of error handling to it, I come up with the same error I’m now capturing in my application.
Exception: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) ================================================ Inner Exception: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
------------------------------------------------ Stack Trace: ------------------------------------------------ Inner Exception Stack Trace: at Microsoft.SqlServer.Types.GLNativeMethods.IsValid(GeoMarshalData g, Boolean& result) at Microsoft.SqlServer.Types.GLNativeMethods.IsValid(GeoData g) at Microsoft.SqlServer.Types.SqlGeometry.IsValidExpensive() at Microsoft.SqlServer.Types.SqlGeometry.Construct(GeoData g, Int32 srid) at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromBinary(OpenGisType type, SqlBytes binary, Int32 srid) at Microsoft.SqlServer.Types.SqlGeometry.STGeomFromWKB(SqlBytes wkbGeometry, Int32 srid) at ThinkGeo.MapSuite.Core.IsoLineLayer.8hU=(GridCell[,] 8xU=, GridCell[,] 9BU=, Double 9RU=, Double 9hU=) at ThinkGeo.MapSuite.Core.IsoLineLayer.GetIsoFeatures(GridCell[,] gridMatrix, IEnumerable`1 isoLineLevels, String dataValueColumnName, IsoLineType isoLineType, Double noDataValue) at ThinkGeo.MapSuite.Core.DynamicIsoLineLayer.GetIsoLineFeatures(RectangleShape worldExtent, Double scale, GeographyUnit mapUnit) at ThinkGeo.MapSuite.Core.DynamicIsoLineLayer.GetFeaturesForDrawingCore(GeoCanvas canvas, Collection`1 labelsInAllLayers) at ThinkGeo.MapSuite.Core.IsoLineLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers) at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
Hi Clay,
It looks the exception shows the feature in layer cannot pass the validation of SQLTypes dll. You can see the error message is the same, but it thrown from different code.
So I want to double check, whether our ISOLine sample can work well in your machine? Does that only been thrown after you create your project? If so I think that’s still environment issue.
If you cannot make that work, please build a really simple sample, you can put our code into it, make it thrown this exception in your end and sent that to us, we can try to reproduce that and find what’s the possible problem.
Regards,
Don
I know that it’s an environment issue. That’s what I originally reported as the problem. I just don’t know how to fix it. I get the same exception running from the sample I downloaded, and that’s what is showing above.
Hi Clay,
I think you should downloaded this sample:
wiki.thinkgeo.com/wiki/File:ServicesEditionSample_Isolines_CS_WPF_111115.zip
I just download it today, reference dlls, then it works well in my machine.
My test machine is WIN7 x64, wpf edition 8.0.0.173, Visual Studio 2010.
So I think if that’s because missing our dlls, you should want to install the latest installer package from our product center for repair that (It will install our latest Setup Unmanaged Dependencies.msi).
If that still don’t work, please test that in another machine for make sure whether that’s related with your OS.
Regards,
Don
Running the Unmanaged Dependencies setup seems to have done the trick. Thanks.
Hi Clay,
I am glad to hear you have solved that.
Regards,
Don