'loading...'

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

'loading...'

code2win
Any ideas what it means when you get no error message, but nothing happens? I loaded the folder with multiple vm files and this is the result. It just says loading.
Reply | Threaded
Open this post in threaded view
|

Re: 'loading...'

ivant
Try starting emulator from the command line. There may be some exception printed there.
Reply | Threaded
Open this post in threaded view
|

Re: 'loading...'

code2win
This post was updated on .
no luck. the program doesn't crash, or even freeze. I can even press play and it says, "No more instructions to execute" below in red, while still saying loading... up top.
On the Square program, the Main class successfully loads individually, but the other 2 classes do not.
Seven, ComplexArrays, ConvertToBin, and Average all work and that correctly. Maybe I should just try submitting it, and see if it works on the other end.
All my trouble files have constructors in them...
Reply | Threaded
Open this post in threaded view
|

Re: 'loading...'

code2win
In reply to this post by code2win
Yep, problem still persists, but the compiler passed. Onto the next chapter. That project was insane.
Reply | Threaded
Open this post in threaded view
|

Re: 'loading...'

jfmolderez
Same problem : I do not manage to load the dir Square (multiple vm files) in the VM emulator. Here is the trace on my terminal :
$ ../../tools/VMEmulator.sh
$ Exception in thread "Thread-2" java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 4
        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3720)
        at java.base/java.lang.String.substring(String.java:1909)
        at Hack.VMEmulator.VMProgram.getAddress(Unknown Source)
        at Hack.VMEmulator.VMProgram.buildProgram(Unknown Source)
        at Hack.VMEmulator.VMProgram.loadProgram(Unknown Source)
        at Hack.VMEmulator.VMProgram$LoadProgramTask.run(Unknown Source)
        at java.base/java.lang.Thread.run(Thread.java:830)
Reply | Threaded
Open this post in threaded view
|

Re: 'loading...'

ivant
The VM Emulator expects all functions to have a name in the form ClassName.funName. If you have functions, which do not conform to that, the emulator will throw that exception and basically crash.

Shameless plug: I have a fork of the original sources, which fixes several known bugs (including this one) and adds a few features. You can check it out at https://github.com/itoshkov/nand2tetris-emu/releases.