ZeroPain: Failed to write log file : Size limit reached
David Pitt (3386) 1248 posts |
Well spotted! On the Titanium my test piece, ZeroPain’s ReadMe/txt has this, “ZeroPain traps most attempts to read page zero and emulates the operation, providing a safe level of compatibility with the old memory map”. It rather looks as if this has found its way into the ROMs. The only function of the ZeroPain module would be to log the events. Another answer to the original question would be to remove the ZeroPain module.
Something will have been in the cvs change logs, but I missed it or failed to understand. Again from ZeroPain’s ReadMe/txt, “Since relocating zero page is very beneficial to the stability and security of the OS, the goal is to have the feature enabled for all future stable releases, starting with RISC OS 5.24”. It looks as if ROOL has only gone and done it
Yes, but… There is stuff out there that still requires a low vector ROM, Sunfish for example. |
Martin Avison (27) 1494 posts |
See https://www.riscosopen.org/wiki/documentation/show/OS_Memory%2020 for how to turn Compatibility mode on and off. Also see https://www.riscosopen.org/forum/forums/11/topics/9460 for some clarification of the 3 modes of operation. |
Steve Fryatt (216) 2105 posts |
Thanks… I thought that I’d seen something, but clearly didn’t manage to find the correct search terms to jog my memory!
It does? Sunfish runs happily on this high-vector ROM, and has done since I went over to high-vector in 2015. |
Steffen Huber (91) 1953 posts |
As Steve correctly said, the latest version of Sunfish runs without problems with high-vector configuration. Are there any examples of software NOT working with ZeroPain or the new “compatibility page” configuration, but working with low-vector? The only pieces of software I know of that (understandably!) had problems with this were Aemulor and ADFFS. So if someone has examples – please name them. |
David Pitt (3386) 1248 posts |
It does!
It fishes OK but menu operations can sink it. |
Steve Pampling (1551) 8170 posts |
There is stuff out there that still requires a low vector ROM, Sunfish for example. Last compiled info from cp15 site: “Version 2.05 22-May-10” – are you on that or the Chris Gransden patch version from 2013? (just a RunImage drop in) Edit:
IIRC that was the bit that Chris fixed. |
David Pitt (3386) 1248 posts |
Sunfish crash. |
Rick Murray (539) 13841 posts |
[…]
I think we’re getting mixed up between different things and different modes of behaviour. To take the Sunfish crash, it is obvious why looking at the log. The faulty instruction is Without ZeroPain and with the compatibility page (which a seriously hope is the boot up default), these problems should “magically disappear”. They’re still there, of course, but the effects will be the same as for previous (low vector) ROMs. There should be very few programs that require high or low vectors. Steffen has named the only two I can think of. Any other failures will be due to bugs, and this is why I hope compatibility mode is the default unless something says otherwise. Leave things looking and feeling as before in as much as Is possible.
I never entirely figured out why moving a lump of read only memory was so beneficial when there are such glaring issues as…the entire RMA… I get the “freedom to twiddle the OS vars in page zero” bit, but since that’s not exactly been publicly documented….. Software ought to be using the API, not poking around in system workspace.
Yes, the developers who are still maintaining their software have been outstanding in this respect, and there’s no doubt that huge numbers of bugs have been addressed. However where does this leave the software that isn’t being actively maintained? I would imagine there is just as much of this around as there is fixed software.
Me neither, not if compatibility mode is the default setting. The developers and more geeky users can then choose to enable pain logging for testing and developing, much as they do now. And I pretty much doubt anybody will want the Draconian option. ;-) Doing it like that will satisfy everybody. Logging options for us, and the rest can Keep Calm And Carry On Blissfully Unaware. |
Steve Pampling (1551) 8170 posts |
If I write something that works most of the time but fails as soon as the year changes is that working or broken and in need of a fix? |
David Pitt (3386) 1248 posts |
NewsUK 1.28 (11-January-15) WeatherUK 1.09 (4-April-18) Both from the PlingStore and same developer. This was recently raised on csa.apps. |
Steve Fryatt (216) 2105 posts |
So, how benign is WeatherUK when running on a low-vector ROM? We reckon it’s calling |
David Pitt (3386) 1248 posts |
Clicking Select on the iconbar icon gets the weather for Ormskirk.
That is rather the point, ZeroPain does not fix everything. From the ZeroPain ReadMe, “Some infrequently used instructions, such as LDRD, are also not dealt with. In these cases a data or prefetch abort will be raised as normal, and the program will most likely terminate with an error”. The key term is “infrequently”. |
Steve Fryatt (216) 2105 posts |
As you well know, that wasn’t the question being asked.
That’s irrelevant with the compatibility page, however, as the documentation of So, the question again: what, exactly is WeatherUK doing that isn’t picked up by having the compatibility page present? Is it trying to read from an address outside of the page which happens to be there with the low vector ROM? And with a low vector ROM, there’s still the question of what it then goes on to do with the data that has been read. Unless it does nothing, which is why stuff like
can be ignored1 if there’s a compatibility option in place, are we certain that it doesn’t then go on to attempt to manipulate the window that it’s just failed to look up? 1 Although I’d still argue that they should be fixed in any future updates to the code. |
David Pitt (3386) 1248 posts |
No. I managed to interpret it as was there any other manifestation of trouble when running with low vectors. |
Steve Pampling (1551) 8170 posts |
Strange, I got the impression that the point you were trying to make was that there are still people developing items and doing their testing on low vector builds instead of developing items and testing them on high vector. Clearly if Malcolm had done the latter there wouldn’t even be a problem application for you to point at. |
Tristan M. (2946) 1039 posts |
If ZeroPain writes are a concern, couldn’t it be alleviated to some degree by writing the log to a RAMdisk? This thread reminded me to check my log. Apparently I totally failed to remember ZeroPain exists since last year some time. So, when one builds their own ROM, where would they find an up to date copy of ZeroPain? I leave my system running for weeks at a time without a reboot sometimes, and it does quite a few ROM builds a day, and is always running other things too. Crashes are pretty much nonexistent. I guess stability without it is getting better. |
David Pitt (3386) 1248 posts |
It is in the relevant beta ROM downloads, including the Pi ROM downloads, or cvs The current version is ZeroPain 0.07 (19 Aug 2017). |
François Vanzeveren (2221) 241 posts |
Hi I am unable to follow all these technico-philosophical discussions regarding ZeroPain. If my system is stable with the application I use, I guess that I can safely redirect logs to null: am I right or wrong? Regards François |
Steve Pampling (1551) 8170 posts |
So my question is: why would redirecting ZeroPain logs to null: an issue for me if my use of RiscOS is Both right and wrong :) If you are a general user then not seeing the ZeroPain logs because you sent them into a digital black hole doesn’t affect you, however if you have some strange behaviour and the developer needs to see any possible logs you don’t have any to show. So then we come to the developer being you and you want all the log information you can get to find out what went wrong on your last iteration of your code so then you start swearing at yourself for disabling the logging… |
David Pitt (3386) 1248 posts |
That is right, the logs can safely be redirected to P.S. As I understand it with OS5.24 the default will be not to log. That functionality is now in the beta OS5.23 and is in use here working just fine, no ZeroPain module, no logs. I expect that will get announced at the time. |
Steffen Huber (91) 1953 posts |
The simplest advice I can give is: ZeroPain helps you and other developers to identify and possibly fix buggy software. Inspect the logs it writes regularly and inform other developers if you encounter bugs in their software. Nobody is perfect, and writing software in C is error-prone. The errors logged via ZeroPain are typical programming errors. It makes no sense to pretend that they are not there. |
Steve Fryatt (216) 2105 posts |
So my question is: why would redirecting ZeroPain logs to null: an issue for me if my use of RiscOS is The reason that this is such an issue is because NULL pointer dereferencing is so common in C. If you never make mistakes then you don’t need the ZeroPain output, but otherwise the logs can tell you that there’s a bug in your code and also point to where it is. IMHO, all development and testing should be done on high-vector ROMs with ZeroPain active, because if the developer catches their bugs, the users don’t have to. |
Rick Murray (539) 13841 posts |
FTFY. |
Rick Murray (539) 13841 posts |
If your software appears to work correctly, then it is “mostly okay” to discard the error reports. There is something wrong, but that wrongness is no less wrong than it has been up until now. However…
This is where ZeroPain is useful. It is fairly typical to group together logical tests of stuff such as: if ( (message.action != 0) && (message != NULL) ) { ...exciting stuff... } Makes sense, right? Make sure there’s a message and handle it. Problem is, if message is NULL, what the hell is message.action pointing at? This problem is pretty widespread, and I’m sure I’ve made the same mistake a bunch of times. Also… mystruct *thingy = NULL; ... thingy.whatever = BUSY; If you have complex or convoluted code paths, it isn’t out of the realms of feasibility of addressing an array before it has been passed through malloc()/calloc(). As everybody else has said, if ZeroPain raises issues in YOUR software, then something is wrong and that will need to be fixed (with ZeroPain’s log basically handing you a map to where the problem is). Don’t be offended, you can have zero pain in BASIC and assembler, but the general behaviour of C makes it child’s play to end up with inadvertent amounts of pain. Consider it to be a development aid, not an annoying nanny shouting at you. :-) |
Steve Pampling (1551) 8170 posts |
That needs rephrasing. “If ZeroPain records a bad event caused by YOUR software, then something is wrong and that needs to be fixed (with ZeroPain’s log basically handing you a map to where the problem is).” Now if someone hands you a free map to lead you out of a maze why would you bury the map? |