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

Crash on "Open Solution" #758

Open
Jedi-Mind-Tricks opened this issue Oct 11, 2020 · 12 comments
Open

Crash on "Open Solution" #758

Jedi-Mind-Tricks opened this issue Oct 11, 2020 · 12 comments

Comments

@Jedi-Mind-Tricks
Copy link

Jedi-Mind-Tricks commented Oct 11, 2020

Environment:

  • Manjaro Linux x86_64, Kernel: 5.8.11-1-MANJARO
  • netcore 3.1
  • Stock AvalonStudio, commit 83364de (HEAD -> develop, origin/develop, origin/HEAD) Merge: 79e9b68 5be2aa3

To reproduce:

  1. Start Avalon Studio
  2. File -> Open Solution

Result:

  • crash
  • stack trace:
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path '/run/media/george/HDD\04064'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.Directory.GetFiles(String path)
   at Avalonia.Dialogs.ManagedFileChooserSources.<>c.<DefaultGetFileSystemRoots>b__17_0(MountedVolumeInfo x)
   at System.Linq.Enumerable.SelectIListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Avalonia.Dialogs.ManagedFileChooserSources.DefaultGetFileSystemRoots()
   at Avalonia.Dialogs.ManagedFileChooserSources.DefaultGetAllItems(ManagedFileChooserSources sources)
   at Avalonia.Dialogs.ManagedFileChooserSources.GetAllItems()
   at Avalonia.Dialogs.ManagedFileChooserViewModel.RefreshQuickLinks(ManagedFileChooserSources quickSources)
   at Avalonia.Dialogs.ManagedFileChooserViewModel..ctor(FileSystemDialog dialog, ManagedFileDialogOptions options)
   at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.Show(SystemDialog d, Window parent, ManagedFileDialogOptions options)
   at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.ShowFileDialogAsync(FileDialog dialog, Window parent)
   at AvalonStudio.Controls.Standard.SolutionExplorer.SolutionExplorerViewModel.OpenSolution() in /home/george/AvalonStudio/AvalonStudio/AvalonStudio.Controls.Standard/SolutionExplorer/SolutionExplorerViewModel.cs:line 181
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass8_0.<Post>b__0()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.X11.X11Window.<ScheduleInput>b__120_0()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken)
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
   at AvalonStudio.Shell.Shell.StartShellApp[TAppBuilder](TAppBuilder builder, String appName, ShellAppMainDelegate main, String[] args, IFactory layoutFactory) in /home/george/AvalonStudio/AvalonStudio.Shell/src/AvalonStudio.Shell/Shell.cs:line 17
   at AvalonStudio.Program.Main(String[] args) in /home/george/AvalonStudio/AvalonStudio/AvalonStudio/Program.cs:line 32
Aborted (core dumped)

Details:
stack trace contain the path '/run/media/george/HDD\04064'
'/run/media/george/HDD 64' is a path to my additional HDD.
But this HDD never had 04064 folder. Edited: see below, the directory name was not HDD but HDD 64 with a space.

@FlaviusHouk
Copy link

I assume that this('\04064') is not a folder, but a part of a name of your HDD. Could you please do ls -l /run/media/george to verify that there is something with naming and better identify problem?

@Jedi-Mind-Tricks
Copy link
Author

Oh, you're right!

The name is HDD 64 with a space.

@FlaviusHouk
Copy link

And does cd '/run/media/george/HDD 64' works as well?

@Jedi-Mind-Tricks
Copy link
Author

Jedi-Mind-Tricks commented Oct 11, 2020

And does cd '/run/media/george/HDD 64' works as well?

Yep, no problems with that.

@Jedi-Mind-Tricks
Copy link
Author

More info: if I unmount this HDD, open dialog works.

@FlaviusHouk
Copy link

As for some path with the space (tried both in $HOME and on external partition) everything works fine. So I think there is something with special characters in paths I suppose.

@Jedi-Mind-Tricks
Copy link
Author

Jedi-Mind-Tricks commented Oct 11, 2020

Okay, I reproduced the bug with another device:

  • HDD 64 disk was UNmounted
  • a USB stick which have label with a space (UBUNTU 18) was mounted

Stack trace:
Could not find a part of the path '/run/media/george/UBUNTU\04018'. ...

Yeah, path with a space works, but not a Disk Label with a space.

@Jedi-Mind-Tricks
Copy link
Author

Jedi-Mind-Tricks commented Oct 11, 2020

My guess: it crashes while creating the list of disk drives (on the left side of the Open Dialog).

@FlaviusHouk
Copy link

I looked through the code for openingn and it looks like that is the bug in Avalonia's managed open file dialog Avalon Studio uses.

@Jedi-Mind-Tricks
Copy link
Author

Jedi-Mind-Tricks commented Oct 11, 2020

Should I open the issue there (AvaloniaUI repo) and close this one then?

@FlaviusHouk
Copy link

You can open an issue there and paste a link for this issue (to preserve all information). And this issue, as for me, should be closed when Avalon Studio will receive update (new version of Avalonia with fixed issue), but not now when functionality is not working well.

@jcbritobr
Copy link

It happens on windows 10 also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants