Closed ghost closed 12 years ago
That is very strange! I just tried some simple tests here, but no luck recreating it. Is it specific to one solution you have? If so, could you attach/upload/send it to me (will be treated with confidentiality)?
Acutally, it crashes pretty quickly on any frequency with this program i wrote to test this issue. I debugged through it and it happened on the third hwi.
EDIT: That's happening there to my code? Just ignore that there's a frame, it's all one file.
EDIT2: The error can be changed by loading/unloading certain plugins that provide hardware.
set pc, start :random mul a, 10061 add a, 1 set pc, pop
:start jsr random set x, a mod x, 10 jsr random set b, a jsr random set c, a jsr random hwi x
jsr random
set j, a
jsr random
set i, a
ifg j, 0xffc0
set pc, start
ifl j, 0x100
set pc, start
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
sti [j], [i]
set pc, start
Ah OK - well this test program calls HWI on a random device with random value for A, so it's "fuzz-testing" devices?
I ran it at max speed for a while, and fixed 3 bugs thanks to this. Thanks :)
Can you confirm that it's supposed to be fuzz-testing, rather than doing anything else?
Yes, just randomness. But I have to say that i actually derped the random algorithm and it doesn't return much random stuff. It would have to save the last returned value and recall that the next time to continue in the sequence.
I can upload a zip of the original solution I noticed it in, although it even happens in a solution with one file with a file with only this in it:
Start: SET A, 0xB33F Hang: SET PC, Hang
It's worth noting that it seems like it's entering into some kind of infinite loop or infinite recursion, because if I try to stop the program from running very soon after starting it, I can before it becomes totally unresponsive. Also, it does the same thing even when starting it by using Step, but again, only while the CPU frequency is at 10 KHz.
And just to check, could you try unloading/disabling auto-load for the vector plugin, restarting devkit, then trying the same thing again? To rule it out, or not :)
Yeah, it's an issue with the vector display. It worked fine with it unloaded, but loading it and running even a basic program on 10 KHz caused the freezing. Also, on the lowest CPU frequency, the vector display is blank, but it shows the 3d wireframe cube on all other frequencies.
Resolved for the next release
When I set the CPU frequency to 10 KHz by clicking the button on the toolbar in the CPU Status/Control window, and run my program, it freezes. The monitor appears stuck on the warmup logo, then the program says it's not responding, and I've had to forcefully terminate it. All speeds, faster and slower, work fine.
I'm using "Version 1.7.5 - Beta" according to Help -> About. If it matters, I'm using only Assembly, with 4 .dasm16 files. I have all plugins that are included with the download set to enabled automatically, and none others are installed.