ZMYaro / paintz

A simple drawing app that runs in a web browser, designed to be an MS Paint substitute for Chromebooks and other Chrome OS devices. PaintZ is free, but please consider supporting development at https://ko-fi.com/ZMYaro or https://patreon.com/ZMYaro.
https://paintz.app
53 stars 12 forks source link

Selection tools turns existing image transparent #276

Open AlexBella84 opened 1 year ago

AlexBella84 commented 1 year ago

**Project erases after opening a file to edit. Using the select tool to which you can select/erase/cut/copy/duplicate, I can maybe do only one move (such as erasing area I select) but after that any type of choice I make using the select tool, the entire project erases and turns the backround grey. The initital project that I originally opened is now gone and I am unable to do anything more to the file I wanted to edit and continue working on.

  1. With a new page and clear screen, you select "Open" to choose a file to edit, work on.
  2. Once file is opened, I use the select tool to highlight an area to erase, but it wont erase selected area, it erases everything leaving the highlighted area just a white box.

Whats supposed to happen or what its always done for me for the last 2 years Ive been using PaintZ is whatever area I select it'll erase or edit JUST the highlighted area, not the entire page and erasing all other content.

Whats even crazier is that it first happened on my desktop at home, then later on my laptop which are 2 completely different devices. I have uninstalled the App, reinstalled and still had the same issue. Ive used it both online and what was dowhloaded to my device as is. So please help me figure this out anyway that you might have some ideas, I think Ive also cleared my cookies for the site as well. I feel there is somewhere a glitch, or a settings memory that got changed from the default settings maybe. Thank You!!! Screen P Screen 2 Screen 3**

ZMYaro commented 1 year ago

Also reported by David Coover:

ZMYaro commented 1 year ago

@AlexBella84 Thank you for reporting this issue.  I am still trying to figure out what might cause it since I have been unable to recreate it on any of my devices.  Since PaintZ 3.4.1 released at the end of last year, and this issue only started occurring, I want to make sure it isn't being caused by a Chrome update or something on your system.  May I ask whether you had any other apps or browser tabs open on your computer when this happened that could have consumed a lot of system resources?  Or have you had any graphical issues in other apps or webpages?

ZMYaro commented 1 year ago

Notes from my own (purely qualitative so far) testing:

ZMYaro commented 1 year ago

Update: Looking at recent Chrom* bugs, it appears the cause may have to do with the composite operation (crbug.com/1499539 (and maybe crbug.com/1500272)), or to do with using drawImage, getImageData, and/or putImageData between multiple canvases in Chrom* 119 (crbug.com/1500905).

Those tickets also point out using willReadFrequently solves the issue, but as one commenter points out, that doesn't necessarily make sense to do (e.g, in PaintZ, it doesn't make sense to turn off hardware acceleration all the time for the rare case someone may make a lot of rapid selections). However I am going to try it and maybe push it to Paintβ as a temporary fix.

ZMYaro commented 1 year ago

The willReadFrequently fix appears to work as expected, and was confirmed to work by @AlexBella84. It is up on Paintβ until Google fixes the Chrom* bug, and I posted about it across PaintZ socials.

I am going to keep this ticket open for now so people find it if they look for it, and then close it once Google fixes the bug.

ZMYaro commented 11 months ago

Chrome 120 has released on the stable channel, and the issue seems to be fixed there on the one device I have tested so far. Going to hopefully test on other devices within the next week and be able to close this.