0xPARC / zkrepl

An online playground for zero knowledge circuits
https://zkrepl.dev/
GNU General Public License v3.0
143 stars 23 forks source link

Junk characters in STDOUT output #10

Open artwyman opened 1 year ago

artwyman commented 1 year ago

Using zkrepl to compile code on Chrome on Windows, I see a variable number of invalid characters (appearing as rectangles) show up in the output before the normal output of the compiler. If I scroll down past them, the output is otherwise correct: image1 image2

I'm not a web expert, but I think the Chrome dev tools are telling me that these are null characters:

image3

This happens for any input, including the initial example zkrepl comes up with. I've seen this in Chrome and Edge on Windows10, but I don't see it on Firefox. I've seen the issue on two different machines with the same OS version, but I don't have any other platforms handy. A friend tried this in Chrome on Linux and Mac and didn't see the issue. Noting that Chrome and Edge share the Chromium rendering engine, I suspect this might be a specific behavior of that engine when running on Windows.

saurfang commented 1 year ago

I am able to reproduce this in Chrome on Windows 10 with the example template.

I wonder if it would be an acceptable workaround to simply strip these characters at https://github.com/0xPARC/zkrepl/blob/1e8d06d3587bc75eacfa9caa259cce2a0e387f58/src/worker/worker.ts#L67