I give up!
Simon Willcocks (1499) 520 posts |
I wrote a bug into my kernel somewhere. That’s perfectly normal and common, I do it all the time. What gets me is the symptom. It was crashing part way through displaying the Wimp start up screen, where it says “RISC OS Developments Ltd.”, “RISC OS 5”. There’s a memory fault accessing zero page after printing the second I. It turns out that even without the Wimp, painting “RISC OS” with that font (Homerton.Bold, 24 point) demonstrates the same problem. That’s not all, though. It gets worse! Painting “R SC OS” works! Editing the template in Desktop to “R SC OS” works! How am I supposed to track that down? Apologies for the rant, I’m a tad frustrated. I don’t suppose anyone has seen anything similar in the past? |
Piers (3264) 45 posts |
Turn on/off the font cache? Try the character with a transform to change its, say, width. Might be OS_Heap? Log the exact size of the heap increase due to that character in that size font. I’m assuming that’s how the cache is managed. I haven’t checked. |
Simon Willcocks (1499) 520 posts |
Even “RiSC OS” works! It’s very confusing. I expect I’ve made a mistake in the service calls from expanding DAs. It can wait. |
Piers (3264) 45 posts |
A lower case letter, at that size, will be a different bitmap size. |
Simon Willcocks (1499) 520 posts |
Yes, of course. Also a different number of curves. The thing is that I haven’t changed the FontManager code, so it must be something I’ve done. Edit: “RUSC OS” also fails. |
David J. Ruck (33) 1636 posts |
Just display it as RiSC os, can’t be any worse than JaGUar :) |
Simon Willcocks (1499) 520 posts |
I think I’ll try to track the bug down instead, tyvm! |
Simon Willcocks (1499) 520 posts |
OK. So. Turns out there are two different The former consists of the kernel having knowledge of the FontManager (it calls the publically undocumented The latter, unused except by me because the legacy kernel initialises the dynamic area in Oh, joy! |
Rick Murray (539) 13850 posts |
🤦 Undocumented stuff “for internal use only” is naff and lazy.
Put the kettle on, you’ll need tea for this. Lots and lots of tea. |
Simon Willcocks (1499) 520 posts |
I think this patch fixes the DA handling in the module, at least on startup and probably on expanding the DA size. I didn’t look at shrinking.
|
nemo (145) 2556 posts |
Sorry I didn’t see this earlier. Font_ChangeArea is disappointing, but here we are:
In fact the Kernel Font Cache Handler was removed from RO4.3 in 2002 so the Font_ChangeArea SWI became obsolete then but has persisted in RO5 for the usual hysterical raisins. FontManagers therefore have to adapt to whether the Kernel is managing the FontCache DA (via Font_ChangeArea) or has to do it itself. And they do: i.e. FM’s built-in DA Handler has been used for 22 years. Bear in mind that “FontManager” may not be the module you are expecting. You can only rely on the API. |