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

[bug]: Test scrip stuck on loading binary program Add.hack on Hardware Simulator #502

Open
1 of 2 tasks
busoff opened this issue Nov 21, 2024 · 3 comments
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@busoff
Copy link

busoff commented Nov 21, 2024

Tool

Hardware Simulator

Interface

Website (https://nand2tetris.github.io/web-ide)

Contact Details

[email protected]

What happened?

When I try to run Built-in Computer chip (Chapter 5) on hardware simulator , the test script stuck on "Loads the binary program Add.hack into the computer's instruction memory" and can't continue.

I tried Chrome Version 131.0.6778.70 and Edge Version 131.0.2903.51 and the both failed. What did I miss?
image

Additional Comments

No response

Do you want to try to fix this bug?

  • I want to try to add this feature!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@busoff busoff added the bug Something isn't working label Nov 21, 2024
@filakhtov
Copy link

filakhtov commented Nov 21, 2024

I just literally ran into this exact issue. Looking into dev console in Chrome reveals:
image

Stepping through the code with the debugger, I can further see that:

Error: File Not Found /samples/Add.hack at https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:245943 at new Promise (<anonymous>) at h.readFile (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:245888) at p.readFile (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:244961) at https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:399522 at i (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:399535) at u.load (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:356246) at w.load (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:381232) at o.loadROM (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:414576) at m.do (https://nand2tetris.github.io/web-ide/static/js/main.15cf674c.js:2:418105)

@filakhtov
Copy link

filakhtov commented Nov 21, 2024

Okay, debugging even further, I noticed that my local storage did not have the .hack files. I made a backup of my HDL's, cleared the storage and refreshed the page – files are now there and the emulator works as expected.

Scratch that, it doesn't actually work.

@filakhtov
Copy link

filakhtov commented Nov 21, 2024

Okay, made it work by using a local override for:

test.fs.pushd("/samples");

and changing the directory to test.fs.pushd("05");, hopefully this would help to track the issue down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants