jmoenig / Snap

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

Result pic... produced a 6 byte PNG file #2803

Open ToonTalk opened 3 years ago

ToonTalk commented 3 years ago

https://snap.berkeley.edu/snap/snap.html#present:Username=toontalk&ProjectName=random%20rationalCan

Probably because the result is a rational number with thousands of digits

jmoenig commented 3 years ago

I cannot access that project, is it shared? Did you use the infamous bignum library?

ToonTalk commented 3 years ago

Somehow I accidently added Can to the URL. Here's the correct one

https://snap.berkeley.edu/snap/snap.html#present:Username=toontalk&ProjectName=random%20rational

Yes it uses the bignum library.

cycomachead commented 3 years ago

I just tried this. It works for me in a recent version of Safari, I think because there's a native bignum type support?

bromagosa commented 3 years ago

FWIW, this works for me in Firefox too.

ToonTalk commented 3 years ago

In FireFox (87.0 and 88.0.1 (64-bit)) I get many instances of this error

Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10", lineNumber: 3621, columnNumber: 0, data: null, stack: "Morph.prototype.fullImage@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3621:9\nSyntaxElementMorph.prototype.exportPictureWithResult@https://snap.berkeley.edu/snap/src/blocks.js?version=2021-02-27:2229:23\nSyntaxElementMorph.prototype.showBubble@https://snap.berkeley.edu/snap/src/blocks.js?version=2021-02-27:2214:14\nThreadManager.prototype.removeTerminatedProcesses/<@https://snap.berkeley.edu/snap/src/threads.js?version=2021-04-17:394:39\nThreadManager.prototype.removeTerminatedProcesses@https://snap.berkeley.edu/snap/src/threads.js?version=2021-04-17:354:20\nThreadManager.prototype.step@https://snap.berkeley.edu/snap/src/threads.js?version=2021-04-17:347:10\nStageMorph.prototype.step@https://snap.berkeley.edu/snap/src/objects.js?version=2021-04-23:8195:22\nMorph.prototype.stepFrame@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3193:14\nMorph.prototype.stepFrame/<@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3194:46\nMorph.prototype.stepFrame@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3194:23\nMorph.prototype.stepFrame/<@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3194:46\nMorph.prototype.stepFrame@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:3194:23\nWorldMorph.prototype.doOneCycle@https://snap.berkeley.edu/snap/src/morphic.js?version=2021-02-10:11950:10\nloop@https://snap.berkeley.edu/snap/snap.html#present:Username=toontalk&ProjectName=random%20rational:39:23\n" }

And it shows the glow and the stop button does nothing.

Chrome continues to make a 6 byte file

I'm using Windows 10