Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:34 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 : CMM2 Editor losing chunks of code

Author Message
Marc1970
Newbie

Joined: 26/11/2020
Location: United Kingdom
Posts: 7
Posted: 11:00am 11 Dec 2020
Copy link to clipboard 
Print this post

I find the CMM2 to be doing some strange things. I have one of the pre assembled ones, in a beige case.

Firstly it keeps deleting chunks of my code, from the end of listings - For instance I'm running stuff and testing it and suddenly I have whole subs and functions missing.... very annoying.

What is strange is that the code all still runs, it's just not shown in the editor - I'm editing directly on the CMM2. Then if I restart the CMM2, the missing code is gone forever and I need to go from a backup.

When it's in that state, running code I can't see - all kinds of weird stuff happens.... FOR / NEXT loops only count up a few steps and then stop..

Not sure what I'm doing wrong, or perhaps the editor is buggy.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 11:19am 11 Dec 2020
Copy link to clipboard 
Print this post

Hi Marc,

this is a known bug. (s. also here )
Which firmware? Newer version create an auto-backup.

Michael
Edited 2020-12-11 21:29 by twofingers
causality ≠ correlation ≠ coincidence
 
Marc1970
Newbie

Joined: 26/11/2020
Location: United Kingdom
Posts: 7
Posted: 11:37am 11 Dec 2020
Copy link to clipboard 
Print this post

Many thanks for the reply.

I'm on 5.05.05b8

Will try a newer version.

Marc.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 01:09pm 11 Dec 2020
Copy link to clipboard 
Print this post

Tip (without warranty!):
In the meantime, as a workaround and to protect my code, I add some Rem lines (>2x256 bytes) to the end of my code:
'1****************************************************************************************************
'2****************************************************************************************************
'3****************************************************************************************************
'4****************************************************************************************************
'5****************************************************************************************************
'6****************************************************************************************************

... kind of vodoo!
causality ≠ correlation ≠ coincidence
 
Marc1970
Newbie

Joined: 26/11/2020
Location: United Kingdom
Posts: 7
Posted: 01:18pm 11 Dec 2020
Copy link to clipboard 
Print this post

  twofingers said  Tip (without warranty!):
In the meantime, as a workaround and to protect my code, I add some Rem lines (>2x256 bytes) to the end of my code:
'1****************************************************************************************************
'2****************************************************************************************************
'3****************************************************************************************************
'4****************************************************************************************************
'5****************************************************************************************************
'6****************************************************************************************************

... kind of vodoo!


Many thanks - nice :)
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 12:15pm 12 Dec 2020
Copy link to clipboard 
Print this post

Here is my Repair.bas if someone want to try:
  Quote  '**********************************************************
' REPAIR.BAS
' This tool may help for corrupted ".BAS"-files
' with a LINE IS TOO LONG issue
'
' It reads from a corrupted file selected by GetFileName()
' all lines which are shorter than 240 characters
' and writes them back into a new file "repfile.bas"
'
' Thanks for vegipetes excellent GetFileName() function
' twofingers@tbs
'**********************************************************


repair.zip

Regards
Michael
causality ≠ correlation ≠ coincidence
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 203
Posted: 12:37am 13 Dec 2020
Copy link to clipboard 
Print this post

I've encountered this too, particularly when copying/pasting or cutting/pasting from one location in a program to another.  These are typically long lines, greater than 80 chars, but nowhere approaching the magic 240 char limit.  I'm now doing my program editing on a separate machine, and only doing debug editing on the CMM2.  When the editor poops out, so far, I've been able to remember the few changes I've made while debugging, and reconstruct them elsewhere.

Irritating, somewhat diminishes my enthusiasm for this wonderful ecosystem, but not a total showstopper.

- Steve
Live in the Future. It's Just Starting Now!
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 11:15am 13 Dec 2020
Copy link to clipboard 
Print this post

I would be interested to know if anyone has ever encountered the same problem while using epsilon Xedit editor.

Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 11:48am 13 Dec 2020
Copy link to clipboard 
Print this post

What versions are you running and seeing code loss? I'm not aware of any reperts that it is still happening in the Version 5.06.00 release candidates
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:02pm 13 Dec 2020
Copy link to clipboard 
Print this post

  matherp said  What versions are you running and seeing code loss? I'm not aware of any reports that it is still happening in the Version 5.06.00 release candidates


I agree with @matherp, I used to see this at least a couple of times a week, but it hasn't happened to me in the last month or so and I'm still hammering it quite hard - I'm rarely more than 2 days behind on firmware builds. I do still see an occasional hang, but not with any loss of work.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 12:29pm 13 Dec 2020
Copy link to clipboard 
Print this post

Hi Peter,

I'm on v5.06.00b2 now.
I was not aware that you fixed that issue - did you?
You are right I had no issues in the last weeks but I did not do so much with the CMM2.

I was wondering if it would make sense to introduce an optional verify.

Michael
causality ≠ correlation ≠ coincidence
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 12:30pm 13 Dec 2020
Copy link to clipboard 
Print this post

I don't have also any issues on last (few) FW versions and I'm working only in EDIT. Just few small things like replace on end of the screen (you have longer line than screen and find/replace it somewhere on screen) but never again lost of the code...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 10:51am 14 Dec 2020
Copy link to clipboard 
Print this post

  twofingers said  I would be interested to know if anyone has ever encountered the same problem while using epsilon Xedit editor.

Michael


I found and fixed a bug yesterday that is completely unrelated but at first glance looks a bit similar:

Pressing enter twice on last line in window triggered an incorrect page redraw action so it would look as if the line disappeared.

This is a bug in the page display. It's fixed in XEdit V0.6.
Epsilon CMM2 projects
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 03:30pm 14 Dec 2020
Copy link to clipboard 
Print this post

Thanks Ruben,

but I'm almost sure that this xedit issue is not related to the losing chunks of code issue. Anyway, I am excited about the good job you did in creating Xedit.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 04:13pm 14 Dec 2020
Copy link to clipboard 
Print this post

  twofingers said  Thanks Ruben,

but I'm almost sure that this xedit issue is not related to the losing chunks of code issue. Anyway, I am excited about the good job you did in creating Xedit.

Regards
Michael


Thanks Michael. It isn't related, but I can imagine when people are trying out XEdit V0.5 and they see that last line disappear, they would say 'Oh no, Not Again!'  .
It was just a typo in my page scrolling logic. The bug is fixed in the V0.6 XEdit release I posted today.
Epsilon CMM2 projects
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 04:27pm 14 Dec 2020
Copy link to clipboard 
Print this post

I understand!
causality ≠ correlation ≠ coincidence
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025