swift-toolkit
swift-toolkit copied to clipboard
[VO]: Toggling the VO while a book is open will freeze the app in a few seconds
Bug Report
What happened?
While the a book is open, toggling the VoiceOver will freeze the app in a few seconds and the app will be unresponsive, and multiple attempt will also cause the device to get very hot.
https://user-images.githubusercontent.com/3314171/201693659-8fe4a098-8dbd-4157-90fe-38fb02e93d51.MP4
Environment
- Readium version: 2.4.0
Development environment
macOS: 13.0 platform: x86_64 carthage: 0.38.0 Xcode 14.1 Build version 14B47b
Testing device
- iOS version: 16.0.3(20A392)
- Model (e.g. iPhone 11 Pro Max): iPhone 11
- Is it an emulator? No
Unfortunately I don't have a device running iOS 16 and couldn't reproduce the issue on iOS 15. Maybe it's related to the book, would you be able to share it (privately on Slack if required)?
Do you see where the app hangs when debugging from Xcode?
Yes, that's true, I've now also tested this on earlier versions of iOS and it works without any issues so it only happens on iOS 16.0+.
I have set R2EnableLog(withMinimumSeverityLevel: .debug) in TestApp and the only logs I could see is this log for every created webview:
EPUBSpreadView.swift:157: Evaluate script: readium.setProperty("--USER__bodyHyphens", "none");
readium.setProperty("--USER__fontSize", "100.0%");
readium.setProperty("--USER__fontFamily", "Original");
readium.setProperty("--USER__fontOverride", "readium-font-off");
readium.setProperty("--USER__appearance", "readium-default-on");
readium.setProperty("--USER__scroll", "readium-scroll-off");
readium.setProperty("--USER__advancedSettings", "readium-advanced-off");
readium.setProperty("--USER__textAlign", "justify");
readium.setProperty("--USER__colCount", "auto");
readium.setProperty("--USER__wordSpacing", "0.0rem");
readium.setProperty("--USER__letterSpacing", "0.0em");
readium.setProperty("--USER__pageMargins", "1.0");
readium.setProperty("--USER__lineHeight", "1.5");
Not sure if this is the correct way of debugging, but every time when I toggle the VO and the app freezes I pause the app from xcode, maybe it's because of the javascript?
