4.1 Shutdown Processing Time
Opened this issue · 0 comments
The Wii U system has a timeout for shutdown and application exit processing. The system will forcibly close an application within roughly 20 to 30 seconds after the application receives a termination notification.
This timeout is set to allow the system enough time to safely exit. If an application were to use all of this time every time it shut down, then closing applications and returning to the Wii U Menu would become an irritation for users.
Therefore, applications must complete shutdown processing within 3 seconds or less.
The situations outlined below where technical factors make it difficult to complete shutdown within 3 seconds are treated as exceptions. However, make every effort to complete shutdown processing as quickly as possible.
When writing save data or data equivalent to save data.
During communication
Ensure the consistency of your save data files in accordance with section 2.11 Flush Call Timing. Also see the function references for the libraries required for a normal exit.
Note:
The forced shutdown feature is not activated in the current system version. This means that applications must not continue normal processing in anticipation of the forced shutdown.
In particular, if the user presses the POWER Button during a disc error and the application then attempts disc access again, control fails to return from that function. When performing shutdown processing for the FS library, always ensure that you call the FSDelClient function, which always returns control.
Note:
With the current mechanism, it is not possible to clearly distinguish between the application's shutdown processing and the system's shutdown processing. Therefore there is no conclusive way of checking this guideline. With that said, consider using the following test methods as reference, although they are not conclusive.
Close the application from the HOME Menu and time how long it takes to return to the Wii U Menu.
The system-side shutdown processing can sometimes take as long as 30 seconds. If it takes significantly longer than 30 seconds to return to the menu, check how the application implements its shutdown processing.
Press the POWER Button and time how long it takes for the screen display to disappear.
If the application continues rendering (continues playing animations) for 3 seconds or more, then it is safe to assume that the application's shutdown processing takes 3 seconds or more.
This test method cannot be used if the application implements some mechanism to turn the screen black (or otherwise discontinue screen display) whenever the POWER Button is pressed.
4.1.1 Handling Application Shutdown Processing
Guideline Item
Applications must complete shutdown processing within 3 seconds or less.
Test Method
Check the source code.
Pass/Fail Determination
Passes if the application is implemented in such a way that it will complete shutdown processing within 3 seconds or less.
Software to Be Tested
All applications.
Exceptions
If the following cases apply:
When writing save data or data equivalent to save data.
During communication.