ThinkGeo.com    |     Documentation    |     Premium Support

GeoTIFF will crash System

Hi,
when using Desktop Daily Full Development 9.0.359.0 and displaying GeoTIFF’s the complete application will Crash.
Using Daily Full Development 9.0.273.0 works fine.

There are no changes in my Code.

Do I have to install a newer “unmanaged dependencies”? But where to get the actual one?

Regards
Hardy

Hi Hartwig,

I can’t reproduce your issue. Can you send your sample to me? In normally, the GeoTiffRasterLayer is managed class, if you don’t use the projection or specify the “LibraryType” to “GeoTiffLibraryType.UnmanagedLibTiff”.

Thanks,

Hi Don,

here is my code:
Public Function LoadGeoTiffLayer(LayerPath As String, EPSG As Integer) As GeoTiffRasterLayer
Try
Dim TiffRasterLayer As GeoTiffRasterLayer

        Dim fileExists As Boolean
        fileExists = My.Computer.FileSystem.FileExists(LayerPath.ToLower.Replace(".tif", ".tfw"))
        If fileExists Then
            TiffRasterLayer = New GeoTiffRasterLayer(LayerPath, LayerPath.ToLower.Replace(".tif", ".tfw"))
        Else
            TiffRasterLayer = New GeoTiffRasterLayer(LayerPath)
        End If

        With TiffRasterLayer
            .IsVisible = False

            .ImageSource.Projection = GetProjection4(EPSG)
            .Name = LayerPath

            .Open()
        End With
        Return TiffRasterLayer
    Catch ex As Exception
        c_lastError &= ex.Message & vbNewLine
        Debug.WriteLine(ex.Message)
        Return Nothing
    End Try

End Function

Regards
Hardy

Don,
I have downloaded Development 9.0.360.
When loading the Raster files there is no problem.
But when the raster will be displayed and the map is refreshing (theMap.refresh()) application crashes.
Maybe there are problems with projection!?
Here is the exception I’m getting:
System.AccessViolationException wurde nicht behandelt.
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=MapSuiteCore
StackTrace:
bei xRM=.jEU=.mEU=(Bitmap bitmap, Double[] sourceWorldfileData, String sourceProjectionString, String targetProjectionString, Double[] targetWorldfileData)
bei xRM=.jEU=.lEU=(Bitmap sourceBitmap, RectangleShape extent, String sourceProjectionString, String targetProjectionString, RectangleShape targetMinExtent)
bei ThinkGeo.MapSuite.Core.ManagedProj4Projection.ConvertToExternalProjectionCore(GeoImage image, RectangleShape imageExtent)
bei ThinkGeo.MapSuite.Core.Projection.ConvertToExternalProjection(GeoImage image, RectangleShape imageExtent)
bei ThinkGeo.MapSuite.Core.RasterSource.GetImage(RectangleShape worldExtent, Int32 canvasWidth, Int32 canvasHeight)
bei ThinkGeo.MapSuite.Core.RasterLayer.DrawCore(GeoCanvas canvas, Collection1 labelsInAllLayers) bei ThinkGeo.MapSuite.Core.GeoTiffRasterLayer.DrawCore(GeoCanvas canvas, Collection1 labelsInAllLayers)
bei ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection1 labelsInAllLayers) bei ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas) bei ThinkGeo.MapSuite.DesktopEdition.Overlay.lRQ=(GeoCanvas canvas) bei ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas) bei ThinkGeo.MapSuite.DesktopEdition.WinformsMap.WRU=(IEnumerable1 drawingOverlays, RectangleShape extent)
bei ThinkGeo.MapSuite.DesktopEdition.WinformsMap.WBU=(RectangleShape drawingExtent, RectangleShape extent)
bei ThinkGeo.MapSuite.DesktopEdition.WinformsMap.eBU=(RectangleShape extent)
bei ThinkGeo.MapSuite.DesktopEdition.WinformsMap.dhU=(Int32 delayInterval, RectangleShape extent)
bei ThinkGeo.MapSuite.DesktopEdition.WinformsMap.Refresh()
bei gisMEWinFormsClient.GmGisRibbonForm.ZoomLayer(Object Layername) in D:\projects\Hybrid\gisMEWinFormsClient\gisMEWinFormsClient\gm_GisRibbonForm.vb:Zeile 7925.
bei gisMEWinFormsClient.GmGisRibbonForm.zoomextent_click(Object sender, EventArgs e) in D:\projects\Hybrid\gisMEWinFormsClient\gisMEWinFormsClient\gm_GisRibbonForm.vb:Zeile 1496.
bei Telerik.WinControls.RadElement.OnClick(EventArgs e)
bei Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
bei Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
bei Telerik.WinControls.RadElement.DoClick(EventArgs e)
bei Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
bei Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
bei Telerik.WinControls.RadElement.CallDoMouseUp(MouseEventArgs e)
bei Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
bei Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei Telerik.WinControls.RadControl.WndProc(Message& m)
bei Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bei gisMEWinFormsClient.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 82.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException:

Hope that helps.
Regards
Hardy

Hi Hardy,

Please download Setup Unmanaged Dependencies 9.0.295.0 from here: https://ap.thinkgeo.com:5001/sharing/mrgzybRuR, and install it.

We did some update for it, I think it can solved your issue.

Regards,

Don

Don,

now it’s working fine again.

Regards
Hardy

Hi Hardy,

I am glad to hear that works.

Regards,

Don

I am getting the same problem with the 9.0.0.401 Production Assemblies. Could you please provide an updated link to the latest unmanaged assemblies? The error I receive is when using the ManagedLibTiff. If I switch to the UnManaged version (which I would prefer because it doesn’t require a TFW), I get a generic application crash.

Hi Thomas,

This link is for production version: https://ap.thinkgeo.com:5001/sharing/sBCBSpHgW

And this is for development version: https://ap.thinkgeo.com:5001/sharing/Qcf682hYc

Wish that’s helpful.

Regards,

Don

Hi,

we now have the problem with version 9.0.503 too.
Can I please get the link to the unmanaged assemblies? Thanks.

Peter

Hi Peter,

This link for version higher than 9.0.437.0 https://ap.thinkgeo.com:5001/sharing/RB1Vog3nM

And this for version higher than 9.0.0.304 https://ap.thinkgeo.com:5001/sharing/Y8BqWWNCP

Regards,

Don