Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:37 12 Nov 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 : Invalid font #10...

     Page 2 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 12:49pm 29 Oct 2017
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 03:24pm 01 Mar 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 3308
Posted: 04:10pm 01 Mar 2018
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 07:14pm 01 Mar 2018
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9755
Posted: 10:03pm 01 Mar 2018
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 07:53am 02 Mar 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 3308
Posted: 01:37pm 02 Mar 2018
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 02:11pm 20 Mar 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 188
Posted: 02:14pm 20 Mar 2018
Copy link to clipboard 
Print this post

That’s a strange one...

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 08:25am 21 Mar 2018
Copy link to clipboard 
Print this post

  GoodToGo! said   That’s a strange one...

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: Australia
Posts: 188
Posted: 08:00am 23 Mar 2018
Copy link to clipboard 
Print this post

  rhiemann said  

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



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



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: Germany
Posts: 12
Posted: 10:13am 23 Mar 2018
Copy link to clipboard 
Print this post

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
Edited by rhiemann 2018-03-24
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 11:20am 23 Mar 2018
Copy link to clipboard 
Print this post

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! Edited by GoodToGo! 2018-03-24
...... Don't worry mate, it'll be GoodToGo!
 
rhiemann
Newbie

Joined: 24/11/2017
Location: Germany
Posts: 12
Posted: 08:54am 04 Sep 2018
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9755
Posted: 09:31am 04 Sep 2018
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9755
Posted: 06:42am 02 Jun 2019
Copy link to clipboard 
Print this post

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



Edited by Grogster 2019-06-03
Smoke makes things work. When the smoke gets out, it stops!
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 08:32am 02 Jun 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9755
Posted: 08:36am 02 Jun 2019
Copy link to clipboard 
Print this post

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: France
Posts: 435
Posted: 09:35am 02 Jun 2019
Copy link to clipboard 
Print this post

with new version (5.05.02) all is ok
 
     Page 2 of 2    
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