+ Reply to Thread
Results 1 to 3 of 3

Thread: C# FGDB API crashing on some systems running ArcGIS 9.3.1

  1. #1
    Art Ullman
    Join Date
    Mar 2010
    Posts
    54
    Points
    1
    Answers Provided
    0


    0

    Default C# FGDB API crashing on some systems running ArcGIS 9.3.1

    I am having a problem deploying the C# FGDB API to 'some' systems. I have copied ESRI.FileGDBAIP.dll, FILEGDBAPI.dll and FileGDBAPID.dll to the same directory as the executable. All systems are running the same version of the .Net Framework - v4.0.30319. I put a try/catch around the geodatabase open, but it still crashes immediately on execution. This is a 20 line program that tries to read a table from an FGDB. I am seeing the error on systems running older versions of ArcGIS - specifically 9.3.1. I am not seeing the error on systems running ArcGIS 10. My understanding is that the API should be independant of any ArcGIS install. Is this correct or is there a dependancy on ArcGIS Desktop libraries? Are there any additional installs besides dropping the DLLs into the directory with the executable? It is a simple WPF app.

    Here is the event:

    Application: TestFGDB.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    Stack:
    at TestFGDB.MainWindow.click_button(System.Object, System.Windows.RoutedEventArgs)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
    at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
    at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
    at System.Windows.Controls.Primitives.ButtonBase.OnClick()
    at System.Windows.Controls.Button.OnClick()
    at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
    at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
    at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
    at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
    at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
    at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
    at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
    at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
    at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
    at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
    at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
    at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
    at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
    at System.Windows.Threading.Dispatcher.Run()
    at System.Windows.Application.RunDispatcher(System.Object)
    at System.Windows.Application.RunInternal(System.Windows.Window)
    at System.Windows.Application.Run(System.Windows.Window)
    at System.Windows.Application.Run()
    at TestFGDB.App.Main()

  2. #2
    Lance Shipman

    Join Date
    Oct 2009
    Posts
    390
    Points
    113
    Answers Provided
    19


    0

    Default Re: C# FGDB API crashing on some systems running ArcGIS 9.3.1

    The API is not dependent on any of the ArcGIS libraries. You do need to have the Microsoft Visual C++ 2010 Run-time installed. Also be aware that the API can only open 10.0 file geodatabases.
    Last edited by lshipman; 01-04-2012 at 02:36 PM.
    Lance Shipman
    Geodatabase Product Engineer, File Geodatabase, SQLite
    Esri

  3. #3
    Art Ullman
    Join Date
    Mar 2010
    Posts
    54
    Points
    1
    Answers Provided
    0


    0

    Thumbs up Re: C# FGDB API crashing on some systems running ArcGIS 9.3.1

    Thanks. That explains it. I ran a dependancy walker on the API DLLs and found that I was missing the Visual C++ Run in my deployment. I added msvcp100.dll and msvcr100.dll to my deployment directory, and everything worked after that. Thank you all of your help.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts