Ovation
Steve Fryatt (216) 2105 posts |
I should probably add that there are a couple of ZeroPain log entries from around the time in question, although I can’t immediately reproduce them on demand.
|
Rick Murray (539) 13840 posts |
Ovation v1.52 distribution unpacked to RAMdisc. Repeated, style name is “ertgfg fhfh” (with a space). Works okay. Document saved, Ovation quit. Document double-clicked. Styles still there. I noticed there is a “Show on menu” option in the style definition window. That is ticked, yes? Are you starting with a blank document or one already created? Update1: Noted your Pain log. Am repeating the test with latest Pi ROM and ZeroPain disabled, see when Ovation crashes… Update2: Sorry. The part I detest.1 Didn’t crash for me. :-( 1 No, really. If somebody indicates that there is a problem and I can’t reproduce it, it is very frustrating as it is very hard to fix what you can’t observe. |
David Pitt (102) 743 posts |
I have never used Ovation either but couldn’t reproduce the error as described above on my Mk2 Raspberry Pi, OS5.23 (09Jan16), and there was no pain. (Random guesswork alert. Probably not in the least bit relevant but there was the mysterious case of a POPstar fix working on a Pi but not BBxM) |
Rick Murray (539) 13840 posts |
The nearest function ID to that is findmaster and for some reason the next function ID is getguidelines. I suppose the compiler has taken upon itself to omit the function names of the in-between for some reason known only to itself. Helpful. If I have some free time I’ll see if I can track this down; however it would be great if I had something that could trigger the problem so I know better where to look. Say… did you delete or insert any pages or sections? The following code (where the problem appears to originate) is concerned with renumbering things. Unfortunately, in order to make things fast on an anciently slow machine, there is a lot of code with constructs like |
Steve Fryatt (216) 2105 posts |
Yes, chapters. Add one, delete one, add another, delete another, etc. I was experimenting with master pages, and that seemed to be the only way to make it pick up changes to the master page layout (add a new chapter and then delete the old one). I was doing a fair bit of playing around to see what Ovation could do, then found the Styles problem. I can’t, at present, reproduce it either, but I’ll keep trying. The styles thing is… odd. On the Beagleboard (a July vintage 5.23), I get the effects previously described. On the Iyonix (RISC OS 5.18), I just get the single entry of “Edit style…” in the Para. style menu and nothing else. No “Reset” and no dotted line after it. Both of those are reproducible on freshly-loaded copies of Ovation, open new document, create style. “Show on menu” is ticked. I’ve found where Ovation is setting up the menu and managed to build it from your source, so if time permits (that’s a big “if” this week), I’ll stick some debug in and have a play.
I know exactly what you mean… :-) |
Rick Murray (539) 13840 posts |
Okay, some day soon I’ll need to give that a shake and see if any bugs fall out.
Yes, it is a bit…usual. If you are modifying the initial master page of a new document, inserting a blank page before page 1 should replace page one with the updated version.
The menu code is…interesting in places. I do wonder why different machines behave in different ways? It is almost as if there is some zero page read of data that changes per machine, but that can’t be or it would have failed on the Pi.
I think I’ve tweaked the debug routines to output to DADebug, as that’s what I use here. |
Steve Pampling (1551) 8170 posts |
If my memories of using the original Ovation are correct th page insert behaviour was always a little strange.
I thought the point was that the content of zero page wasn’t a fixed absolute and that’s why it shouldn’t be accessed. If Ovation expects some condition that happens to be true on various machines but is no longer so in the OMAP3/4 machines with ZPP. It might fail in some other interesting way on another board. |
Steve Fryatt (216) 2105 posts |
Yes, I’d just found that and made it output to Reporter as well (if present)… :-) I can see roughly where the menu code is breaking, I think – I’ll let you know what I find. |
Steve Fryatt (216) 2105 posts |
The solution to the style menu problem appears to be simple: don’t have too many fonts… As Rick says, the code is… interesting… in places. However, from what I can see, c.style uses a big buffer for storing both the indirected font names in the font menu and the indirected style names (plus the “Edit style…” and “Reset” entries) in the Para. style menu. The amount of space that the writemitem() function will use in that buffer before silently returning without adding a menu item is defined by
at the top of the file. Thus if you have more fonts or style names than will fit into 4K, one or both of the menus will be truncated. The effect I’m seeing appears to be due to the fact that the font menu is written first (to fontmr), followed by the style menu (to ustylemr, which is set to point to the byte after where the font menu finished). The font menu is set to stop when there are less than 127 bytes left in the buffer, to leave space for (some of) the style menu — but if the last font name to get written was long and started 128 bytes from the end, you might not have much space left… I think that explains the difference between systems here. The buffer in question turns out to be derived from myrambuf1, which is defined in c.ram as
and seems to be shared with the RAM transfer code. I can’t immediately see any reason why MYRMAX couldn’t be set to 0×8000 to match, although I suppose there’s a chance that something else uses the space between 0×1000 and 0×8000. It hasn’t crashed here, at any rate, and I now have the expected styles in my Para. styles menu. Having both definitions share the same constant might leave less scope for future bugs to be introduced, too… I’ve not looked for the ZeroPain stuff yet… 1 Didn’t RISC OS users always mock My Documents? |
Rick Murray (539) 13840 posts |
Was probably reasonable in the days of RISC OS 2. I’ll work the changes in, though like the sprites it would surely be better to do a pass to see how much space is actually required, then alloc that. Can you send me your mods for Reporter? I’ll add those to give others more options re. Debugging. |
Steve Pampling (1551) 8170 posts |
OK, mentioning windows is baiting a bit but simply put.
1 As far back as Win95 and all the way through to today the scripting level breaks on spaces in file names and folder names so clearly it was just the windows GUI programmers that were clueless in that regard. |
Jeffrey Lee (213) 6048 posts |
A competent programmer would be aware that it’s perfectly valid for filenames to contain spaces and would make sure any filenames that are used in command line arguments are escaped correctly. However, I thought that Rick was talking about the “my” part of myrambuf/My Documents, rather than the fact it contains a space. In which case I would say that “My Computer” is the more sillier choice, because (a) it might not be your computer (e.g. work PC), and (b) it typically contains things that aren’t on your computer (such as network drives). But other than now I don’t recall publicly mocking either of the two, so maybe there’s some other ritual mocking which has been going on. |
Steve Fryatt (216) 2105 posts |
It used to be normal (and tiresome) practice in many RISC OS circles to take pops at Windows (“Windoze”) at every opportunity, and My Documents was a popular thing to disparage. Generally it seemed to be an attempt to divert attention away from comparing like with like between RISC OS and Windows, for obvious reasons. |
Malcolm Hussain-Gambles (1596) 811 posts |
@Jeffrey & Steve – That reminds me, some programmers think a pipe symbol is a good idea for a separator. That is until I flail them to death. “I’m going to go medieval on your ass”… |
Steve Fryatt (216) 2105 posts |
Indeed: Ovation development presumably stopped around 1992 or so. I still find it a bit of a shock just how hard these old C applications are to follow: things have definitely improved over the years in terms of readability with the arrival of things like OSLib. That, and the fact that it’s no longer critical to save every KB of memory that you can at the expense of ease of maintenance.
This ought to be ‘trivial’ for the styles, as all the names are a fixed size and there seems to be a style count maintained. I’m happy to take a look, and maybe send you changes from the 1.52 source, unless that’s going to cause you pain merging those with any changes that you’ve already made since that release. The only question, given that 32K buffer, is how easy Ovation makes it to claim and free blocks of memory on the fly.
Will do. Is your Yahoo email from your website the preferred address? |
Steve Pampling (1551) 8170 posts |
http://www.ringholm.com/docs/04300_en.htm |
Rick Murray (539) 13840 posts |
Steve P:
You misunderstand. Imagine there is a struct (array). Something complicated like a block of data describing where a window is on the screen. Regarding the information you linked to, section 1, first line, “strcutures”. Additionally – doesn’t GSTRANS apply specific logic to the vertical bar? Jeffrey:
I believe RISC OS “cheats” and replaces spaces with hard space.
Which is easier said than done when you can have fancy long filenames and the command line is pathetically small. I have had to revert to 8.3 filenames (“Progra~1” etc) just so I had space to pass all the required parameters to mp4box, which being a port from Linux-land expected a whole heap of parameters just to do simple stuff…
Actually, Rick didn’t mention that at all. (^_^)
I think it has been mocked for being rather patronising. Maybe it is more acceptable in these days where iOS and the like hold your hand and make all the complicated decisions for you; but back then we went from people knowing that “A:” was the floppy, “C:” was the harddisc, and “D:” was the CD-ROM……to “My Computer” and “My Documents”. That said, it came in with the introduction of Win95, which had so many more issues to shout about; and gave birth to an entire generation of so-called <censored> computer technicians that believe sincerely that “format and reinstall” is the only way to repair problems with Windows. Steve F:
Where I used to hang out, we took pops at Amiga as Windows was below us. :-P
<nods> With no useful library and the ambition to make a useful DTP package work on a 1MB machine, some things needed…to be sacrificed.
I think I’ve tweaked a few things, but nothing that should prevent updates being added.
I’ve seen stuff be malloc’d, so that’s what I did for the sprite area. Look at the size, add four, then malloc it. I wonder if the RAM buffer needs to be 32K? That looks like a lot in a program that is aiming to be small. I’ll need to search the program to see if “other stuff” uses it like the menu code.
Yup. 1 Giving my age away, there, I think. 2 Totally making me look like a crusty old fart. Well, hey, I’ve used Mosaic on Windows 3.11 so suck on that. |
Malcolm Hussain-Gambles (1596) 811 posts |
@ Steve P – “As if millions of voices cried out in terror and were suddenly silenced.” |
Rick Murray (539) 13840 posts |
Didn’t that used to be what happened after the Last Orders bell, when it finally reached Closing Time? |
Steve Pampling (1551) 8170 posts |
If your face fit the former was an interesting sound prompting you to move to the rear of the establishment and the latter was actually the closing of the door as you left to stop the draught affecting those still in there. It does get a little cool at 3-4am on a winters night. |
Rick Murray (539) 13840 posts |
Sick of stuff like this? Well, then you’ll be wanting an upgrade! 2016/02/14 v1.53RM *released* * Fixed Style menu where it could say "Kerningg". * Changed Style/Font/Size menus so that the effects happen immediately when you Adjust-click (on a selection). I don't know why this was being inhibited, the menu was changing but the actual content wasn't, which was just odd. So now it works. Tested by selecting a large chunk of text from an issue of Frobnicate and pretty much Adjust-clicking on every menu option in sight. ☺ * Fixed main editor window title routine so large filenames appear as the first nine characters followed by "..." instead of trashing the window data. * Fixed the file information window likewise, as this trashing was a lot more obvious. * Ovation will refuse to load files with filenames > 127 characters (that's the entire filename, not just the leaf). Hardcoded limits are 128 (inc. terminator) and there are places where this is strcpy'd around, so making assumptions is going to be unwise... * Allocated more space (16KiB instead of 4KiB) in a yucky kludge to get styles to work correctly when there are many fonts installed on a system. * Tweaked Ovation's WimpSlot. The least it'll start up with is 540KiB, and it claims ~80KiB on top to require 640KiB minimum... |
Chris Mahoney (1684) 2165 posts |
Of course. I *finally* get around to installing 1.52 yesterday, so naturally 1.53 is out today :) |
Rick Murray (539) 13840 posts |
Is anybody here familiar with postscript? What would be required to get the standard PS2 driver to output Unicode sensibly? |
Rick Murray (539) 13840 posts |
Hmm. Having a brief look around (as I don’t know postscript), it looks as if it has no support for Unicode, and therefore this is handled by providing truetype fonts of the required glyphs mapped in to standard character space (sort of like how the symbol font works). If this is correct, Asian language documents must be a nightmare… |
Michael Drake (88) 336 posts |
Have you seen http://www.mw-software.com/software/ps3/ps3.html ? |