Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:09 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

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 States
Posts: 110
Posted: 11:24pm 23 Aug 2020
Copy link to clipboard 
Print this post

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 States
Posts: 110
Posted: 11:36pm 23 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 6283
Posted: 12:08am 24 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 341
Posted: 12:10am 24 Aug 2020
Copy link to clipboard 
Print this post

  berighteous said  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.


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: Australia
Posts: 1114
Posted: 12:22am 24 Aug 2020
Copy link to clipboard 
Print this post

@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: Australia
Posts: 341
Posted: 12:28am 24 Aug 2020
Copy link to clipboard 
Print this post

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)

  panky said  @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'?


For mine I tried Ctrl-C before calling it a lockup.
I might try the SD card thing next time.

Additional:

  panky said  
Another thought, if you type PAGE WRITE 0 and Enter when in the 'lockup' state, does it come back to life?


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 States
Posts: 110
Posted: 01:05am 24 Aug 2020
Copy link to clipboard 
Print this post

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 States
Posts: 110
Posted: 01:11am 24 Aug 2020
Copy link to clipboard 
Print this post

typing enter enter "page write 0" enter does nothing.
 
berighteous
Senior Member

Joined: 18/07/2020
Location: United States
Posts: 110
Posted: 01:18am 24 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  
Try printing something to the screen at various stages of your program to see how far it gets.
Jim

it doesn't go anywhere.  As soon as i hit f2 it goes black and locks up
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 01:21am 24 Aug 2020
Copy link to clipboard 
Print this post

  berighteous said  
  TassyJim said  
Try printing something to the screen at various stages of your program to see how far it gets.
Jim

it doesn't go anywhere.  As soon as i hit f2 it goes black and locks up


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: Australia
Posts: 341
Posted: 01:30am 24 Aug 2020
Copy link to clipboard 
Print this post

  berighteous said  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.


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 States
Posts: 110
Posted: 01:34am 24 Aug 2020
Copy link to clipboard 
Print this post

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 States
Posts: 110
Posted: 01:37am 24 Aug 2020
Copy link to clipboard 
Print this post

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 States
Posts: 110
Posted: 01:41am 24 Aug 2020
Copy link to clipboard 
Print this post

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 States
Posts: 110
Posted: 01:42am 24 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 341
Posted: 01:43am 24 Aug 2020
Copy link to clipboard 
Print this post

  berighteous said  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


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 States
Posts: 110
Posted: 01:53am 24 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 2950
Posted: 02:10am 24 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 6283
Posted: 03:04am 24 Aug 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 1114
Posted: 03:07am 24 Aug 2020
Copy link to clipboard 
Print this post

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    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025