Xcode 7.3b4 (7D152p): Simulator hangs when rotating in UI tests when Optimize Rendering for Window Scale is disabled
| Originator: | igeek1 | ||
| Number: | rdar://24815677 | Date Originated: | 24-Feb-2016 12:01 PM |
| Status: | Closed | Resolved: | 16-Jun-2016 08:23 PM |
| Product: | Developer Tools | Product Version: | Xcode 7.3b4 (7D152p) |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: When running UI tests in the iOS simulator, the test will hang and time out if Optimize Rendering for Window Scale is disabled in the simulator. Steps to Reproduce: (Watch the attached video for a full demonstration.) 1. Open the attached sample code in Xcode 7.3b4. 2. Run the app in the iPad Pro iOS 9.3 simulator, and make sure it builds and runs OK. 3. Use Command-4 to scale the simulator to 33%. 4. Disable “Optimize Rendering for Window Scale” under the Debug menu in the Simulator app. 5. Open PadiddleUITests.swift in Xcode. 6. Click the Run arrow next to testToolbarStaysHiddenWhileRotating() to run just that test, or use Command-U to run all tests. 7. Observe that the test passes. 8. In the Simulator, enable “Optimize Rendering for Window Scale” in the Debug menu. 9. Re-run the same test again. 10. Observe that the test hangs after this line: XCUIDevice.sharedDevice().orientation = .LandscapeRight Expected Results: The test passes. Actual Results: The test times out because it is unable to get a screenshot after the aforementioned line. Regression: Unknown. Notes: This is a problem because I’m trying to run these tests on Xcode bots, and it keeps timing out. I can’t figure out whether bots always use full resolution, or whether they optimize rendering for window scale. While the test is hanging, if you switch to the simulator and disable “Optimize Rendering for Window Scale”, the test will immediately finish and pass. I’ve attached a system report of my Retina MacBook Pro, but I also reproduced the issue on a non-Retina Mac mini (Late 2012) with the same software stack. Video: http://cl.ly/fEk1 Sample code: http://cl.ly/fEuw
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
This appears to be resolved in the first Xcode 8 seed. This issue has been verified as resolved and can be closed.
My Response
How do I increase the idle timeout from 15s to 30s? That's not a timeout I'm setting - that's the default idle detection timer. I'm posting a trace from your instructions anyway in case it's helpful.
Response from Apple
Engineering has requested the following information in order to further investigate this issue:
The attached sysdiagnose is a bit better but seems to have been run too early. Please ensure that the sysdiagnose starts when in the hung state. You may want to increase the 15s timeout to 30s to give yourself a larger window. I suggest that you run 'sudo sysdiagnose -q' in Terminal but don't press enter yet. Start the test in Xcode, then switch back to Terminal and only hit enter after the test has entered the hung state.
Thank you.
Please provide your response or results by updating your bug report and compress any bundled files (e.g. nested folders) prior to uploading.
Attached the requested files with this comment
Here you go. I wasn't sure which part of sysdiagnose would be useful, so I kept running the test and letting it time out during the whole time it was running.
Request for feedback from Apple
Apple Developer Relations - 02-Mar-2016 03:57 PM
Engineering has requested the following information in order to further investigate this issue:
The sysdiagnose doesn't seem to be taken when in the hung state. Can you please take another sysdiagnose during the hang. Also, please attach ~/Library/Logs/CoreSimulator.
Thank you.
Please provide your response or results by updating your bug report and compress any bundled files (e.g. nested folders) prior to uploading.