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

Staying off tab for too long (temporarily) clears everything. #126

Closed
SplatSys opened this issue May 16, 2024 · 9 comments
Closed

Staying off tab for too long (temporarily) clears everything. #126

SplatSys opened this issue May 16, 2024 · 9 comments
Labels
bug Something isn't working chromium Issue with Chromium (Chrome) browser not reproduced

Comments

@SplatSys
Copy link

It seems that if the tab is left offscreen for more than like, 10ish seconds, everything vanishes. Upon attempting to do any of the following— Undo, Redo, Zoom, Share, or Draw (at all)— Everything comes back as if it was never gone. This doesn't seem to be causing a loss of any data, but it's strange that it's happening. Also, unsure of if this is intentional, but the site says it hasn't been updated since January 1st of this year.

@SplatSys
Copy link
Author

Adding some info I forgot to give; This only started happening to me TODAY, after restarting my Chromebook due to an error that was happening with a separate program. I'm unsure if this is related. I've tried reloading the tab, restarting my Chromebook again, and opening a new Kleki tab, but none of those seem to work.

It looks like dragging my mouse across the screen also brings back the missing graphics.

When this bug occurs, the entire drawing/canvas area turns transparent, INCLUDING the surrounding area that isn't part of the canvas.

image
image

The above images are of the glitch occurring (image 1) and what happens when I zoomed out slightly. (image 2).

@bitbof
Copy link
Owner

bitbof commented May 17, 2024

Thanks for reporting. Yes the site hasn't been updates since then, because I'm focusing on a big update.

This honestly sounds like a Chrome / Chrome OS / graphics driver bug, which usually isn't reproducible unless I have the same hardware, and then all I can do is report it to Google. Might be fixed on its own when Chrome OS releases another update.

I'll try to reproduce when I have access to my chromebook.

@SplatSys
Copy link
Author

Update: It's begun to happen whenever the tab is switched. If it helps to know, I'm on an HP Chromebook x360.

@Gamingmouse64
Copy link

I also have had this happen (and I am also on an HP Chromebook), however it only happened once. It never happened again, and even when it did, it took multiple minutes to happen.

Once I had returned to the tab, there was the transparent background, as you had mentioned, but it then just disappeared after half a second and returned back to normal Kleki operation. I think the severity of the glitch is dependent on the Chromebook device itself.

@SplatSys
Copy link
Author

This is now also occuring on my school Chromebook, which is a Lenovo 300e Chromebook (2nd Gen). It's doing the exact same thing my x360 is doing.

@bitbof
Copy link
Owner

bitbof commented Jun 23, 2024

Tried it on a Lenovo Chromebook IdeaPad Slim 3 which is pretty weak. Painted for more than half an hour and switched tabs multiple time. I used different brushes and edit functions. I could not reproduce so far. It did not clear.

image

If you can figure out really reliable steps to trigger the problem that would help immensely. Just painting and switching tabs doesn't reliably cause it on a chromebook.

@bitbof bitbof added bug Something isn't working chromium Issue with Chromium (Chrome) browser not reproduced labels Jun 23, 2024
@denilsonsa
Copy link

Many browsers (such as Chrome) now have a Memory Saver feature where they automatically unload "inactive" tabs, or tabs in the background. Could this be the issue?

Maybe @SplatSys could try disabling that feature and observing if the reported behavior goes away.

Maybe @bitbof could figure out some API to ask Chrome not to unload the tab. Or alternatively to save the canvas somewhere (local storage) so that it would be restored after the tab reloads.

@bitbof
Copy link
Owner

bitbof commented Jul 24, 2024

@denilsonsa Memory saving does a full page reload on discard, it doesn't corrupt webpages as described in this thread. There isn't an API to prevent discard. If a tab was discarded Kleki shows instructions how to disable memory saver for Kleki:

image

The described behavior is that parts of the page start glitching, most likely due issues with Chrome itself or driver issues. I've reported such issues before. I can't report this because I can't reproduce it myself.

Long term strategy is to store less data in Canvas contexts (which seem to corrupt easily in recent years) and explore autosave via IndexedDB.

@SplatSys
Copy link
Author

SplatSys commented Jul 27, 2024

Hi, hello. Apologies for not checking on this thread for a while; Summer break happened and I kind of forgot.

In response to @denilsonsa; No, this was not caused by Chrome's Memory Saver. I manually disabled Automatic Discard and Memory Saver for Kleki on both affected devices.

As for the issue itself, @bitbof, it seems to have gone away on its own— at least on the x360. I have not checked on the 300e yet, as I have not had a reason to get on it since my Summer break began. When school starts back up, I'll check that device as well.

If issues are able to be reopened (I am unfamiliar with GitHub, sorry!!), this can likely be closed for the time being.

@bitbof bitbof closed this as completed Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chromium Issue with Chromium (Chrome) browser not reproduced
Projects
None yet
Development

No branches or pull requests

4 participants