jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.49k stars 743 forks source link

disappearing Snap! - white-outs in Chrome #2545

Open maryfries opened 4 years ago

maryfries commented 4 years ago

This is the second time today that snap has mostly disappeared on me.

image

Chrome Version 79.0.3945.79

If I click around a little things happen:

image

maryfries commented 4 years ago

My project did save, but my very simple costume (a dot drawn in Snap!) was missing (even though that was not a recent addition).

Actually, it's in there, it's just empty; the drawing is gone.

jmoenig commented 4 years ago

I'm despairing over Google. This problem has gotten worse with Chrome v79, and it looks like it'll only get slightly better with the next version, but not really substantially so. If you can find a way to report this to the Chromium team that would be really great. Last time we could talk them into fixing bugs such as this one, but they keep producing them again and again. These are bugs in Chrome, not in Snap. Many web apps are experiencing them. I hate browsers.

maryfries commented 4 years ago

I’m happy to report it to chrome, but I imagine they’ll be likely to blame the site. Anything in particular I should mention so that someone actually does something helpful?

maryfries commented 4 years ago

image

maryfries commented 4 years ago

Jens, in case anyone from Google ever looks at this thread, you might describe what you know about the bug here. I've seen Chrome fix things that I've reported in the past...

jmoenig commented 4 years ago

thanks, Mary. I've never seen Chrome devs react to such messages, only to bug reports in their repositories. But let's hope!

Actually, this is the single biggest problem we're currently having. I've got one or two tricks up my sleeve I'm going to try next week to reduce Snap's memory footprint slightly, but basically there's nothing we can do on our side. Snap exclusively uses standard and stable web features, nothing even remotely experimental. Chrome has been getting terribly slow and unstable last summer, v76 and v77 were an absolute nightmare. Things got slightly better with v78, but now with v79 they've again gotten worse, and Chrome gets slower and behaves erratically. The worst thing is those white-outs. These have been a longstanding issue in Chrome for many years and probably are just symptoms of underlying bugs.

Basically I'm at a point where I'm no longer sure whether Google is supporting Chrome at all. Chrome's development since May 2019 reminds me very much of the time when Microsoft was developing IE, the same kinds of "improvements" that made things worse and worse. I'm even suspecting that maybe because Microsoft is now contributing to the Chromium project for their new Edge browser they're backporting old IE bugs to Chrome. Totally. Not. Kidding.

I'm going to look and ask around to meet the Chrome architect(s) in person. Maybe they're here in Munich, I've heard someone mention that. If so I need to drive out there and talk to them, because there obviously is a deep change in Chrome's architecture that I'm only partially understanding and mostly speculating about, since I can't find any explicit and clear description of it.

But, and that's the bigger issue, perhaps the age of using web browsers as a platform for apps is over.

maryfries commented 4 years ago

For what it's worth, the bug seems to happen when I try to open a different project...

jmoenig commented 4 years ago

this seems to be low memory situation. I've also seen it happen much more frequently when I connect my MBP to a projector or to another monitor. It's slightly less often in Canary. These symptoms used to happen before, but only on low-resource computers.

maryfries commented 4 years ago

Interesting. I'll check my memory next time. (It hasn't seemed low, so I haven't looked.) I am on an external display.

I have looked at the Chrome developer console, and it's been content even when Snap falls apart.

maryfries commented 4 years ago

image

DarDoro commented 4 years ago

You may try to disable GPU chrome://flags/ Accelerated 2D canvas = DISABLED GPU rasterization = DISABLED

DyslexicAwe commented 4 years ago

Also (as I proposed at the forum here ), you can try using portable version of the browser because that way you can keep using the version 78, that worked ok. I always use the portable version of Chrome (for Windows).

I did notice that you don't use Windows and I couldn't find a portable version of Chrome for OS X, BUT you can still try using Chromium version 78, instead. You can download the 78 version for OS X here. portable chromium 78 for Mac OS X

maryfries commented 4 years ago

Now Chrome has completely stopped loading Snap projects and XML files for me, and Safari will not either. (Brian thinks this is a Chromium issue.)

I'm using Firefox for now...

Good luck, Jens!

(BTW, I noticed that my machine with a newer version of Chrome was working, so I restarted Chrome on my primary machine, and Snap is working now. Restarting Safari did not help. So now Chrome is working, but Safari isn't.)

DarDoro commented 4 years ago

Chrome has its own bag of problems on Mac e.g. problem with GPU. https://bugs.chromium.org/p/chromium/issues/detail?id=985486 So disabling hardware acceleration for Chrome can sometimes help.

BTW: your system is quite busy (extreme Dropbox thread count, multiple chrome helper). Remote desktop software such as TeamViewer, usually uses kind of video drivers hooks, which can lead to additional problems. Your problems arises localy not in remote session?

aspiece commented 4 years ago

@jmoenig watching this due closely to see if it gets resolved. We are really hoping to get this resolved.

jmoenig commented 4 years ago

@aspiece yes! A solution is underway, and I'm very excited about it. Right now most of the action doesn't happen in this repo, but over at the Morphic one: https://github.com/jmoenig/morphic.js/commits/master Beginning next week I'll start on working these changes into the Snap! code, and most of that might happen offline or in a branch, so you might not see much of that going on either. Big picture: The next major Snap! release will be independent of what's causing Chrome to crash, much faster to load projects and be able to accommodate significantly larger projects that will still feel "lightweight". But it's going to take us some more weeks if not a few months to get it all together.

aspiece commented 4 years ago

Excellent. Thank you @jmoenig I will pass it on to our team. Thank you for the paint to the Morphic one.

brollb commented 4 years ago

@jmoenig - Have there been any new updates on this?

jmoenig commented 4 years ago

Hi @brollb , yes! The new Snap!v6 with the new Morphic2 architecture is currently in public beta:

https://snap.berkeley.edu/snapsource/dev/snap.html

scheduled for full release early next month. Please give it a try!

This new version shouldn't crash anymore in Chrome, it should load even giant projects reasonably fast, and it also works great in other browsers such as Safari and also on mobile devices, especially iPads.

I'm currently finishing up some little things and we're also in the process of completing documentation. The one piece of documentation that's still missing is the migration guide for Snap! forks such a s NetsBlox, but I'm already working on that.

brollb commented 4 years ago

Great! I will give it a try :)

Looking forward to the migration guide!

maryfries commented 4 years ago

I got a whiteout in dev today (Chrome 83.0.4103.97):

image

Note that that XML file is not actually there. Things seem to work fine when I try a file that is where I'm requesting it from.

An alert message of some kind would be preferable to a whiteout. :)

jmoenig commented 4 years ago

This doesn't look like a white-out in the sense of running low on memory, but like a hard JS or https error, maybe because the file isn't found where you specified it to be. I bet if you open a JS console you'll see some kind of JS error in that regard.

bromagosa commented 4 years ago

Looks like there's an extra colon after localhost in the URL that shouldn't be there.

EDIT: or there's a port number missing after the colon.

jmoenig commented 4 years ago

Ah, thank you, Bernat, that certainly explains it. It would be nice if we could somehow catch such errors and show them inside Snap!, but I haven't found out how or if that's at all possible.

maryfries commented 4 years ago

Interesting. We've run into that issue and fixed it before, but I don't remember how...

maryfries commented 4 years ago

I'm still getting this issue image

In particular, when the page doesn't load correctly on slow wifi...

bromagosa commented 4 years ago

Hmm. That URL totally works for me:

https://snap.berkeley.edu/snap/snap.html#open:https://bjc.edc.org/bjc-r/prog/5-algorithms/U5L3-Data-Processing.xml

In any case, on slow wifi the file is going to take a while to be loaded, and while it's loading you'll see an empty page. Snap!'s empty page has that weird text box in it and nothing else, so that's what you're seeing.

Still, this is totally unrelated with the Chrome white-outs we were having before Snap!6 :)

jmoenig commented 4 years ago

indeed. Totally works.

jguille2 commented 4 years ago

Yes, it also works for me.

I only want to note that this weird box is related to our synchronous getURL call (deprecated due to its negative impact).

Joan

jmoenig commented 4 years ago

That's right, Joan. I'm changing it to asynch.