Wimp Shutdown fails
Pages: 1 2
Jon Abbott (1421) 2654 posts |
Wimp Shutdown no longer drops to the Supervisor and appears to get stuck in the Wimp after its closed all the Wimp tasks. Repro (tested on a Pi3)
Going back through the ROMs I have to hand, it started failing in 5.27 between the 19-10-01 and 20-03-22 builds. |
Chris Hall (132) 3583 posts |
Nineteen years is a long period to look through. |
Stuart Painting (5389) 718 posts |
“Shutdown to command line” works with the 2019-11-13 IOMD ROM. It fails with the 2020-01-04 IOMD ROM. I regret I don’t have any December 2019 ROMs, but at least that narrows it down to a 7-week period. |
Steve Pampling (1551) 8198 posts |
11 different ROM releases (not including the two you mention.) |
David Pitt (3386) 1248 posts |
Alt-BREAK clears the stiffage at the mid-grey screen to complete the “Shutdown to command line”. On the RPi1 the breakage is between ROMs of 19-12-15 and 19-10-21. A diff of module versions shows a change of WindowManager from 5.64 to 5.65. A softload in PreDesk of a RAM build of WindowManager 5.64 over OS5.29 19Mar22 on the Titanium restores “Shutdown to command line”. A RAM build of WindowManager 5.65 fails so specific confirmation cannot be given at this point. WindowManager 5.65 is big!! Nightmare!! (Must own up to not knowing “Shutdown to command line” was even a thing.) |
Jon Abbott (1421) 2654 posts |
Good spot, in which case its possibly a Module not shutting down its Wimp task correctly and nothing to do with WindowManager. |
David Pitt (3386) 1248 posts |
A RAM version of WindowManager 5.65 has now been built and when softloaded in PreDesk over OS5.29 19Mar22 “Shutdown to command line” fails. A softloaded WindowManager 5.64 is OK. This is on the Titanium There may yet be more to this. The fault does occur on an unbooted, |
Julie Stamp (8365) 474 posts |
You weren’t joking! The last command the switcher issues shutting down is
I ran MsgMon and Reporter, and found
so it is getting stuck after that. In Wimp_StartTask, cut’n’paste checks whether it’s running, and if not then starts itself up. So after the *WimpTask Shutdown, control returns This means that after the second Ctrl-Shift-F12, Clipboard Manager will be left
…and I press Alt-Break and lo and behold see the Clipboard Manager is running! I also found (going the long way round until I remembered Alt-Break!) another
|
Julie Stamp (8365) 474 posts |
I guess Clipboard Manager is started upon Wimp_StartTask as that marks the move from single-tasking into multi-tasking. I think it’s up to the Wimp to quit the Clipboard Manager if it’s the last man standing? |
Rick Murray (539) 13908 posts |
The Wimp sends a message requesting an application to quit, but it’s up to the application to actually do so. Does it receive the Wimp_Quit message? It should unload itself upon that. There is also Service_ShutdownComplete, do we get that far? |
Julie Stamp (8365) 474 posts |
When it shuts down, the task manager:
This whole sequence happens fine. The clipboard manager gets the message and |
Chris Evans (457) 1614 posts |
Possibly related to this bug: You can also no longer have an obeyfile in PostDesk which calls a BASIC program eg. in LIBRARY The BASIC program we used just set up a parameter block and called SYS “OS_IICOp” ,xmit%,1 You now get an error on shutting down of “Repeat: Not enough memory” it appears momentarily and the BASIC program (in Library) called from an obey file in the PostDesk directory is no longer being run. We’ve confirmed the problem on: In the short term we’ve rewritten it as a transient which works. |
Rick Murray (539) 13908 posts |
Oh, so that’s why that is happening. I think, but may be wrong, that this was one of the many quirks introduced with 5.25 (too many quirks, I reverted to 5.23 until about half a year ago when the kkkkeeeeeyboarrrrd repeat finally drove me mad, but current releases seem much better ;) ). |
Julie Stamp (8365) 474 posts |
Interesting – it is related! I can make that happen without shutting down. If I quit Clipboard Manager from the The problem is that by the time BASIC starts the application slot has been This is because of the Wimp_Initialise in runthetask in s.Wimp07. At that point the currently active object is the Wimp – a module – so the initialise makes the app slot disappear in a puff of smoke. I found a mention of this change in the docs. |
Rick Murray (539) 13908 posts |
Clearly runthetask needs to be modified to note the slot and restore it, if doing the Wimp_Initialise thing; so that WimpTask can work correctly. Additionally the Wimp needs to pick up on Service_ShutDownComplete so it knows to not try starting up the clipboard at all in this situation. |
Julie Stamp (8365) 474 posts |
Even without quitting Clipboard Manager first, the obey file
gives “Not enough memory”. This time the SWI Wimp_Initialise is in Start in s.Wimp01. We could prevent the slot disappearing in Start and runthetask by |
Jon Abbott (1421) 2654 posts |
Is the fix not a case of modifying ServiceCode to handle Service_WimpCloseDown and/or Service_ShutDownComplete If it’s the fact its starting up again after Service_WimpCloseDown is issued, then it surely just needs to track if a shutdown is in progress and not restart? |
Julie Stamp (8365) 474 posts |
The task in question is ‘Clipboard Manager’ which is part of the WindowManager module, and the issue affects more the shutdowns. If you do
from outside the desktop, you’ll be left with the same blank grey screen, and have to use Alt-Break to get out of it. |
Jon Abbott (1421) 2654 posts |
So its calling Wimp_Initialise/Wimp_Poll when the wimp isn’t active? |
Julie Stamp (8365) 474 posts |
The WimpTask GOS is meant to start the wimp up in single-tasking mode with the command GOS running. But now it starts Clipboard Manager as well, so when you quit GOS you’re left in the wimp with Clipboard Manager as the only task. |
Jon Abbott (1421) 2654 posts |
Has anyone figured out how to fix this bug without pressing ALT-Break? My laptop doesn’t have a break key and RPCEmu doesn’t have a “Break” option, so I’m a bit scuppered. |
Steve Pampling (1551) 8198 posts |
Some laptops push little used keys to alternate combinations, e.g. Lenovo You may need to check your specific manufacturer support pages |
Andrew Rawnsley (492) 1445 posts |
If the problem hasn’t been resolved came in with the clipboard copy/paste work, has anyone reported the issue to Andy V who did all that work on windowmanager? Might be worth contacting him, he’s usually super-helpful. If you don’t know him directly, send me a bug summary on any of my usual addresses, and I’ll pass it on. |
Jon Abbott (1421) 2654 posts |
Andrew, could you point him at this thread as I detailed the Repro in the first post |
Jon Abbott (1421) 2654 posts |
I’ve noticed a commit to resolve this issue, has that also rolled into the 26bit Window Manager? |
Pages: 1 2