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 when zooming in max (3,600%) #1020

Open
lunatic-gh opened this issue Oct 3, 2024 · 1 comment
Open

Crash when zooming in max (3,600%) #1020

lunatic-gh opened this issue Oct 3, 2024 · 1 comment
Labels

Comments

@lunatic-gh
Copy link

lunatic-gh commented Oct 3, 2024

Description
The Program crashes when the canvas is zoomed in the maximum level (3,600%)

To Reproduce

  • Open the Program
  • Zoom in to max via Mouse-Wheel, or click on 3,600% at the bottom-right context menu

Additional Info
When ran via commandline, the following error occurs with the crash:

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at Cairo.ImageSurface.GetData()
   at Pinta.Core.CairoExtensions.GetPixelData(ImageSurface surface) in /home/luna/Pinta/Pinta.Core/Extensions/CairoExtensions.cs:line 1733
   at Pinta.Gui.Widgets.CanvasRenderer.RenderPixelGrid(ImageSurface dst, PointI offset) in /home/luna/Pinta/Pinta.Gui.Widgets/Widgets/Canvas/CanvasRenderer.cs:line 121
   at Pinta.Gui.Widgets.CanvasRenderer.Render(IReadOnlyList`1 layers, ImageSurface dst, PointI offset) in /home/luna/Pinta/Pinta.Gui.Widgets/Widgets/Canvas/CanvasRenderer.cs:line 106
   at Pinta.Gui.Widgets.PintaCanvas.Draw(Context context, Int32 width, Int32 height) in /home/luna/Pinta/Pinta.Gui.Widgets/Widgets/Canvas/PintaCanvas.cs:line 192
   at Pinta.Gui.Widgets.PintaCanvas.<>c__DisplayClass6_0.<.ctor>b__5(DrawingArea area, Context context, Int32 width, Int32 height) in /home/luna/Pinta/Pinta.Gui.Widgets/Widgets/Canvas/PintaCanvas.cs:line 145
   at Gtk.Internal.DrawingAreaDrawFuncNotifiedHandler.<.ctor>b__4_0(IntPtr drawingArea, IntPtr cr, Int32 width, Int32 height, IntPtr userData)

Version

  • Arch Linux, Hyprland
  • Pinta v2.2, Compiled from source a few minutes ago
@lunatic-gh lunatic-gh added the bug label Oct 3, 2024
@cameronwhite
Copy link
Member

I think this is an issue with the GTK4 port - the GTK DrawingArea widget seems to now request drawing the entire zoomed-in image, not just the visible area inside the scroll window, so at 3600% zoom that's a very large image depending on your original image size ...

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

No branches or pull requests

3 participants
@cameronwhite @lunatic-gh and others