cancel
Showing results for 
Search instead for 
Did you mean: 

Help with an internal assert failure

brianshankland9
Associate II

I'm getting what looks like assert failures while running a TouchGFX project in Visual Studio.

Its happening on two of my designed screens out of 12 so its likely something I've created but need a hint of where to look for the fault.

It happens as soon as the page is switched to so part of its initial draw.

In case the image is too small the assert looks to be raised while performing a TestArea draw:

ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 404 C++

Any clues to which property combination I may have set incorrectly in the Designer much appreciated.

The only changes made to the gui generated files have been to *** in missing #includes for widget buttons, and this has been working for all other screens.

8 REPLIES 8
Martin KJELDSEN
Chief III

The assert in LCD::drawStringInternal() is

assert(false && "Unknown character used in wildcard string. Make sure that all used characters are included in the texts.xlsx file. Read the text database section in the documentation for more information.");

Are you trying to render a TextArea with wildcards?

/Martin

Hi Martin, Yes, most of my text areas are wildcards, only a few common headers are ResourcIDs Could this be related to the font error I’ve already raised when it reports I’m missing characters although they are all defined as wildcards? I thought if a character was missing it would use the Fallback Character “?�? I’ve seen this in action on my earlier projects before I added in wildcard ranges. All my fonts have fallbacks set (this is the same project as the one I dropboxed to you earlier) the failing screen is NetworkSetup2 I now have seen a debug window is being shown (hidden behind app) It has the message “WARNING: Skipping character ‘p’ (Unicode 0x0070=112)“ for one of my screens and also “WARNING: Skipping character 'Ã' (unicode 0x00C7=199)�? for the other. regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
The only thing special about these two screens is that they are using WingDings2 font. I don’t allocate wildcards for this font since the four characters I use are Resource IDs (see below) I also note that the Wingding font name is not displayed correctly in the Translations table, maybe a hint of the issue? [cid:image001.png@01D4D97B.E4421D90] [cid:image002.png@01D4D97B.E4421D90] regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
I tried adding the four special wingding characters to the wildcard column but it did not make a difference. One other strange thing I see is in the Text Single use table (not something I’ve looked at before). In my Keyboard container the keys are wildcards set for Calibri42, but I’m seeing lists of single use entries with blank Location/Widget columns and these look like the entries that are reported in my previous font error report. (image 1 below) I can also see other possible problems with entries in the Text single use table (Image 2) Before I created a container for the keyboard there were controls in the screen KeyboardEntry, now all removed and replaced by the keyboard custom container widget. But I can still see old entries in the Text single use table and they are using Calibri50 which I don’t use anymore and does not have wildcards set for it. As I don’t think I even have any text set for Calibri50 in my project now so what would happen if I just deleted it? In order to remove these can I manually edit the texts.xlsx file and then the designer will work correctly once it reloads this changed file (will take a project copy first in case I mess things up) Image1: [cid:image001.png@01D4D97E.3B9FEBB0] Image 2: [cid:image002.png@01D4D97E.3B9FEBB0] regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
Hello again, Have manually checked the project and all the Calibri50 text entries don’t exist in the project so they must be “ghost�? entries left when previous widgets were deleted from the screens. So the question is how can I remove them? If it requires custom file editing would you be able to correct the project and email back or do you have a beta of the designer that would fix this that I can install on one of my text bench machines to do the repair. The thought of having to restart the project from scratch and enter in the 11 screens and 4 custom containers does not feel appealing, let alone when I tell my MD that I have to repeat last week’s work again. regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
I’ve started to look “where wizards fear to tread�? inside the project file to see if there is a way to edit out the erroneous text entries in a safe manner. Looking at the button “IPAddressButton�? from within the NetworkSetup3 (extract below) screen I see that the text component uses text reference “SingleUseId75�? which is correctly set to the CalibrLight36 font. However the wildcard also has a text reference of “SingleUseId76�? which is using the font Calibri50. There is no control to change the font of the wildcard entry to something different from the text entry so it must have inherited it as the button was cut & paste from another screen and it may have been a ResourceID at that time. So I can see two options to try and resolve my project to a working state: 1. Go through the project file and set the TextId entries for all of the wildcards to match that of the TextId of their parent control 2. Go through the text.xlsx file and change the entries for the wildcard singleuse entries to use the same entries as their parent control So you think either of these will work, and which would be the safest or most likely to ensure a future designer correctly cleans itself up? { "Alpha": 255, "ButtonTrigger": { "Type": "ClickButtonTrigger" }, "ButtonStyles": [ { "Type": "TextButtonStyle", "X": 0, "Y": 8, "TextId": "SingleUseId75", "TextRotation": "0", "Wildcard1": { "TextId": "SingleUseId76", "UseBuffer": true, "BufferSize": 20 }, "ColorReleased": { "Red": 255, "Green": 255, "Blue": 255 }, "ColorPressed": { "Red": 255, "Green": 10, "Blue": 10 } }, { "Type": "ImageButtonStyle", "X": 322, "Y": 0, "LockFlexButtonToImageSize": false, "ImageReleased": "blue55right.inc.png", "ImagePressed": "yellow55right.inc.png" }, { "Type": "IconButtonStyle", "X": 0, "Y": 0, "IconReleased": "blue55left.inc.png", "IconPressed": "yellow55left.inc.png" }, { "Type": "BoxWithBorderButtonStyle", "X": 0, "Y": 0, "Width": 330, "Height": 55, "LockToFlexButtonSize": true, "BorderSize": 0, "ColorReleased": { "Red": 0, "Green": 176, "Blue": 240 }, "ColorPressed": { "Red": 255, "Green": 255, "Blue": 0 }, "ColorBorderReleased": { "Red": 0, "Green": 176, "Blue": 240 }, "ColorBorderPressed": { "Red": 255, "Green": 255, "Blue": 1 } } ], "Name": "ipAddressButton", "X": 310, "Y": 230, "Width": 330, "Height": 55, "Type": "FlexButton", "Visible": true, "Draggable": false, "Clickable": false, "Fadeable": false, "Moveable": false }, regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
Good Morning, Have some update info. I edited the excel sheet changing all of the Claibri50 entries to the same font settings as the parent control. I then loaded Designer and removed the Claibri50 font since it now indicated zero uses. This fixed the problem of the designer errors indicating missing wildcard characters. I note that the error was reporting the font of the parent control and not the Claibri50 which was what was causing the problem. However this has not fixed the assert issue so the font issue was not directly related. I assume the fault is being raised within the library so I can’t try and investigate to follow back the assert to the root configure in the designer to get at least a workaround? regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>
I ran a small experiment project using a flexbutton. The text component was set for a large font The content was changed to to allow wildcard use The wildcard text was entered The text component was changes to a small font Within the project file the singleresource for was set for the small font, while the one for the default wildcard text was set for the large font. I tried performing different changes to the text but it appears that the wildcard resource is set to the font when it is first created, and does not change regardless of font changes to its parent. regards _________________________________________________­_ Brian Shankland Icon Research Ltd 3 Raw Holdings | East Calder | West Lothian | EH53 0HY | UK T: +44 1506 885000 Ext 226 F: +44 1506 885501 www.iconresearch.co.uk<>