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] <title>skglControl1_SizeChanged Event new SKBitmap will cause visual studio Crash #3129

Open
1 task done
dzhydaniel opened this issue Dec 27, 2024 · 0 comments
Open
1 task done
Labels

Comments

@dzhydaniel
Copy link

Description

SkiaSharp version 3.116.1
Visual Studio 2022 Community Winform C# .net 4.7.2
When Open Form Designer Visual Studio Freeze and crash

Code

    private void skglControl1_SizeChanged(object sender, EventArgs e)
    {
        if (this.DesignMode)
        {
            return;
        }
            Disposable.SafeDispose(ref _BackBuffer);
            if (ParentForm?.WindowState != FormWindowState.Minimized)
            {
                if (ClientSize.Width > 0 && ClientSize.Height > 0)
                {
                    try
                    {
              

      _****//_BackBuffer = new SKBitmap(ClientSize.Width, ClientSize.Height);****_

                    }
                    catch (Exception ex){
                        // 记录异常信息
                        Console.WriteLine($"SKBitmap 初始化失败: {ex.Message}");
                    }
                    //CurrentState?.OnDeviceReset();
                    //skglControl1.Invalidate();
                }
            }
        

    }

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

2.88.9 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 11 home

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

1 participant