Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Selecting a shortcut in a git folder crashes Files #17008

Open
wuyilingwei opened this issue Apr 2, 2025 · 7 comments · May be fixed by #17015
Open

Bug: Selecting a shortcut in a git folder crashes Files #17008

wuyilingwei opened this issue Apr 2, 2025 · 7 comments · May be fixed by #17015
Labels
crash Bug reports involving a crash

Comments

@wuyilingwei
Copy link

wuyilingwei commented Apr 2, 2025

Description

Trying to click/select a link file in any way will cause the entire program to crash and restart.
This is the command in link file. Used to convert pictures in the same directory to webp through ffmpeg

C:\Windows\System32\cmd.exe /C for %i in (*.jpg *.png *.jpeg) do ffmpeg -i "%i" "%~ni.webp"

Steps To Reproduce

  1. Create a new shortcut and fill in the above command
  2. Any attempt to select this file in files will result in a crash.(no need running)

Files Version

3.9.1.0

Windows Version

10.0.22631.5039

User ID

9a9d7334-3ac0-4870-a4ae-9503d5f3c117

Log File

debug.log

@wuyilingwei wuyilingwei changed the title Bug: link file case crash Bug: link file cause crash Apr 2, 2025
@Josh65-2201
Copy link
Member

Thanks for the report

@Josh65-2201 Josh65-2201 added the crash Bug reports involving a crash label Apr 2, 2025
@Josh65-2201 Josh65-2201 changed the title Bug: link file cause crash Bug: Opening a shortcut crashes Files Apr 2, 2025
@wuyilingwei
Copy link
Author

I want to correct a problem, the crash occurs at the selection stage instead of opening it, and I have the details bar enabled, maybe it has something to do with this feature

@Josh65-2201
Copy link
Member

Can you see if this is an issue in the preview version. https://files.community/download

@Liguma
Copy link

Liguma commented Apr 2, 2025

Have the same problem and it occurs in both versions.
!!! If I move the linke with win standard file explorer to another place, I can the also work with it within files !!!

@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board Apr 2, 2025
@wuyilingwei
Copy link
Author

Can you see if this is an issue in the preview version. https://files.community/download

I comform that also is an issue in the 3.9.3.0 preview version.

2025-04-02 13:21:58.9780|Information|Files.App.Launcher updated.
2025-04-02 13:22:10.9891|Error|System.InvalidCastException: Unable to cast object of type 'Files.App.Utils.GitShortcutItem' to type 'Files.App.Utils.ShortcutItem'.
   at Files.App.Utils.ListedItem.get_IsLinkItem()
   at Files.App.Helpers.ShareItemHelpers.IsItemShareable(ListedItem item)
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at Files.App.Actions.ShareItemAction.get_IsExecutable()
   at Files.App.UserControls.Toolbar.Toolbar_obj1_Bindings.Toolbar_obj1_BindingsTracking.PropertyChanged_Commands_ShareItem(Object sender, PropertyChangedEventArgs e)
   at Files.App.Data.Commands.ActionCommand.Action_PropertyChanged(Object sender, PropertyChangedEventArgs e)
   at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.SetProperty[T](T& field, T newValue, String propertyName)
   at Files.App.Data.Contexts.ContentPageContext.UpdateSelectedItems()
   at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.SetProperty[T](T& field, T newValue, String propertyName)
   at Files.App.ViewModels.UserControls.NavigationToolbarViewModel.set_SelectedItems(List`1 value)
   at Files.App.Views.Layouts.BaseLayoutPage.set_SelectedItems(List`1 value)
   at Files.App.Views.Layouts.DetailsLayoutPage.FileList_SelectionChanged(Object sender, SelectionChangedEventArgs e)
   at ABI.Microsoft.UI.Xaml.Controls.SelectionChangedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)
2025-04-02 13:22:12.4464|Information|App launched. Launch args type: ProtocolActivatedEventArgs

System info:
Version Windows 11 Professional
Version number 23H2
OS version 22631.5039
Experience Windows Feature Experience Pack 1000.22700.1074.0

@marcofranzen99
Copy link
Contributor

i think the problem only occurs with shortcut items that are part of a git repository. i am working on a solution

@Josh65-2201 Josh65-2201 moved this from 🔖 Ready to build to 🏗 In progress in Files task board Apr 4, 2025
@Liguma
Copy link

Liguma commented Apr 4, 2025

I confirm - only in git

@Josh65-2201 Josh65-2201 changed the title Bug: Opening a shortcut crashes Files Bug: Selecting a shortcut in a git folder crashes Files Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Bug reports involving a crash
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants