Unknown error: File not found. shaders folder doesn't exist

844
4
02-16-2022 06:03 AM
bodkia22
New Contributor

While using my Map with ArcGis 100.12 I run into a problem.
I wonder, why did it happen?

Stack trace: 
2022-01-20 08:41:35,708 FATAL Map.App - *** Application crashed due to unhandled exception ***
Esri.ArcGISRuntime.ArcGISRuntimeException: Unknown error: File not found. shaders folder doesn't exist
at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()
at Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)

Tags (3)
0 Kudos
4 Replies
MichaelBranscomb
Esri Frequent Contributor

Can you provide more information about your application/project architecture?

The shaders folder is deployed automatically when you build your application and can be found in your project output folder adjacent to your application executable. For example, for a WPF .NET 6 app referencing the current version of ArcGIS Runtime and built as debug this would be:

`<YourApplicationProject>\bin\Debug\net6.0-windows10.0.19041.0\ArcGISRuntime100.13\resources\shaders`.

You need to ensure the ArcGISRuntime100.13 folder is deployed along with your application.

 

I'm also curious if this exception would have been caught with n UnhandledException handler, instead of causing your app to crash.

For example: 

{
    ...
    AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
    ...
}

private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
    Trace.TraceInformation($"Unhandled Exception Handler.{Environment.NewLine}{e.ExceptionObject}");
}

 

Thanks

0 Kudos
MirMur
by
New Contributor

I recently created a distribution package using MSIX. I checked the MSIX package and folder where the MSIX gets installed and they both contain the shaders folder in the correct location and all files are in it (compared to the bin folder while debugging the app)

All things considered, I get the same error when running the app and it comes to the part to load the map from esri.

The location of this folder is under the same folder containing the app and all of the dlls, including the runtime dlls from ersi:
...ArcGISRuntime100.13\resources\shaders

I get the feeling that Esri has some hidden setting for the location of the shaders folder, when installed within a MSIX app.

0 Kudos
ServisZLD
New Contributor

We've recently got the same exception.

The shaders folder is on path "\bin\x64\Debug\ArcGISRuntime100.14\resources\shaders"
The exception was handled by the "AppDomain.CurrentDomain.UnhandledException" but runtime terminates anyway

I can only say that an exception occurred when opening a map. The map has previously been successfully opened and closed several times.

2022-06-28 15:18:29.1647|ERROR|33272|225|10.175.125.50|Client.App.HandleException|Unhandled exception occured, isTerminating:True.
Esri.ArcGISRuntime.ArcGISRuntimeException: Unknown error: File not found. shaders folder doesn't exist
   v Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
   v RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
   v RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()
   v Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()
   v Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)
   v System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   v System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   v System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   v System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   v System.Windows.Threading.DispatcherOperation.InvokeImpl()
   v MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   v System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   v MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   v System.Windows.Threading.DispatcherOperation.Invoke()
   v System.Windows.Threading.Dispatcher.ProcessQueue()
   v System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   v MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   v MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   v System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   v System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   v System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   v MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   v MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   v System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   v Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)
   v System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   v System.Threading.ThreadHelper.ThreadStart(Object obj) Additional Message: File not found. shaders folder doesn't exist;System.Object:     v Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
   v RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
   v RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()
   v Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()
   v Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)
   v System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   v System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   v System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   v System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   v System.Windows.Threading.DispatcherOperation.InvokeImpl()
   v MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   v System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   v MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   v System.Windows.Threading.DispatcherOperation.Invoke()
   v System.Windows.Threading.Dispatcher.ProcessQueue()
   v System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   v MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   v MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   v System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   v System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   v System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   v MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   v MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   v System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   v Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)
   v System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   v System.Threading.ThreadHelper.ThreadStart(Object obj)

 

0 Kudos
JonathanHornberger
New Contributor

I'm having the same problem trying to upgrade to 100.15 wpf. This is not a .NET 6 0r 7, it's .net framework 4.7.2

Unknown error: File not found. shaders folder doesn't exist

I wish I knew where it was looking. I removed the previous versions of the ArcGIS runtime, I've gone through and cleaned up the folders and project files. Has anyone figured this out?

0 Kudos