[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Changed in: mir Status: Won't Fix => Opinion ** Changed in: mir (Ubuntu) Status: Won't Fix => Opinion -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Changed in: canonical-devices-system-image Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
This bug was fixed in the package qtmir - 0.5.1+17.04.20170307-0ubuntu1 --- qtmir (0.5.1+17.04.20170307-0ubuntu1) zesty; urgency=medium [ Albert Astals Cid ] * Fix clang build [ Daniel d'Andrada ] * Some qtmir::Session fixes * Make TaskController absorb SessionManager * Don't pass command line arguments to Mir * Reduce default log verbosity (LP: #1664151) * DBusFocusInfo: fix crash when trying to access a null session from an application (LP: #1670710) [ Gerry Boland ] * Workaround for Mir changing GL state unexpectedly on Qt, breaking font rendering. (LP: #1583088) [ Lukáš Tinkl ] * Use the shell chrome, as provided by miral window info (LP: #1658117) -- Lukáš TinklTue, 07 Mar 2017 23:43:16 + ** Changed in: qtmir (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Changed in: canonical-devices-system-image Milestone: None => u8c-1 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: qtdeclarative-opensource-src (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Assuming the current value is 4 might be incorrect in this case but also won't cause the bug unless they also fail to call "glPixelStorei(GL_UNPACK_ALIGNMENT, 4)" somewhere that they need it to be 4. Where you see Qt code that uses alignment 1, that's not relevant here because it will play perfectly with Mir. The problem is elsewhere... some GL unpacking without a glPixelStorei call is being done and that location expects/requires alignment of 4. So I guess start by searching for all glTexImage2D calls and ensure they are all /immediately/ preceded by glPixelStorei. It's possible Qt already has some housekeeping for that but then the bind call happens in the middle: Qt: glPixelStorei(GL_UNPACK_ALIGNMENT, 4); Qt: calls the offending Mir bind code Qt: glTexSubImage2D or glTexImage2D So the fix then would still be in qtdeclarative; either reorder lines 1 & 2, or add another glPixelStorei call in before the glTex*Image2D calls in Qt. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Here is what Qt is doing, on upload: https://code.woboq.org/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp.html#158 It saves & restores the alignment, and assumes the default alignment of 4 for drawing. IMO Mir isn't playing along, as it changes the alignment but does not restore it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Awesome. I would like to see a permanent fix done in a more appropriate place though. I think somewhere in qtdeclarative-opensource-src there is the bad assumption about the current state of GL_UNPACK_ALIGNMENT. We need to find that code and add an explicit setting right before it uploads the corrupt/skewed texture. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
using silo 2481, seems to work fine, i don't see the font corruption anymore -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Also affects: qtdeclarative-opensource-src (Ubuntu) Importance: Undecided Status: New ** Changed in: qtdeclarative-opensource-src (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Changed in: canonical-devices-system-image Status: Confirmed => In Progress ** Changed in: canonical-devices-system-image Assignee: (unassigned) => Michał Sawicz (saviq) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Yes, but probably no :) Performance of the GL pipeline suffers, sometimes dramatically, if you glGet-anything like the current GL_UNPACK_ALIGNMENT. So getting it for later restoration is highly undesirable. Better to just set it to the right value whenever it's important. That keeps communication between the CPU and GPU in one direction and avoids stalling the pipeline. https://www.khronos.org/opengl/wiki/Common_Mistakes#glGetFloatv_glGetBooleanv_glGetDoublev_glGetIntegerv ** Changed in: mir (Ubuntu) Status: New => Won't Fix ** Also affects: mir Importance: Undecided Status: New ** Changed in: mir Status: New => Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Also affects: mir (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
** Branch linked: lp:~gerboland/qtmir/fix-font-rendering -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
@vanvugt you were right that glPixelStorei was to blame. In ShmBuffer Mir uses glPixelStorei to change the GL_UNPACK_ALIGNMENT from 4 (that Qt set) to 1 (that Mir sets, as it is more careful about stride). Mir fails to restore the state the Qt set, which broke Qt's rendering from then on. ShmBuffer only used for clients that do not use GL to draw, so Gtk and mir demos like fingerpaint, which is why this bug was "random" Could Mir be patched to revert any GL state changes it makes, when called into by Qt? ** Changed in: unity8 (Ubuntu) Status: Confirmed => Invalid ** Changed in: qtmir (Ubuntu) Status: Confirmed => In Progress ** Changed in: qtmir (Ubuntu) Assignee: (unassigned) => Gerry Boland (gerboland) ** Description changed: - Corrupted characters in text rendering, mainly in Unity8 window - titlebars. + Corrupted characters in text rendering. - I think this is a new issue. It only started happening (on xenial - desktop) in the past month or two. + Only happens after starting non-GL application, like GTK application or + mir_demo_client_fingerpaint. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
If you could point me to the exact code that does the glyph rendering/caching I would be interested to read it... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
I'm looking into this now. I took an api trace of some simple font rendering by Qt on Mir showing the problem, and executed it on my X11 session. It renders ok on X11. Reading through the apitrace, Qt seems to be doing the right thing. I suspect the mismatch we have between Mir creating a GLES context and Qt expecting a GL context is hitting us here. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
It could still be lack of glPixelStorei. In many cases the default unpack alignment will be right by accident, so in those cases the text will appear correct. It's possible that a different backend (X11 vs Mir) creates a slightly different GL state and so the bug only appears in some backends but not others. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
I'm referring to the diagonal lines problem, like we see here and like is documented here: https://www.khronos.org/opengl/wiki/Common_Mistakes#Texture_upload_and_pixel_reads -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
@kgunn - yes I can reproduce it quite reliably too. No need to try the glyph cache workaround thing, I checked it and it had no impact. @duflu - Qt is rendering the text. Since Qt renders text ok in Unity7, there must be some GL configuration problem in QtMir/QtUbuntu causing this kind of issue. At the moment, I've not really dug into why. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
@Gerry I was going to try your suggestion, stop unity8 && start unity8 QML_USE_GLYPHCACHE_WORKAROUND=1. but it seems simply starting and stopping unity8 is unhappy on zesty atm fwiw, my current setup I'm seeing this 100%, and i agree cache seems likely as first few windows are ok, but eventually text gets corrupt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
Without knowing what project is to blame or where the source code is, I think this actually looks like a glPixelStorei bug, or lack of glPixelStorei. If you don't call glPixelStorei before your glTexImage2D then the default unpack alignment is 4 bytes. And it's possible the font glyph cache code doesn't know that, assuming default stride alignment is to 1 byte accuracy instead. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
It's not Xmir. I experience this bug with the default Unity8 setup (just settings and web browser apps). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
hm.. ok.. so not sure it's Xmir, now i gedit corrupted my fonts, after 20h of using only ubuntu system apps and qt5 apps i just run "ubuntu- app-launch gedit" and my fonts are corrupted now, i have to restart :D -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font / text / characters in Unity8
just my observation, i only see character corruption when using Xmir (on desktop), i am now using unity8 for 20h and the fonts look ok, no corruption. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1583088] Re: Randomly corrupt font/text/characters in Unity8
Just updating the bug title so that people searching for keywords can find it (Launchpad only finds keywords separated by spaces) ** Summary changed: - Randomly corrupt characters in Unity8 + Randomly corrupt font/text/characters in Unity8 ** Summary changed: - Randomly corrupt font/text/characters in Unity8 + Randomly corrupt font / text / characters in Unity8 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1583088 Title: Randomly corrupt font / text / characters in Unity8 To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1583088/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs