![]() |
Forum Index : Microcontroller and PC projects : CMM2: Bug reports
Page 1 of 17 ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Rather than multiple different threads, please post all any any bug reports to this thread so I can manage them more easily. As always bugs are easiest to find when simple example programs are posted. thwill is setting a wonderful example of exactly how to do this. Known issues at the moment: error in ERROR command input$ reading 1 character past the end of a file As and when I create new releases I will post a message on Geoff's original thread to say they are ready for download. Please post all documentation issues on the manual errata thread Edited 2020-05-17 17:41 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
BUG in select & delete/copy/cut multiple lines To reproduce 1. Edit: Option Explicit On Dim a(10) = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) Cls print_array() End Sub print_array() Local i For i = 0 To 10 Print a(i) Next i End Sub 2. Move cursor to empty line before Cls 3. Press F4 to start selection 4. Move cursor down to start of line containing End 5. Press Delete Actual behaviour Nothing is deleted. The status area displays the message "Nothing to delete". The cursor returns to the line at the start of the selection. Expected behaviour The selected lines should be deleted. Additional It also doesn't work if you try to copy or cut a selection beginning with an empty line. Edited 2020-05-20 00:20 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
My beta testers have let me down badly. Perfect bug report thanks - now I just need to work out how to fix it |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
No known bugs as at V5.05.02RC32 - lots more unknown to find I'm sure |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Great, I'll flash it later and if the family let me I'll find some more bugs to keep you company - I saw a doozy earlier but you probably don't want 1000 lines of code to reproduce it ![]() Did you check whether Triangle allows colour & fill to be scalar even when the vertices are arrays ? Edited 2020-05-20 01:59 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
The code appears to say yes but if you can prove otherwise then I'll certainly look at it |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Here is that doozy I promised ![]() BUG in array state after running via editor To reproduce 1. Create file "array_bug.bas": Cls Dim a(255) Print "a(0) ="; a(0) 2. At the > prompt run "array_bug.bas" 3. As expected it outputs a(0) = 0 4. At the > prompt Print a(0) 5. As expected it outputs 0 6. At the > prompt edit "array_bug.bas" 7. F2 - to run 8. As expected it outputs a(0) = 0 9. At the > prompt Print a(0) Actual behaviour Outputs 4.777888813e+104 Expected behaviour Outputs 0 MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Thanks for the report and great example. This is a cache coherency bug. When a program ends the firmware executes a longjmp command. When this command is used cache must be flushed first. In most places in the code I had done this but not when a program just runs off the end of the Basic statements or with an END statement. This will be fixed in the next beta. Basically the running program has written to the a() array but this information is currently held in cache. This isn't an issue in the program because when we read the a() array the chip knows that the data is in cache and reads it from there. If the program was bigger other data would end up in cache and the chip would know it had to write the old cached information back to real memory and you wouldn't see the bug. UPDATE Wasn't just a caching issue; something much more stupid on my part - fixed ready for posting once I sort out another minor issue. Edited 2020-05-20 21:33 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Multiple bugs when using array parameters to graphic primitive commands See: graphics_errors.bas.zip 1. CIRCLE leaves uncoloured pixels at perimeter 2. CIRCLE when called with array coordinates but scalar colors does weird sh*t 3. RBOX when called with array coordinates but scalar colors does weird sh*t 4. TRIANGLE when called with array coordinates but scalar colors reports "Error: Dimensions" Also note comment about the documented type of the coordinate parameters to Polygon compared with the other graphic primitives. MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Unclosed subroutine does not report an error Surely the following program should report an error when run: Cls foo() bar() Sub foo() Print "foo" Sub bar() Print "bar" End Sub MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Thanks for the reports - the last one is for Geoff. I don't touch MMBasic ![]() All the rest of the graphics ones are also in the ArmmiteH7, the ArmmiteF4, and the MMX. The circle pixel one is also in every Micromite. Mostly just trivial cut and paste errors. just shows how many people have tried using arrays as inputs to graphics routines! All will be fixed in RC35 to be posted later today |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
You're welcome. I'm not sure I understand the distinction, are not all the other bugs I've reported problems with MMBasic (on the CMM2) ? Great. I've got a USB keyboard coming today, expect to be baraged with reports (and I can't help myself, suggestions) related to the editor ... I've been holding off until now just in case the problems I'm having are due to using the serial console. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
No known functional bugs as at V5.05.02RC35 - still lots more unknown to find I'm sure Unclosed subroutine does not report an error exists in all versions of MMBasic and is on Geoff's to-do list but at low priority NB the likelyhood of changes to the editor other than bug fixes are vanishingly small Edited 2020-05-22 04:04 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Understood, but likewise it is in the nature of published works to be subject to critique. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
As promised ... Issues with the editor 1. Double pressing [End] does not consistently take you to the end of the document, sometimes it just goes to the end of the line. Double pressing [Home] seems to work as advertised. To reproduce open a multi-page .BAS file and navigate around it with [Page Up|Down], [Home] and [End], eventually you should find yourself in a situation where double pressing [End] does not go to the end of the file. If you cannot reproduce then I'll provide you with a .BAS file and exacting instructions. 2. If you hold down [Up] or [Down] and scroll beyond the start end of a page for a bit and then release the key the page keeps scrolling; presumably until the keyboard buffer empties ... this is very annoying. If you try the same experiment on a CMM then releasing the key immediately stops the scrolling. 3. You can't use [Page Up], [Page Down] and double pressing [Home] and [End] to navigate whilst doing an F4 selection. Possibly this is a deliberate omission, but it's not very friendly. 4. I believe the "Save As" behaviour is unconventional and at the very least misnamed. Most (All?) editors would save the file you are working on to the new file AND switch so that you were editing that new file. The existing behaviour corresponds more to a "Copy File" or "Backup File" command as it leaves you editing the original. It leads to the strange workflow that if you've already made some changes that you want to keep but you don't want to overwrite the original just yet then you have to "Save As" and [Escape] out of the editor to avoid your changes going into the original. 5. OK, this is a feature request and I know how you feel about those, but something really useful is a shortcut that comments/uncomments all the lines currently selected. Hope this helps, Tom Edited 2020-05-22 08:34 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1636 |
Again, I have to agree with Tom on this. The behaviour in not as you would expect and will surely be a "gotcha" in the future. The first thing I do when editing a program is to do a SAVE AS so I know the original is safe. It WILL catch me out. MMEdit does this, and it IS handy. Bill Keep safe. Live long and prosper. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Will fix Can significantly improve this but probably not solve completely as characters are buffered all over the place when using teraterm over usb with USB buffering, key repeat algorithm , keyboard buffer etc. The selection code is too complex to allow this as there are so many special cases that bugs are inevitable Could rename but will not change the concept, would need huge destabilising change as it interacts with concept of current file and how programs are stored and managed for execution Correct ![]() We are coming up to the formal release of the CMM2 in SC. My overriding concern is stability of the code and finding/fixing real bugs not perceived deviations from some other norm. I cannot and will not be making functional changes that could impact that stability. Anything relating to the editor/file handling comes into that category. Once the code is released then it will go into a normal development cycle and functional changes could then be incorporated but that will happen on a periodic basis (6 month or a year) with each release following an extensive beta period |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Acknowledged. Note that the scrolling/keyboard buffer problem is present when using the CMM2 over VGA and not just through a serial terminal. I think renaming "Save As" might be wise but understand (if regret) that it cannot be made to adhere to convention. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1636 |
+1 Perhaps something for the future? Bill Keep safe. Live long and prosper. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
See main thread for RC36 changes |
||||
Page 1 of 17 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |