List items
Items from the current list are shown below.
Blog
19 Jul 2024 : Day 293 #
Yesterday I was able to complete a couple of commits to fix some issues. I really want to get on to doing some non-coding work, but before I do, there's one last issue that I really need to address. Back on Day 126 I was having trouble with the cover of the browser app. I created a bug to remind myself to come back to it. Despite that I still managed to forget about it until I suddenly realised this morning.
I do need to fix it though. The bug prevented the cover app from showing a preview of the current page and it'd be rubbish if we had to release the browser without this working properly. On the other hand I'm really hoping that the issue is related to the offscreen rendering and that all of the changes made to fix that will magically allow the cover rendering to work again.
As the issue on GitHub explains:
The change made back then to work around the issue was the following:
I also checked that WebGL still works when rendered on the cover as well. So with this done I just have to now commit my minimal changes and that should be enough to justify closing the issue on GitHub. For reference, here's the commit I'll be reversing:
I enjoy working on the code and use it as a way to recover from the real world. Maybe even to hide from it sometimes. It allows me to focus on something controllable while ignoring all of the messy uncontrollable stuff going on elsewhere. I don't think I'm unusual in this. I'm sure other people find their own ways to escape from reality periodically.
But with a project like this it's also important to occasionally step back, take stock, make course corrections and deal with the points of intersection with reality. And that's what I plan to do tomorrow.
If you'd like to read any of my other gecko diary entries, they're all available on my Gecko-dev Diary page.
I do need to fix it though. The bug prevented the cover app from showing a preview of the current page and it'd be rubbish if we had to release the browser without this working properly. On the other hand I'm really hoping that the issue is related to the offscreen rendering and that all of the changes made to fix that will magically allow the cover rendering to work again.
As the issue on GitHub explains:
The call to window.setBrowserCover(webView.tabModel) in BrowserPage.qml causes the user interface to hang. To reproduce:
- Run the browser.
- Select the "Tab" icon on the far left hand side of the toolbar.
- Select the "Private" browser tab icon (Batman).
- Notice that the app hangs (but doesn't crash) as the page switches from persistent to private mode.
The change made back then to work around the issue was the following:
git diff 51a72ef86825dcf0deca5ab3adc493247768eaee 8a8c474abed7d95ac9b32cbfa6fe90275cf97631 diff --git a/apps/browser/qml/pages/BrowserPage.qml b/apps/browser/qml/pages/ BrowserPage.qml index 4373eeef..e0fb48c5 100644 --- a/apps/browser/qml/pages/BrowserPage.qml +++ b/apps/browser/qml/pages/BrowserPage.qml @@ -225,7 +225,7 @@ Page { if (webView.tabModel.count === 0) { webView.handleModelChanges(false) } - window.setBrowserCover(webView.tabModel) + //window.setBrowserCover(webView.tabModel) } }This is a great place to start from because the change is in QML code. This means reversing this change is not only just a matter of uncommenting a single line, but it can also be done entirely without needing to do any recompilation.
devel-su vim /usr/share/sailfish-browser/pages/BrowserPage.qml [...] sailfish-browser [...]Having made the change, the good news is that it does now work, immediately, without any further changes. This isn't entirely a shock. As I mentioned earlier, there was always a good chance that the existing changes would fix this. The cover rendering makes use of the offscreen render pipeline, which was broken before but is now fixed.
I also checked that WebGL still works when rendered on the cover as well. So with this done I just have to now commit my minimal changes and that should be enough to justify closing the issue on GitHub. For reference, here's the commit I'll be reversing:
$ git log -1 8a8c474abed7d95ac9b32cbfa6fe90275cf97631 commit 8a8c474abed7d95ac9b32cbfa6fe90275cf97631 Author: David Llewellyn-Jones <david.llewellyn-jones@jolla.com> Date: Fri Dec 29 11:10:03 2023 +0000 [browser] Disable window.setBrowserCover The window.setBrowserCover() call causes the browser to hang when rendering with ESR 91. This needs to be fixed, but in the meantime disabling the call prevents the hang from occurring. This change prevents the browser page from being rendered on the app cover.With this change committed my plan is to take a break from coding for a bit now. I'm going to continue writing these diary entries and working on the browser, but I've built up a backlog of administration that I really need to deal with. This means reading through (and responding to) comments on the issue tracker, getting some test packages built for others to use, performing some tests, that kind of thing.
I enjoy working on the code and use it as a way to recover from the real world. Maybe even to hide from it sometimes. It allows me to focus on something controllable while ignoring all of the messy uncontrollable stuff going on elsewhere. I don't think I'm unusual in this. I'm sure other people find their own ways to escape from reality periodically.
But with a project like this it's also important to occasionally step back, take stock, make course corrections and deal with the points of intersection with reality. And that's what I plan to do tomorrow.
If you'd like to read any of my other gecko diary entries, they're all available on my Gecko-dev Diary page.
Comments
Uncover Disqus comments