|
Forum Index : Microcontroller and PC projects : Invalid font #10...
| Author | Message | ||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9755 |
Just an update. I changed some of the GUI pages, and the same problem has cropped up, and exactly the same fix - type the problem GUI page TWICE at the command prompt, then RUN the code, and everything works. Different page this time thowing the error, but same font - #10, which does not exist. Also different line number throwing it. Just for everyone's information, and Geoff if he happens to read it. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
Any update regarding the bug? I have seen this bug in MM Plus 5.0408 Thanks in advance Rico |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
That should have been fixed in V5.04.06. What caused this error? (ie, were you changing pages, drawing a button, etc?). Any other clues? Geoff Graham - http://geoffg.net |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
It is a bigger programm with 1500 lines of code. Most important parts here: ... CONST HEADER=1,BUTTONS=2,ASSAY=3,RESULTS=4,SETTINGS=5,SETTINGSSUB1=6,SETTINGSSUB2=7,SETTINGSSUB3=8,SETTINGSSUB4=9,SETTINGSSUB5 =10,SETTINGSSUB6=11,REFERENCE=20 ... Sub Button_Pressed Select Case Touch(REF) ... Case Button_SettingsSub1 BOX 300,120,150,550,0,RGB(black),RGB(black) PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB1 : GUI DISABLE Button_Settings,Button_SettingsSub1 GUI ENABLE Button_SettingsSub2,Button_SettingsSub3,Button_SettingsSub4,Button_SettingsSub5,Button_SettingsSub6 : CtrlVal(TextStatus)="Settings-G" Case Button_SettingsSub2 BOX 300,120,150,550,0,RGB(black),RGB(black) PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB2 : GUI DISABLE Button_Settings,Button_SettingsSub2 GUI ENABLE Button_SettingsSub1,Button_SettingsSub3,Button_SettingsSub4,Button_SettingsSub5,Button_SettingsSub6 : CtrlVal(TextStatus)="Settings-X" Case Button_SettingsSub3 PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB3 : GUI DISABLE Button_Settings,Button_SettingsSub3 GUI ENABLE Button_SettingsSub2,Button_SettingsSub1,Button_SettingsSub4,Button_SettingsSub5,Button_SettingsSub6 : CtrlVal(TextStatus)="Settings-B" Case Button_SettingsSub4 BOX 300,120,150,550,0,RGB(black),RGB(black) PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB4 : GUI DISABLE Button_Settings,Button_SettingsSub4 GUI ENABLE Button_SettingsSub2,Button_SettingsSub3,Button_SettingsSub1,Button_SettingsSub5,Button_SettingsSub6 : CtrlVal(TextStatus)="Settings-E" Case Button_SettingsSub5 BOX 300,120,150,550,0,RGB(black),RGB(black) PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB5 : GUI DISABLE Button_Settings,Button_SettingsSub5 GUI ENABLE Button_SettingsSub2,Button_SettingsSub3,Button_SettingsSub4,Button_SettingsSub1,Button_SettingsSub6 : CtrlVal(TextStatus)="Settings-C" Case Button_SettingsSub6 BOX 300,120,150,550,0,RGB(black),RGB(black) PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB6 : GUI DISABLE Button_Settings,Button_SettingsSub6 GUI ENABLE Button_SettingsSub2,Button_SettingsSub3,Button_SettingsSub4,Button_SettingsSub5,Button_SettingsSub1 : CtrlVal(TextStatus)="Settings-L" ... It stops only when I press the Button_SettingsSub3 with the message "Error: Invalid font number #8" at this line PAGE HEADER,BUTTONS,SETTINGS,SETTINGSSUB3 It does not happen every time. Sometimes it works, sometimes not. I changed the const from 8 to 31 than I get "Error: Invalid font number #31" It never happened on the other buttons with almost similar behaviour. Only in Button_SettingsSub3 Thanks in advance Rico |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9755 |
This is new. My invalid font messages have stopped since 5.0406 as mentioned above by Geoff. Has anyone else who WAS seeing those messages, seen them resurface? Smoke makes things work. When the smoke gets out, it stops! |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
I have to correct myself: I changed the const from 8 to 31 than it worked for this button! It just does not like the 8. I changed the code from CONST HEADER=1,BUTTONS=2,ASSAY=3,RESULTS=4,SETTINGS=5,SETTINGSSUB1=6,SETTINGSSUB2=7,SETTINGSSUB3=8,SETTINGSSUB4=9,SETTINGSSUB5 =10,SETTINGSSUB6=11,REFERENCE=20 to CONST HEADER=8,BUTTONS=2,ASSAY=3,RESULTS=4,SETTINGS=5,SETTINGSSUB1=6,SETTINGSSUB2=7,SETTINGSSUB3=1,SETTINGSSUB4=9,SETTINGSSUB5 =10,SETTINGSSUB6=11,REFERENCE=20 than it throws the error at PAGE HEADER with "Invalid font number #8" The error shows up randomly. Sometimes it works, somtimes not. If I do not use number 8 for a page than everything is fine. Quite strange. Thanks Rico |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
Thanks, the original issue was caused by an array holding details of all controls not being correctly initialised. I thought that I had tracked down all occurrences of this but perhaps not. This could take some time to find. Geoff Graham - http://geoffg.net |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
Last week I got same kind of error again but at a different position. CONST HEADER=1,BUTTONS=2,ASSAY=3,RESULTS=4,SETTINGS=5,SETTINGSSUB1=6,SETTINGSSUB2=7,SETTINGSSUB3=30,SETTINGSSUB4=9,SETTINGSSUB 5=10,SETTINGSSUB6=11,REFERENCE=20 I got the message "Invalid font number #12" The trigger for that error was REFERENCE=20 It was the 12. value that was defined in that row. This might explain invalid font #12 ???? Changing the line to REFERENCE=21 solved the issue. CONST HEADER=1,BUTTONS=2,ASSAY=3,RESULTS=4,SETTINGS=5,SETTINGSSUB1=6,SETTINGSSUB2=7,SETTINGSSUB3=30,SETTINGSSUB4=9,SETTINGSSUB 5=10,SETTINGSSUB6=11,REFERENCE=21 |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
That’s a strange one... GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
I agree. It is in my bug list but I cannot spot the cause... very frustrating. Geoff Graham - http://geoffg.net |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
This might seem like a stupid question, but is it possible the space between "SETTINGSSUB" AND "5=10" IN "SETTINGSSUB 5=10" is causing issues? Cheers, GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
This is a forum issue. I post the original line without a space here but the forum adds the space. Original code has no space. So I do not think so ;) Rico |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
Damn. Thought we might have been on to something there...... Have you tried splitting the line into separate CONST's? i.e. CONST HEADER=1 CONST BUTTONS=2 CONST ASSAY=3 CONST RESULTS=4 etc. etc...... Or changing them to DIM's? Like Grogs, the issues I was having with the "Invalid Font" Bug got sorted out way back in the (not so) long, long ago...... GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
Latest beta v5.04.10 (Beta 9) does not show the "invalid font" error (related to page number) anymore. Previous version including v5.04.8 and v5.04.9 still showed it. Good work ;) |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9755 |
Great! For a moment, when I saw that this thread had a new post, I was worried that this invalid font issue had resurfaced! Danke für diesen Beitrag. (Thanks for this post) Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9755 |
It has resurfaced again, this time in version 5.0501 [Quote=E100] (160) CLS Error: Invalid font number #7 [/Quote] I cannot get past this point. Fresh flash of the HEX, configure the screen and touch, load the program code, and when run, this just happens on every single run. Line 160 is just CLS and nothing else. Font #7 is never defined in the code, nor in the library, so this should NOT be popping up. EDIT: Image of problem - latest firmware beta did not help, I thought it was worth a try.... ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
on my mm+, i have a font's test prog and all is ok run OPTION AUTORUN ON OPTION LCDPANEL SSD1963_5, LANDSCAPE, 12, 21 OPTION TOUCH 18, 14 GUI CALIBRATE 0, 3930, 0, -37000, 2147483647 OPTION SDCARD 52 OPTION RTC 43, 44 Flash: 68K (67%) Program (1095 lines) 26K (25%) 8 Embedded Fontss 6K ( 8%) Free RAM: 8K ( 8%) 15 Variables 0K ( 0%) General 89K (92%) Free 5.041 device:Micromite Plus ver:5.041 --------------- Font 1 internal Size:8x13 zoom:1 Font 2 internal Size:12x20 zoom:1 Font 3 internal Size:16x24 zoom:1 Font 4 Font #3 bold Size:16x24 zoom:1 Font 5 internal Size:24x32 zoom:1 Font 6 internal Size:32x50 zoom:1 Font 7 Sinclair_S Size:8x8 zoom:1 Font 8 (6x8) Size:6x8 zoom:1 Font 9 LCD (16 chrs) Size:32x46 zoom:1 Font 10 Ubuntu Size:24x32 zoom:1 Font 11 tiny font Size:4x6 zoom:1 Font 12 Misc_12x20 Size:12x20 zoom:1 Font 13 Dingbats1_XL Size:32x24 zoom:1 Font 14 PCgraphicsFont Size:8x8 zoom:1 2019-06-02_183137_test_fonts_mm+.zip |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9755 |
Bonjour. ![]() Yes, I thought this bug was squished a few versions back, but I cannot get past this point. Smoke makes things work. When the smoke gets out, it stops! |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
with new version (5.05.02) all is ok |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |