I think only my first timer message is being picked up by my GetMsg() loop, as I'm getting events stuck in the queue
Some possibly stupid thoughts, as my memory of timer stuff is rusty:
What do you mean by "events stuck in the queue"? TIMER events? Or other events which should be picked-up when the timer event happens?
Regarding "only my first timer message", as I recall, when you make a request to timer.device, this gives you a SINGLE event, rather than a repeating one. So if you are slow to handle the timer event (and thus slow to start the next timer request), then your 'repeating' timer will gradually fall behind real time.
Kas1e wrote an article demonstrating how to make a reliable repeating timer, by generating a soft interrupt: Your soft interrupt handler to picks-up the timer interrupt as soon as it happens & starts the next timer immediately. It also sends a signal to your main program (and potentially also incrementing a shared counter), telling it the timer event occured. Your program then handles the timer signal when multitasking allows.
I'm not setting a "repeating" timer, various things are queued up and acted upon when they come back in. event A at T+2s event B at T+30s event C at T+1s etc are all sent to the timer as individual requests.
When A and C end up coming in together I *think* only the first one is being picked up, although I can now see my getmsg loop picking up multiple messages so it's likely to be something more complicated.
All the timers are AbortIO()/WaitIO()d after they arrive at the message port or before the IORequests are re-used (mostly they don't get re-used, only when something is re-scheduled - and I don't think reusing them is the problem, as if I modify to completely delete and recreate the requests instead I get the same result).
Edited by Chris on 2016/8/11 0:19:19 Edited by Chris on 2016/8/11 0:31:18
Exec IO requests are tricky. If you have have received back a request and GetMsg()ed it, do not do the CheckIO/AbortIO/WaitIO stuff, otherwise the WaitIO could Remove() the request a second time (it was already removed by GetMsg() call).
Set some req->timer_pending flag to TRUE when calling SendIO(), set it back to FALSE when GetMsg()ing, and do the CheckIO/AbortIO/WaitIO only if timer_pending is TRUE.
@Georg It's great when someone supplies a small detail solves solves a big problem that might have otherwise been impossible to solve. Thanks for helping.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
@Chris I am happy to report that I am able to visit SourceForge with Build 3652, thanks
Also, NetSurf has been rock-solid since I stopped using Public Screens (and used it's Own Screen instead). So Public Screen usage is definitely badly bugged.
P.S. It would be helpful if Alt+Left/Right (inside a text-editing box) skipped words like it does with other Amiga programs. And if Ctrl+Left/Right highlighted characters. And if Shift+Left/Right skipped to start/end of the line. And if Home/End go to the start/end of line (rather than of the document).
Also, NetSurf has been rock-solid since I stopped using Public Screens (and used it's Own Screen instead). So Public Screen usage is definitely badly bugged.
Try 3653. You're the only person I know who uses the Screen Prefs screens. I think it is the auto open/close that is the problem. If so, it should be fixed now.
Quote:
P.S. It would be helpful if Alt+Left/Right (inside a text-editing box) skipped words like it does with other Amiga programs.
It does.
Quote:
And if Ctrl+Left/Right highlighted characters.
There is no keyboard highlighting tmk, that will need a feature request.
Quote:
And if Shift+Left/Right skipped to start/end of the line.
It does.
Quote:
And if Home/End go to the start/end of line (rather than of the document).
Admittedly this one is programmed differently from the standard, and that was intentional. Home/End going to the start/end of a document makes more sense and matches the pictures on my keyboard
I think if I change them it will stop the ability to get back to the top of a web page by pressing "home", which I'd rather keep, even if I always forget I can.
Try 3653. You're the only person I know who uses the Screen Prefs screens. I think it is the auto open/close that is the problem. If so, it should be fixed now.
I use a "Screens Prefs" created public screen for all my Internet Apps. The screen opens when I start Odyssey and an old button bar program from OS4Depot called ScriptLauncher. Since I start Netsurf with ScriptLauncher on the already open public screen and never quit Netsurf last, I never noticed any screen related problem with Netsurf. However, I just tested closing Netsurf last with build 3650 and got a system freeze. I switched to build 3653 and there is no problem or freeze if I quit Netsurf last. Thanks for the fix for a problem I hadn't yet noticed
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
@Chris I just logged on to Amigaworld with build 3653 and it accepted my password with no problem. Maybe some fix made after Netsurf 3.5 resolved that problem or there is some other issue involved. The only problem I've encountered when logging into Amigaworld is when I'm already logged in with a different browser.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
I'm testing as I write this post with Netsurf and Alt, Shift and Ctrl have no effect on left/right arrow keys. The cursor just moves left or right one position at a time no matter what. However, Home/End takes me to the top or bottom of the text; which I like.
I also just tried to Preview my post and when I move the pointer over the "Preview" button I see a message at the bottom of the browser that states: "Warning: Button can not be activated". I get the same message when I move the pointer over the "Cancel" button. It looks like my only choice is to "Submit" this message. Testing with build 3653.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
I also just tried to Preview my post and when I move the pointer over the "Preview" button I see a message at the bottom of the browser that states: "Warning: Button can not be activated". I get the same message when I move the pointer over the "Cancel" button. It looks like my only choice is to "Submit" this message. Testing with build 3653
This happens when JavaScript is not available (the same thing happens if you disable JS in Odyssey).
Even if you enable JS in NetSurf, it's JS may not be good enough (yet).
Quote:
I just tested closing Netsurf last with build 3650 and got a system freeze. I switched to build 3653 and there is no problem or freeze if I quit Netsurf last.
Since it works for you, but not xenic or me, I suspect you have a different system setting to us... although what it is, I can't guess.
P.S. After I post a reply on Amigans.net, it takes me to the thread, but does not scroll to where my new post is. i.e. It doesn't seem to receive the #id part of the URL (does it strip it?).
This happens when JavaScript is not available (the same thing happens if you disable JS in Odyssey).
Maybe so, but it seems strange that the "Submit" button works but the other 2. don't. At Amigaworld the Submit, Preview and Cancel buttons work but the small buttons above the edit area (like "quote") don't do anything at all.I can live with small glitches as long as the program doesn't freeze or crash.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
Ah, OK, just re-tested and it only works with the right-hand shift/alt keys, not the ones on the left. Hmm. That should be easy to fix. I hadn't noticed because I always use the keys nearest the cursor keys.
edit Fixed.
Quote:
P.S. After I post a reply on Amigans.net, it takes me to the thread, but does not scroll to where my new post is. i.e. It doesn't seem to receive the #id part of the URL (does it strip it?).
No.. but... testing... edit well, it took me to the blank page forum bug, however there isn't a #fragment in the URL.
This sort of thing used to work, it broke way way back. I flagged it up at the time and was told it wasn't likely to get fixed any time soon. There might be a bug report still open, I can't remember if I ever raised one.