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 : FONT Number #13 Error
Author | Message | ||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1336 |
NOTE: I'm Not asking for a fix, this post is to highlight a strange behaviour of this stupid error. ARM H7 MM.B 5.05.11 but present for the last few upgrades. This started to revisit me a year ago, but only sometimes. 1: It happens when changing pages - I have 20 pages. 2: A simple reorder of the allocated page numbers (not the code layout) causes it to follow the Page number NOT the Page. 3: Now I recently added a context information page to my code. Y-E-S FONT #13 error was there before any change. So instead of a simple Page command, I call the following Sub() which saves the calling Page request and allows a large information page (if it's called) to automatically return to the calling page. Sub SetPage(ThisPage as integer) Page ThisPage CallingPage=ThisPage End Sub 4: In the past, I put an "error ignore" and "abort" around the page change to stop that FONT #13 error from crashing out, why?: Sub SetPage(ThisPage as integer) On Error Ignore Page ThisPage On Error Abort CallingPage=ThisPage End Sub Because it does more that that ???: The first time the offending "Error Font #13" occurs with the offending Page, the Page is only partly rendered?, however after that, it works perfectly????? Restart the UNIT and the error has now completely gone, until the next fresh reload of the program into memory. There is nothing wrong with the code, and it does NOT happen on all ARM-H7 and M100 units, and when it does happen, it may not happen all the time, 1 in 10 may be. Again it follows, in my case, any page that is set to 16. So I've decided not to use Page 16 as a GUI page number, limiting me to 31 pages, I can live with that, and so far it has not returned, but possibly to be continued... If it were a hardware issue on some units, or other variable, why is always the page assigned to the FONT #13 devils number of 16 Mike Edited 2020-05-17 17:36 by KeepIS It's all too hard. Mike. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3163 |
Thanks. I have been chasing this for a long time but still have not found the cause. Geoff Graham - http://geoffg.net |
||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1336 |
Something you likely don't want to hear. To try and catch this Font #13 error and see if the behaviour changes, I've added a bit more code to the Page switch sub. Sub SetPage(ThisPage as integer) Local as integer MBres ON ERROR SKIP Page ThisPage If MM.ERRNO then Watchdog OFF MBres=Msgbox(MM.ERRMSG$,"CONTINUE") ON ERROR SKIP Page HOME_PAGE IF MM.ERRNO then MBres=Msgbox(MM.ERRMSG$,"CONTINUE") CallingPage=HOME_PAGE Else CallingPage=ThisPage Endif End Sub Brief Overview. I'm going through the code on a large program, moving functions and procedures around for a more logical layout and to squeeze the last bit of speed out of the ARMh7. 8,450 Lines, 213 GUI elements and 30 IO to the hardware and Sensors. I'm running the program on 3 units, one, an Arm H7 v1, and the other two are H7 v2. Only one is in a Routing Machine will all sensors, motors and manual override controls connected and running. It's mostly the main working unit that's throwing this occasional Font #13 error. Today after loading the program, I received from the SetPage() sub above: Invalid Font #% Not a typo #%. After pressing continue, dropped to the prompt breaking on:[See NOTE below] HOME_PAGE Invalid Font #13 Remembering that it had just loaded the HOME_PAGE on start up without error. After the abort error, I typed RUN and everything worked faultlessly. however, if you didn't catch the first FONT error with "Error Abort", and typed RUN, the same error Font #13 would occur. BTW HOME_PAGE is page 1. So my thoughts about page 16 in the first post are now not worth a pinch of salt, and along the way I've had it spit the dummy at page 15, once again, typing RUN and all is good. NOTE: I have changed the SetPage() code that I initially posted, changed from ON ERROR ABORT to on error Skip as shown reposted above, this in an effort to catch both Font errors without breaking to the prompt. I won't post anymore on this subject unless some Divine revelation crops up. Mike. Edited 2020-05-19 13:43 by KeepIS It's all too hard. Mike. |
||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1336 |
Some final thoughts for what they are worth. First, when the program throws a FONT error on page switching and I catch the error and continue. I now attempt to switch back to the previous page, that also throws a FONT error with the same FONT error number, after that, there will be no more page errors anywhere from 19 setup and automation control pages. After the Error: 1: The program is still fully functional. 2: The page screen is a mixture of the previous page and a partly rendered selected page. NOTE: If you look at the last code posted, I attempt to switch back to the previously working calling page, with that in mind, on to number 3. 3: Buttons on the previous page work and I can now move to the page that started the FONT error, sometimes I need to switch to a few pages to get all the old GUI leftovers to disappear?. 4: As above in 3, the page that caused the Error can now be reselected, this time there is no error on that or any other page, the program can be restarted, powered on / off and there will be no more FONT errors. 5: The error only happens when the program is first loaded into the device. 6: The error will continue with each restart unless I force the program to Ignore or Skip on the first FONT error, after that, it's all good? 7: I can load the same program onto another unit and it will hardly ever throw a FONT error. The main offending unit can run for days in a noisy electrical environment, clocking out, decoding and displaying 24 bit data from two positional scale sensor heads, controlling motors and monitoring positions of Fence and router movement to 0.001mm (mechanical limitations), monitoring numerous limit switches, optical sensors, rotary encoders and user manual control and safety switches, all in 10.7ms with an ARM H7 @ 480Mhz. If it's a hardware fault then it's got me beat. This unit is more likely to throw the error than the other two, but they all eventually throw one. It seems to me that the location in memory of the Page code seems to have something to do with it, if I shift code around or add a few dummy lines of code, I can stop the error from either happening or shift it to happen with a different Page. Finally, I wonder what is happening in the interpreter when it's forced to skip or ignore the FONT error, why does the program run correctly after that across numerous power cycles. Again: I'm not looking for an answer from anyone on this, just throwing it out there. BTW it's not causing me any grief, it's more of a curiosity. Mike. It's all too hard. Mike. |
||||
Print this page |