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

Program crashes when scrolling large canvas #162

Open
raggesilver opened this issue Jan 17, 2020 · 4 comments
Open

Program crashes when scrolling large canvas #162

raggesilver opened this issue Jan 17, 2020 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@raggesilver
Copy link
Contributor

Description

Creating a large canvas makes everything laggy. I can see from the activity monitor that drawing uses 12% of my 4/8 core processor (100% of one core) which probably means everything is being done in a single thread.

I'd like to point out that the 1800x3600 empty canvas lags a lot on scroll.

After scrolling for a while (with no visual feedback) the app crashes and this is the output:

➜  ~ flatpak run com.github.maoschanz.drawing 
Gdk-Message: 14:19:48.175: Lost connection to Wayland compositor.

Knowing GTK and GTK development I can safely say that this is caused due to heavy computations in the same thread as your GTK app is running.

Steps to reproduce the bug:

  1. Create a 1800x3600 canvas
  2. Scroll around

System

  • Laptop, R7 3700U @4GHz 8Gb RAM
  • OS: Fedora 31, kernel 5.4.10-200
  • Desktop environment: GNOME 3.34.3
  • Package format (flatpak, native package, snap?): Flatpak 1.4.3
  • App version: 0.4.10
@raggesilver raggesilver added the bug Something isn't working label Jan 17, 2020
@raggesilver
Copy link
Contributor Author

Wow, I believe your next release will close this issue. Just downloaded master, built it and it runs smoothly!

@maoschanz
Copy link
Owner

image

@maoschanz
Copy link
Owner

maoschanz commented Jan 18, 2020

More seriously, the next version has several major differences concerning tools and bottom panels... but displaying images on the canvas? No, that part didn't change that much, and everything is still on the same single thread.

So i don't believe the bug is fixed. Maybe you need bigger images to trigger it, but it's still there. You can also saturate the memory with the history, and undoing something is still a spectacular failure not anymore!

@maoschanz maoschanz added this to the 0.8 milestone Oct 24, 2020
@maoschanz maoschanz modified the milestones: 0.8, 1.0.0 Jun 24, 2021
maoschanz added a commit that referenced this issue Jun 24, 2021
*depending on the size of the canvas

issue #162, though it doesn't handle the scrolling part yet, only the use of tools
@maoschanz
Copy link
Owner

maoschanz commented Jun 24, 2021

  • Methods to count frames per second
    • show it in the infobar
    • dev-only action to enable/disable it (disabled by default)
  • Don't render all frames (method DrImage.on_motion_on_area)
    • pass down the info to each tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants