Home  |  Contents 
Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Invalid font #10... Post ReplyPost New Topic
Page of 2 Next >>
Author
Message << Prev Topic | Next Topic >>
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5061
Posted: 01 September 2017 at 12:34am | IP Logged Quote Grogster

Anyone else seeing this?

MM+ ver 5.0405

I keep getting this message when calling GUI pages - but I am not using any font #10.
Font #10 does not exist, either in the library or in any other form.





Font #10 is not referenced in any GUI pages, including pages 7, 8 and 4.
I do use fonts 7,8 and 4, but I don't use a font #10
Fonts 7 and 8 are in the library.

EDIT: Relevant GUI page code....

Quote:
'---------------------
GUI Setup 4 'EXIT and OK buttons for any page
Font 7,2
GUI button BU_EXIT,"EXIT",75,400,200,50,RGB(blue),RGB(gray)
GUI button BU_OK,"OK",525,400,200,50,RGB(red),RGB(gray)
'---------------------
GUI Setup 5 'Confirm delete/disable entry
Font 7,3
GUI DISPLAYBOX CONFIRM,0,0,MM.HRES,75,RGB(Cyan),RGB(BLACK)
CtrlVal(CONFIRM)="CONFIRM DELETE!"
Font 4,1
GUI Caption CAP_CD_CFD,"Touch OK to confirm delete, or EXIT...",100,225,LT,RGB(red),RGB(White)
'---------------------
GUI Setup 6 'Menu buttons 1-3
Font 7,2
GUI button BU_MENU1,"1",50,200,75,50,RGB(BLACK),RGB(gray)
GUI button BU_MENU2,"2",50,275,75,50,RGB(BLACK),RGB(gray)
GUI button BU_MENU3,"3",50,350,75,50,RGB(BLACK),RGB(gray)
'---------------------
GUI Setup 7 'Database (create an entry)
Font 7,3
GUI DISPLAYBOX DB_CREATE,0,0,MM.HRES,75,RGB(red),RGB(BLACK)
CtrlVal(DB_CREATE)="EDIT DATABASE:"
'---------------------
GUI Setup 8 'Village Area radio buttons
Font 4,1
GUI Caption CAP_VA_SEL,"Touch radio button to select AREA...",150,100,LT,RGB(Cyan)
Colour RGB(Green)


EDIT: MMEDIT finds no reference to font #10 anywhere in the code:






Edited by Grogster on 01 September 2017 at 12:44am


__________________
Smoke makes things work. When the smoke gets out, it stops!


Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
KeepIS
Regular Member
Regular Member
Avatar

Joined: 13 October 2014
Location: Australia
Online Status: Offline
Posts: 90
Posted: 01 September 2017 at 12:59am | IP Logged Quote KeepIS

EDIT Wrong INFO:

This is the code that causes the error and doesn't work for me in "plus MMBasic Ver 5.04.05" on an E100. I'm not concerned as I just list the controls instead.

GUI REDRAW ALL

Error: Invalid Font number #13

GUI REDRAW XX or GUI REDRAW X1,X2,X3 is OK.

Your error may be another variation of this?

Mike



Edited by KeepIS on 01 September 2017 at 1:07am


__________________
It's all too hard.
Back to Top View KeepIS's Profile Search for other posts by KeepIS
 
KeepIS
Regular Member
Regular Member
Avatar

Joined: 13 October 2014
Location: Australia
Online Status: Offline
Posts: 90
Posted: 01 September 2017 at 1:09am | IP Logged Quote KeepIS

Updated my last post - Reason - wrong info:

__________________
It's all too hard.
Back to Top View KeepIS's Profile Search for other posts by KeepIS
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5061
Posted: 01 September 2017 at 1:15am | IP Logged Quote Grogster

Hi there. Thanks for posting. It's nice to know I am not insane.

Yes, this is indeed very interesting.

I reflashed the PIC32 to 5.0405 to be totally sure I did not have corrupted flash or something, but same problem, so I suspect a bug.

I have been able to narrow it down.

In line 700 - PAGE 7,8,4, if I make that PAGE 7,8, it falls over with the same error, but if I make that PAGE 7 this works just fine - no font #10 error message.

Naturally, this means some pages of GUI are not there, but the purpose of this test, was to try to home in on where the problem is.

Next thing to try was some console commands, and it seems to be directly linked to my attempts to call GUI page 7. I can call any other page I like - no problems, but as soon as I call page 7, I get the error:





EDIT: MOST strange. Now I put the PAGE 7,8 back and it worked. So I changed it again to PAGE 7,8,4 and now THAT works, and everything works as it should.

I have not altered the code(other then playing with line 700), I have not changed the library. WTF?

Edited by Grogster on 01 September 2017 at 1:20am


__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
KeepIS
Regular Member
Regular Member
Avatar

Joined: 13 October 2014
Location: Australia
Online Status: Offline
Posts: 90
Posted: 01 September 2017 at 1:26am | IP Logged Quote KeepIS

Hi, it appears to change with code, I also use PAGE's 1 to 9 in my code and I have no problems with any Page, however Page 9 is not declared as I use it for the CLS command to not wipe out the GUI on the current or new page.

IE:

 Page 9   'dummy page
 CLS
 Page 2   'new GUI page 


I read somewhere that CLS was supposed to preserve the GUI Page, but it does not do that for me, I found the above code works if I need to use CLS.

Mike.

EDIT: Actually CLS does a GUI HIDE ALL, so you would use GUI SHOW ALL after it but
switching a dummy page is easy.

Edited by KeepIS on 01 September 2017 at 1:29am


__________________
It's all too hard.
Back to Top View KeepIS's Profile Search for other posts by KeepIS
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5061
Posted: 01 September 2017 at 1:32am | IP Logged Quote Grogster

Hmmmmmmmm - MOST interesting.

I have taken the chance at this point in time, to use IPE to read the entire chip with it's currently-working code, and setup.

The hope being that if this happens again, I can reflash to where I am now, and hopefully just continue on from there. Saves having to reflash, then configure all the peripherials, load the initial code, load the library etc....

This may or may not actually help later on if the bug changes with code as you suggest, but I feel this is at least one base covered.

Edited by Grogster on 01 September 2017 at 1:32am


__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
GoodToGo!
Senior Member
Senior Member
Avatar

Joined: 23 April 2017
Location: Australia
Online Status: Offline
Posts: 122
Posted: 01 September 2017 at 2:34am | IP Logged Quote GoodToGo!

Hey Grogs,

Sounds remarkably similar to the issue I had back in June..... Page 3 invalid font

Never got it sorted out, ended using a different page number....

Good luck!

GTG!

__________________
...... Don't worry mate, it'll be GoodToGo!
Back to Top View GoodToGo!'s Profile Search for other posts by GoodToGo!
 
panky
Guru
Guru
Avatar

Joined: 02 October 2012
Location: Australia
Online Status: Offline
Posts: 394
Posted: 01 September 2017 at 4:50am | IP Logged Quote panky

@GoodToGo,

Just tried your program referred to in the link and it works fine under 5.04.05 on an Explore 100 and an MZ144.

@Grogster

Can you provide some working code example of the failure (I can not see anything wrong looking at your code snippit).

panky


__________________
DonTSM1,Duinomite,CGCMM1,CGCMM2,2xDimitech,3xWWuMites,MicksMuP,Grogster1A,4xPeterMuM+,Zonker DIP-600,3xCGuKits,CGuBoard2,SnadPic100,SCBP64 & Exp100,PMMZ144,PMMZ100 .. and loving it![:D
Back to Top View panky's Profile Search for other posts by panky
 
KeepIS
Regular Member
Regular Member
Avatar

Joined: 13 October 2014
Location: Australia
Online Status: Offline
Posts: 90
Posted: 01 September 2017 at 8:03am | IP Logged Quote KeepIS

I think if you read his post's he said it now works correctly, so yes that code will work as there is nothing wrong with it, but sometimes for no reason it can stop and throw a stupid incorrect error, I have had the same thing happen with some GUI code.


__________________
It's all too hard.
Back to Top View KeepIS's Profile Search for other posts by KeepIS
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 01 September 2017 at 10:13am | IP Logged Quote Geoffg

There is something wrong here as a number of people have had "Invalid font" errors which seem to come and go at random. I have run the suspect code from some of them but it never caused an error for me. Regardless, there are too many reports like this for it to be some random cosmic ray strike.

I'm camping in the outback at this time but when I get back to civilisation I will try again to find out what is going wrong. If anyone can reliably demo this problem with a short bit of code I will be eternally grateful.

Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5061
Posted: 01 September 2017 at 12:15pm | IP Logged Quote Grogster

@ GoodToGo - Yes, I remember that thread now! Re-reading it now, I see I even posted that I have a big program with lots of pages and no problems. Now it is this same big program with lots of pages that is doing that odd invalid font message - I posted too soon!

@ Panky & KeepIS - Yes, was not working, then suddenly started working again and I don't know why. Very strange stuff.

@ Geoff - I will post code if I can make it happen simply, but I think GTG's code in the other thread is about as simple as you could possibly get:





__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5061
Posted: 06 September 2017 at 4:21am | IP Logged Quote Grogster

Here is another shot of the problem - it appears to be self-correcting, but only from the command-prompt:





Note that it fell over at the Font #10 thing again, and that typing PAGE 7 results in the error. Typing PAGE 8 works. Typing PAGE 4 works. Typing PAGE 7 a 2nd time, then works as it should. Typing the full PAGE 7,8,4 then works fine. Running the code then works fine.

Not sure if that helps at all, but feels like a problem calling the PAGE command more then once for certain pages. PAGE 7 was the problem last time too - not sure if that means anything.

__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 


Page of 2 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1563 seconds.
Privacy Policy     Process times : 0.05, 0, 0, 0.11