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

Pasting/typing emojis causes crash #4754

Closed
PathogenDavid opened this issue Sep 27, 2020 · 2 comments
Closed

Pasting/typing emojis causes crash #4754

PathogenDavid opened this issue Sep 27, 2020 · 2 comments

Comments

@PathogenDavid
Copy link
Contributor

PathogenDavid commented Sep 27, 2020

I realize Emoji aren't supported yet, but I'd expect a � rather than a crash.

Environment

Observed in Synfonia (which I is using the latest Avalonia CI builds.)

I was not able to reproduce this with XamlControlsGallery, but I did run into a different issue there, see #4755 Edit: After modifying XamlControlsGallery to use the latest CI build, it crashes too.

Windows 10 2004

Steps to reproduce

  1. Use Win+. to insert an emoji or copy paste this one into the search bar: 😂
  2. There is no step 2

Expected behavior

No crash and the replacement character (�) appears.

Actual behavior

An AccessViolationException occurs within libSkiaSharp.dll:

 	libSkiaSharp.dll!00007ffeb9e54900()	Unknown
 	libSkiaSharp.dll!00007ffeb9ca8b1f()	Unknown
 	libSkiaSharp.dll!00007ffeb9bdc023()	Unknown
 	[Managed to Native Transition]	
 	SkiaSharp.dll!SkiaSharp.SKFont.MeasureText(void* text, int length, SkiaSharp.SKTextEncoding encoding, SkiaSharp.SKRect* bounds, SkiaSharp.SKPaint paint)	Unknown
 	SkiaSharp.dll!SkiaSharp.SKFont.MeasureText(System.ReadOnlySpan<char> text, SkiaSharp.SKPaint paint)	Unknown
 	SkiaSharp.dll!SkiaSharp.SKFont.MeasureText(string text, SkiaSharp.SKPaint paint)	Unknown
 	SkiaSharp.dll!SkiaSharp.SKPaint.MeasureText(string text)	Unknown
 	Avalonia.Skia.dll!Avalonia.Skia.FormattedTextImpl.BuildRects()	Unknown
 	Avalonia.Skia.dll!Avalonia.Skia.FormattedTextImpl.GetRects()	Unknown
 	Avalonia.Skia.dll!Avalonia.Skia.FormattedTextImpl.HitTestTextPosition(int index)	Unknown
 	Avalonia.Visuals.dll!Avalonia.Media.FormattedText.HitTestTextPosition(int index)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.Presenters.TextPresenter.CaretIndexChanged.AnonymousMethod__0()	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.JobRunner.RunJobs(Avalonia.Threading.DispatcherPriority? priority)	Unknown
 	Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.WndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)	Unknown
 	[Native to Managed Transition]	
 	user32.dll!00007fff347be858()	Unknown
 	user32.dll!00007fff347be299()	Unknown
 	[Managed to Native Transition]	
 	Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.RunLoop(System.Threading.CancellationToken cancellationToken)	Unknown
 	Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)	Unknown
 	Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args)	Unknown
 	Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime<Avalonia.AppBuilder>(Avalonia.AppBuilder builder, string[] args, Avalonia.Controls.ShutdownMode shutdownMode)	Unknown
>	Synfonia.Gui.dll!Synfonia.Program.Main(string[] args) Line 13	C#
@Takoooooo
Copy link
Contributor

Fixed in #4893.

@PathogenDavid
Copy link
Contributor Author

Awesome, thanks a lot @Takoooooo and @Gillibald!

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

2 participants