![]() |
Forum Index : Microcontroller and PC projects : bug in edit. if your program changes to 3,8 f2 black screens lock up?
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
I've had this happen in every firmware. In my program I switch to mode 3,8 and nearly every time I hit f2 in the editor to save and run the screen goes black and the system seems to lock up. nearly EVERY SINGLE TIME. Surely other folks have seen this. The system goes black and non responsive. I have to turn off and on. F1 to quit and then typing run always works. But f2 does not. Surely this isn't the behavior you want. |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
If I just go into the editor and don't do anything and just hit f2 sometimes the program runs. If I edit the file at all hitting F2 to save and run almost always just goes black. Ctrl-C does nothing. Here's a youtube video of the issue Edited 2020-08-24 09:44 by berighteous |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
You will have to provide a program that illustrates the problem. I tried a small test of mode 3,8 and could not recreate your problem. mode 3,8 text 10,10,"Testing" do:loop Try printing something to the screen at various stages of your program to see how far it gets. Jim VK7JH MMedit |
||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
I've occasionally had lockups I haven't been able to track down (most recently when I was testing programs with screen blanking interrupts, that one wrote an empty file over the .bas file I was working on, previous ones have just needed an off&on to fix them), but we're using mode 3,8 in boulder dash, and I'd often start it with F2 from the editor with no problem. Can you post the program so we can see it it does the same thing on other's CMM2s? I'm a bit wary of CSUBs and POKEs but apart from that I think programs, even buggy programs, aren't supposed to lock up the computer. |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
@berighteous Is it possible to get out of the 'lockup' with Ctrl C? As F2 saves the program to the SD card before running, is it possible that the SD card access is hanging the program? If you pop the SD card and re-insert, will that break out of the 'lockup'? Another thought, if you type PAGE WRITE 0 and Enter when in the 'lockup' state, does it come back to life? Edited 2020-08-24 10:26 by panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
other questions: I was going to ask if the SD card access light is on during the lockup. But I saw in your video, it's not. Can it lock up if you copy the program to a different name and run it? Probably yes, but you may want to do this if you're changing the program for my other questions. Can it lock up the first time you run it after powering on? If not, it may be related to a previous run of the program. Can it lock up if you put an "end" statement near the bottom of that first screen of code? If so it's probably not something the program is doing later than that. If adding an "end" doesn't stop the lock ups but deleting the code after that does, it may be related to how long it takes to process the files (saving to SD or tokenising) For mine I tried Ctrl-C before calling it a lockup. I might try the SD card thing next time. Additional: On my computer typing Ctrl-C often leaves a "c" on the command line, so I'd do: backspace backspace backspace before typing run or edit. Might need to do the same here. Edited 2020-08-24 10:32 by capsikin |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
It's happened on every single program I've written in mode 3,8 I don't know it the program has to be a certain length or not, but even on short programs it craps out. I usually see it happening after the program is a page or few long. ctrl-c doesn't do anything. I said so before. Edited 2020-08-24 11:09 by berighteous |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
typing enter enter "page write 0" enter does nothing. |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
it doesn't go anywhere. As soon as i hit f2 it goes black and locks up |
||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
Try putting "END" above the first line. (and if that doesn't lock up, moving it down until it does, maybe after the MODE line) |
||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
ctrl-c doesn't do anything. I said so before. Part of my motivation for wanting it to be short is so you can post a small program for others to test. |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
Here's a program that does it. I run the program ctrl-c out of it edit remove the line 'this is a test Can be any edit. f2 to run It locks up most every time. cmm2stuff1.zip |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
In the program I'm reading the color palette for mode 3,8 and set it for the asteroids. On line 28 I have a map reset I put in to check to see if the map was the problem. remove that line to see the asteroids in the right colors. |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
I think it's something to do with setting the palette, but I've commented out the map set and it still locks up sometimes |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
pressing f1 and then f2 from the > prompt works every time. sometimes ctrl-c to stop the program, then edit and f2 without typing anything and the screen goes black and nothing. Sometimes it will run correctly. It nearly always just "locks up" (could be all the colors are black I guess. Map(127) is white and map(128) is black in the color pallete I'm using. 129 is yellow Edited 2020-08-24 11:51 by berighteous |
||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
I run the program ctrl-c out of it edit remove the line 'this is a test Can be any edit. f2 to run It locks up most every time. cmm2stuff1.zip Locked up for me too: I ran this from the file manager, pressed Ctrl-C, did "edit", copy/pasted to duplicate the test comment, pressed F2 and it locked up. (update: I had some trouble getting it to lock up again, until I turned the computer off and on, and repeated the previous steps: open from file manager, press Ctrl-C, edit file, F2 from editor) Edited 2020-08-24 11:49 by capsikin |
||||
berighteous Senior Member ![]() Joined: 18/07/2020 Location: United StatesPosts: 110 |
It's weird. When it locks up the red light doesn't come on, so it's before the sd card access? which happens right at the beginning of the program. Edited 2020-08-24 11:57 by berighteous |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2950 |
Hi Berighteous, I can confirm your scenario locks up for me too. But a reset (using the button) recovers OK. Kind Regards Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Try adding close #1 after reading "cmm2stuff1.dat" I agree that missing out a CLOSE shouldn't cause a complete lockup but fixing that bug seems to fix it. Jim VK7JH MMedit |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
It is even stranger/simpler than shown - the following snippet can also be made to lockup by inserting/deleting comment lines then hitting F2 - it is not EXACTLY repeatable but does happen often - I feel it may be in the editor somewhere related to the long line length of the DIM statements. I think I ever got it to fail if I put an END statement between the two DIM statements. mode 3,8 'junk dim oidx(29)=(0,29,58,87,116,145,174,203,232,261,0,29,58,87,116,145,174,203,232,261,0,29,58,87,116,145,174,203,232,261) 'junk dim oidy(29)=(0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,54,54,54,54,54,54,54,54,54,54) 'junk ' open "cmm2stuff1.dat" for input as #1 end ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |