-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
(linux) Managed Open Dialog window crashes if a Disk Drive Label have a space in it #4844
Comments
Can you check "System.IO.Directory.GetFiles" method with your folder in the console app? |
Ok, so in a test console app:
|
Hi, I had the same problem,When you open the file dialog,Control exception crashes. here is prompt |
It won't crash now, but I don't think it's possible to select any files from disks with spaces in the label. |
I think I've got similiar exception in ILSpy. ExceptionSorry, we crashed
System.ArgumentException: The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'. (Parameter 'bytes')
at System.Text.Encoding.ThrowBytesOverflow()
at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded)
at System.Text.Encoding.GetBytesWithFallback(ReadOnlySpan`1 chars, Int32 originalCharsLength, Span`1 bytes, Int32 originalBytesLength, EncoderNLS encoder)
at System.Text.Encoding.GetBytesWithFallback(Char* pOriginalChars, Int32 originalCharCount, Byte* pOriginalBytes, Int32 originalByteCount, Int32 charsConsumedSoFar, Int32 bytesWrittenSoFar)
at System.Text.UTF8Encoding.GetBytes(String s, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex)
at Avalonia.FreeDesktop.NativeMethods.ReadLink(String path) in /_/src/Avalonia.FreeDesktop/NativeMethods.cs:line 25
at Avalonia.FreeDesktop.LinuxMountedVolumeInfoListener.GetSymlinkTarget(String x) in /_/src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoListener.cs:line 37
at Avalonia.FreeDesktop.LinuxMountedVolumeInfoListener.b__8_7(FileInfo x) in /_/src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoListener.cs:line 57
at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
at System.Linq.Lookup`2.CreateForJoin(IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.GroupJoinIterator[TOuter,TInner,TKey,TResult](IEnumerable`1 outer, IEnumerable`1 inner, Func`2 outerKeySelector, Func`2 innerKeySelector, Func`3 resultSelector, IEqualityComparer`1 comparer)+MoveNext()
at System.Linq.Enumerable.SelectManyIterator[TSource,TCollection,TResult](IEnumerable`1 source, Func`2 collectionSelector, Func`3 resultSelector)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at Avalonia.FreeDesktop.LinuxMountedVolumeInfoListener.Poll(Int64 _) in /_/src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoListener.cs:line 41
at Avalonia.FreeDesktop.LinuxMountedVolumeInfoListener..ctor(ObservableCollection`1& target) in /_/src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoListener.cs:line 34
at Avalonia.FreeDesktop.LinuxMountedVolumeInfoProvider.Listen(ObservableCollection`1 mountedDrives) in /_/src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoProvider.cs:line 13
at Avalonia.Dialogs.ManagedFileChooserViewModel..ctor(FileSystemDialog dialog, ManagedFileDialogOptions options) in /_/src/Avalonia.Dialogs/ManagedFileChooserViewModel.cs:line 116
at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.Show(SystemDialog d, Window parent, ManagedFileDialogOptions options) in /_/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs:line 14
at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.ShowFileDialogAsync(FileDialog dialog, Window parent) in /_/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs:line 42
at ICSharpCode.ILSpy.OpenFromNuGetCommand.Execute(Object parameter) in /home/runner/work/AvaloniaILSpy/AvaloniaILSpy/ILSpy.Core/Commands/OpenFromNuGetCommand.cs:line 42
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 169
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
at ICSharpCode.ILSpy.Program.Main(String[] args) in /home/runner/work/AvaloniaILSpy/AvaloniaILSpy/ILSpy/Program.cs:line 22
|
@SupinePandora43 if you have any idea how to fix that, your PR would be welcome :-) |
It was a different issue, already fixed by #8134 |
acc. to feedback, I'm closing this for now. If issue presists in 11.0.4 or greater, ping me and I'll re-open it or open a new issue report. |
Initial source: VitalElement/AvalonStudio#758
To reproduce:
HDD 64
)Result:
Expected Result:
Environment:
Additional info:
The text was updated successfully, but these errors were encountered: