Comments (28)
I completely rewrote it using Gio. Give it another shot. Thanks for trying it.
(Sorry for the ridiculously long response time. Once again I'm reminded that even if you own a project, you still have to "follow" it to get notifications about issues, etc. Again, my apologies.)
If you want to try it right in your browser, check the readme for the hotkeys, and visit http://theclapp.github.io/go-life/www/.
from go-life.
Hey, no worries/apologies, you can't imagine how grateful I am for your 2-3-year response time! It's so reassuring that it's not just me! :)
I get a blank white image (not just an empty HTML, if it matters) in my Chrome for the link, BTW.
from go-life.
Yeah, the 4mb was from the raw space on disk, before I looked at the Chrome console.
BTW, this demo of the Magnum Framework runs here fine: https://magnum.graphics/showcase/bullet/
That's a cool demo!
But this thing, again, apparently does nothing: http://enjoytools.net/wasm/
Hmmmm. Curious. It turns out that that one's a from a Go 1.11.1 demo. Check the JS console. After clicking the "run" button I got this:
Console was cleared
Hello, WebAssembly!
In the Network tab for that page, if I click the "test.wasm" line, and the "response" sub-tab, it specifically mentions Go 1.11.1.
... Just saw your update about WebGL1. I guess that could be a problem? I'm not sure. The Gio webpage mentions WebGL but not a specific version.
This page says I can do v1 & v2. So maybe you need v2?
Edit: That'd be weird if this problem was actually hardware / driver.
from go-life.
It looks like something is running, but there is just no graphical output. Perhaps you could verify that by outputting something when receiving pointer events.
It's probably a driver or WebGL 1 problem, although Gio does runs in Safari where WebGL 2 is not supported.
from go-life.
So the wasm code is definitely downloading and running, it's just not displaying anything for some reason. And yet your log shows things like requestAnimationFrame
and setTimeout
and so on, so it sure looks like it thinks it's displaying something.
The displayed text is fairly small. If you're on a 4k monitor, for example, it might be all but invisible. And the cells are in bright green on a white background ... um ... any chance you're color-blind? (I mean, talk about grasping at straws ... :). Or have your display set in such a way that that color scheme just wouldn't show up? ("Night mode"???) (Though I wouldn't expect an HTML canvas to care about that; I can tell you my code certainly has no allowance for that.)
from go-life.
@lunakid Can you try in a different browser / your phone?
I tried again in Safari, and can confirm that Safari doesn't do WebGL v2 (according to https://webglreport.com/ linked above), but this app chugs right along.
@eliasnaur Thanks for taking a look!
from go-life.
@lunakid Can you try in a different browser / your phone?
Now, that's a black-belt move, indeed! :) Firefox works just fine! 👍
(Let me know if you want to continue debugging the Chrome issue.)
from go-life.
Shall we rename the issue, BTW? :) I don't even have the slightest idea now, what the original report was about...
from go-life.
WooHoo!
How odd, though.
I think I'm willing to let this issue rest. :) Though @eliasnaur may want to keep it in mind as a data point; it's his library, I'm just a user. Thank you for the offer, though.
from go-life.
Thanks, I'm aware of that, and would love to change drivers, but need to stick with the "switchable" one, for there are two video adapters in my machine, and having a separate Catalyst driver + a separate Intel driver was said to be a recipe for trouble (at least for this laptop), AFAICR.
(I'm pasting the Firefox GL report to that comment above, thanks for the tip!)
from go-life.
Hey, no worries/apologies, you can't imagine how grateful I am for your 2-3-year response time! It's so reassuring that it's not just me! :)
:)
I get a blank white image in my Chrome for the link, BTW.
:( Bummer. For me it "just works" in macOS Chrome, Safari, and Firefox, and also iOS Chrome & Safari.
Random things to check:
- Are you on latest Chrome?
- Do you somehow have webassembly / wasm disabled? Go to
chrome://flags/
(you'll have to type it into the address bar yourself; Chrome doesn't let random Internet sites link you to it, as a security measure) and search for "webassembly" and see if anything's disabled. On my end,Chrome Version 76.0.3809.87 (Official Build) (64-bit)
, everything is "default". - It is a ~4mb webassembly download -- did you give it enough time to download? (Admittedly grasping at straws, there. :)
- Do you see anything in the JS console? (On a Mac, View->Developer->Javascript Console.)
- Or take a look at the network panel (you probably need to reload after opening the console to see anything in the network panel) -- has everything downloaded, are there any errors, etc?
- Are you behind a firewall or have other plugins installed that might block webassemby downloads or execution?
Thanks for trying it! The app, Gio itself (the GUI toolkit I'm using), and even webassembly in Go are all still pretty experimental, so pretty much anything at any point in the chain might've gone wrong. (I mean, it was probably my code, but you never know.)
from go-life.
I get a blank white image in my Chrome for the link, BTW.
:( Bummer. For me it "just works" in macOS Chrome, Safari, and Firefox, and also iOS Chrome & Safari.
- Are you on latest Chrome?
Google Chrome is up to date
Version 76.0.3809.100 (Official Build) (64-bit)
- Do you somehow have webassembly / wasm disabled? Go to
chrome://flags/
(you'll have to type it into the address bar yourself; Chrome doesn't let random Internet sites link you to it, as a security measure) and search for "webassembly" and see if anything's disabled. On my end,Chrome Version 76.0.3809.87 (Official Build) (64-bit)
, everything is "default".
Same here. (I even played with WASM a week ago or so. BTW, did you notice that there's no trivial place to go for an instant browser checkup? Googling for e.g. "webassembly browser test" yields only implementation tidbits, not a single page I could open and freak out if I have it disabled etc. Most shamefully of all, webassembly.org itself doesn't seem to offer one, either... Or am I just grossly missing something obvious here? Like, accidentally woke up into this subtly different, neighboring alternative universe somehow?... ;-o )
- It is a ~4mb webassembly download -- did you give it enough time to download? (Admittedly grasping at straws, there. :)
Hey, I immediately thought this one was quite a good straw, actually: my net is total crap, and I'm impatient AF... :) But, alas, nope: this doesn't seem to be the culprit.
- Do you see anything in the JS console? (On a Mac, View->Developer->Javascript Console.)
Oh yes, indeed! :-o Your favicon is missing... OK, but seriously, nothing. Clean as a baby's ass in a TV commercial.
- Or take a look at the network panel (you probably need to reload after opening the console to see anything in the network panel) -- has everything downloaded, are there any errors, etc?
I've got the index, and wasm_exe.js
, and I suppose this should just work there in the page:
if (!WebAssembly.instantiateStreaming) { // polyfill
WebAssembly.instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
}
const go = new Go();
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
- Are you behind a firewall or have other plugins installed that might block webassemby downloads or execution?
Nope.
Thanks for trying it! The app, Gio itself (the GUI toolkit I'm using), and even webassembly in Go are all still pretty experimental, so pretty much anything at any point in the chain might've gone wrong. (I mean, it was probably my code, but you never know.)
If you add some alerts or some console logs to the error cases, I'll gladly hit a Refresh on the URL. :)
(BTW, another dev. here, so no need to go that deep with the meticulously detailed instructions, which were amazingly thorough, BTW, nice job! :) )
from go-life.
BTW, did you notice that there's no trivial place to go for an instant browser checkup?
Yes! It was annoying.
I've got the index, and wasm_exe.js, and I suppose this should just work there in the page:
Hmm. But do you actually see main.wasm in the network tab?
If you add some alerts or some console logs to the error cases, I'll gladly hit a Retry on the URL. :)
All my code runs in the wasm bits. I tend to think if you got any of it, you'd get all of it. I suppose I could add some kind of else
to that then((result) ...
bit. If you know how to do that, give it a shot; otherwise I'll take a look later.
(BTW, another dev. here, so no need to go that deep with the meticulously detailed instructions, which were amazingly thorough, BTW, nice job! :) )
Well, in your initial ticket (... going on three years ago) you said otherwise, so I went with that on the theory it was safest. Glad you liked 'em, even if they weren't necessary.
from go-life.
Hmm. But do you actually see main.wasm in the network tab?
Yes:
from go-life.
BTW, this demo of the Magnum Framework runs here fine: https://magnum.graphics/showcase/bullet/
But this thing, again, apparently does nothing: http://enjoytools.net/wasm/
[UPDATE: it does emit the "Hello, WebAssembly!" message, after all, I just missed it initially!]
Wait, just a thought: I only have WebGL1 here!
(Also, I had accelerated 2D enabled, which I have never confirmed actually working, but relaunching Chrome after disabling it made no difference.)
from go-life.
Hey, @eliasnaur can you weigh in at all here?
from go-life.
Yeah, the 4mb was from the raw space on disk, before I looked at the Chrome console.
(Ah, yes, realized it a minute later, and removed that part of my comment.)
BTW, this demo of the Magnum Framework runs here fine: https://magnum.graphics/showcase/bullet/
That's a cool demo!
It sure is! Did you see the original Unreal Tournament intro, circulating somewhere online? It works better than it did on my PC at the time! :) Amazing, how far this has gone.
But this thing, again, apparently does nothing: http://enjoytools.net/wasm/
Hmmmm. Curious. It turns out that that one's a from a Go 1.11.1 demo. Check the JS console. After clicking the "run" button I got this:
Console was cleared
Hello, WebAssembly!
Ah, thanks... So, your didactic instructions are still not all wasted then! 👍 :)
(I didn't immediately see it in the JS console, or I must have automatically switched to the error view, before noticing the message, dunno. And I think I've never explicitly opened the "User messages" category before, so didn't go and check it now either.)
But then, with that knowledge I looked harder for the go-life wasm, and seen these, FWIW:
from go-life.
If you can, please create an issue on https://todo.sr.ht/~eliasnaur/gio (or by sending an email to ~eliasnaur/[email protected]) with as much information about your system: Chrome version, Operating system and version, Video card etc.
Perhaps a dump of information from a site like https://webglreport.com/.
Thank you.
from go-life.
Sure. I'll just add the missing bits here (e.g. for the convenience of immediately uploading screenshots etc.), and link this issue over there.
Chrome (as said above): Version 76.0.3809.100 (Official Build) (64-bit)
(See logs, WebGL1 examples tested fine etc. above. Accelerated 2D canvas turned on/off didn't matter.)
Windows 7 Pro/64, with
ATI Mobility Radeon HD 3400, with the "switchable" driver:
WebGL report of the failing Chrome:
WebGL report of the working Firefox (notice the D11 here, vs D9 for Chrome, which is quite puzzling to me, especially that it is Firefox here, which e.g. can't even play YouTube videos at all, after an earlier upgrade... But maybe this difference is due to the fact that I've disabled "Accelerated 2D canvas" for Chrome for messing with this issue. I'm going to reenable it to see if it's related....... Nope, it isn't. Strange. Tried looking up if Chrome blacklists this ATI driver perhaps, but found nothing."):
from go-life.
The same output for your Firefox might also be useful.
Here's my Chrome:
from go-life.
If you run into other WebGL issues (other than this one little demo :), this thread may be of some use:
Long story short:
For:
- ATI Radeon HD 4xxx and ATI Radeon Mobility equivalent series of products (and many others)
- Windows 7 64-bit Edition (and many others)
Install this driver: http://downloads.guru3d.com/ATI-Catalyst-10.7-Beta-Win-7-%7C-Vista--XP-(32%7C64-bit)-download-2594.html (or even something newer, but that's what the Minecraft Forum thread mentions success with)
(USE AT YOUR OWN RISK. I haven't tried it.)
from go-life.
From your Chrome report it seems that the EXT_sRGB extension is missing, which would explain the blank screen.
@theclapp I pushed a change that checks that the required extensions are available. Can you please update your dependencies with
go get gioui.org/ui@2a0b0077da6f
and upload a new version? If my theory is right, @lunakid should then see an error in the console instead of a blank window. The program still won't run, but at least we'll have an explanation.
from go-life.
Btw, I'm quite impressed that Firefox manages to make it work on a 10 years old driver and gfx card :D
from go-life.
I pushed a change that checks that the required extensions are available. Can you please update your dependencies with
go get gioui.org/ui@2a0b0077da6f
and upload a new version?
Neat. Done. (Well, I realize now I updated the wasm but not the go.mod, but for now that's good enough.) Hope it works! Thanks!
from go-life.
@lunakid can you confirm that the updated version prints out an error about EXT_sRGB not supported on your chrome?
from go-life.
@lunakid can you confirm that the updated version prints out an error about EXT_sRGB not supported on your chrome?
Sorry, I should've mentioned: It probably doesn't. It's not working on my Windows vm either.
from go-life.
This is webglreport.com for my Windows VM in Chrome:
I get nothing in the JS console, trying to run go-life in Chrome (again, in my Windows 10 vm -- where, as I'm sure you recall at the moment, but for others and/or posterity: go-life native doesn't run either; see here). Firefox works.
from go-life.
@lunakid can you confirm that the updated version prints out an error about EXT_sRGB not supported on your chrome?
Sorry about the delay, no, as Larry suggested. I can see no change in Chrome.
from go-life.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-life.