[GH-ISSUE #1400] [Bug] The self-contained version of the app crashes on exit when "Delete all files from cache when closing the app" is enabled in settings #1032

Closed
opened 2026-02-26 09:33:20 +03:00 by kerem · 0 comments
Owner

Originally created by @fz0000 on GitHub (Jul 13, 2025).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1400

Originally assigned to: @fz0000, @NickeManarin on GitHub.

Describe the bug
The self-contained version of the app crashes on exit when "Delete all files from cache when closing the app" is enabled in settings

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you are using the self-contained single file version.
  2. Perform a clean installation or delete all settings files before launching the app to ensure it uses the default settings.
  3. Go to 'Options' -> Storage.
  4. Check 'Delete all files from cache when closing the app' in "Other" section.
  5. Click OK button.
  6. Close the app.
  7. Click Yes if "Clear Cache" dialog pops up.
  8. App crashes and the dump file is created in the %LocalAppData%\CrashDumps folder. You can check the log file for details.

Expected behavior
App exit without errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 2.41.3

Additional context
Error in the log file:

► Title - 
	Purging cache
♦ [Version] Date/Hour - 
	[2.41.3] 07/13/2025 23:09:13
▬ Message - 
	Access to the path 'D3DCompiler_47_cor3.dll' is denied.
○ Type - 
	System.UnauthorizedAccessException
▲ Source - 
	System.Private.CoreLib
▼ TargetSite - 
	Void RemoveDirectoryRecursive(System.String, WIN32_FIND_DATA ByRef, Boolean)
♠ StackTrace - 
   at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
   at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
   at ScreenToGif.Util.StorageUtils.PurgeCache() in R:\Source\ScreenToGif\ScreenToGif\Util\StorageUtils.cs:line 17

----------------------------------

► Title - 
	Current domain unhandled exception - Unknown
♦ [Version] Date/Hour - 
	[2.41.3] 07/13/2025 23:09:13
▬ Message - 
	Dll was not found.
○ Type - 
	System.DllNotFoundException
▲ Source - 
	DirectWriteForwarder
▼ TargetSite - 
	Void __std_type_info_destroy_list(__type_info_node*)
♠ StackTrace - 
   at __std_type_info_destroy_list(__type_info_node*)
   at __scrt_uninitialize_type_info()
   at _app_exit_callback()
   at <CrtImplementationDetails>.ModuleUninitializer.SingletonDomainUnload(Object source, EventArgs arguments)

----------------------------------

Originally created by @fz0000 on GitHub (Jul 13, 2025). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1400 Originally assigned to: @fz0000, @NickeManarin on GitHub. **Describe the bug** The self-contained version of the app crashes on exit when "Delete all files from cache when closing the app" is enabled in settings **To Reproduce** Steps to reproduce the behavior: 1. Make sure you are using the self-contained single file version. 2. Perform a clean installation or delete all settings files before launching the app to ensure it uses the default settings. 3. Go to 'Options' -> Storage. 4. Check 'Delete all files from cache when closing the app' in "Other" section. 5. Click OK button. 6. Close the app. 7. Click Yes if "Clear Cache" dialog pops up. 8. App crashes and the dump file is created in the `%LocalAppData%\CrashDumps` folder. You can check the log file for details. **Expected behavior** App exit without errors. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: Windows 11 - Version: 2.41.3 **Additional context** Error in the log file: ``` ► Title - Purging cache ♦ [Version] Date/Hour - [2.41.3] 07/13/2025 23:09:13 ▬ Message - Access to the path 'D3DCompiler_47_cor3.dll' is denied. ○ Type - System.UnauthorizedAccessException ▲ Source - System.Private.CoreLib ▼ TargetSite - Void RemoveDirectoryRecursive(System.String, WIN32_FIND_DATA ByRef, Boolean) ♠ StackTrace - at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel) at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive) at ScreenToGif.Util.StorageUtils.PurgeCache() in R:\Source\ScreenToGif\ScreenToGif\Util\StorageUtils.cs:line 17 ---------------------------------- ► Title - Current domain unhandled exception - Unknown ♦ [Version] Date/Hour - [2.41.3] 07/13/2025 23:09:13 ▬ Message - Dll was not found. ○ Type - System.DllNotFoundException ▲ Source - DirectWriteForwarder ▼ TargetSite - Void __std_type_info_destroy_list(__type_info_node*) ♠ StackTrace - at __std_type_info_destroy_list(__type_info_node*) at __scrt_uninitialize_type_info() at _app_exit_callback() at <CrtImplementationDetails>.ModuleUninitializer.SingletonDomainUnload(Object source, EventArgs arguments) ---------------------------------- ```
kerem 2026-02-26 09:33:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1032
No description provided.