/srv/irclogs.ubuntu.com/2017/03/08/#ubuntu-mir.txt

hikikohey08:52
hikikoduflu, are you around?08:52
dufluhikiko: Yes08:53
hikikohello :)08:53
hikikodo you know anything about miral?08:53
=== dandrader is now known as dandrader|afk
hikikoI run it and it crashes with this error:08:54
hikikohttp://pastebin.com/wzCNkedA08:54
hikikoand I am almost sure, I didn't install some mir or miral dependency08:54
dufluhikiko: Don't know. Try alan_g (who starts in 5 minutes?)08:55
hikikook :) thanks!08:56
hikikolol here he is!08:56
hikikohi alan_g08:56
hikikoI have questions for you!!08:56
hikikogood morning :)08:56
hikikommm duflu do you use any ppa for mir?08:57
dufluhikiko: No. Just zesty, or compile lp:mir. But I only use Unity8 with the official zesty packages08:58
hikikoI can't compile mir for some reason either... I get some compile errors08:59
hikikocan I show you?08:59
dufluhikiko: That's interesting. Yes please show the error08:59
hikikomight be just my configuration :p 1 sec08:59
hikikoduflu, linker* errors09:01
hikikohttps://paste.ubuntu.com/24136976/09:02
hikikoI am pretty sure I didn't install something properly09:02
hikikoI am building that inside a chroot09:02
hikikoso I might miss some package09:02
hikikoI have installed mir common, platform, client, server, mesa-x12 etc09:03
alan_ghikiko: are you following https://unity.ubuntu.com/mir/0.26/building_source_for_pc.html?09:06
hikikoalan_g, yes09:06
hikikoalso miral-shell gives me a segfault because some cpp is missing give me a sec09:07
hikiko[10:54:00] <hikiko> I run it and it crashes with this error:09:07
hikiko[10:54:20] <hikiko> http://pastebin.com/wzCNkedA09:07
hikikoalan_g, I am sure there's something on my system missing because I could run miral09:07
hikikobut I can't figure out what09:07
alan_ghikiko: I don't see how those instructions would try to lonk with //usr/lib/x86_64-linux-gnu/libmirclient.so.909:08
alan_g*kink09:08
alan_g**link09:08
hikikoalan_g, I don't know either09:08
hikikoI just copy pasted all the commands09:08
hikikooh I don't know if it's relevant09:08
hikikoI am using also this ppa:09:08
alan_ghikiko: "./miral-shell/decoration_provider.cpp:196" is trying to load a font09:09
hikikocemil-azizoglu-ubuntu-mesa-rs-zesty.list09:09
hikikoI am apt-file searching it09:10
hikikottf-ubuntu-font-family: /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf09:10
hikikoalan_g, it seems that the font is there09:10
dufluhikiko: It appears you have an old version of the libmirclient package installed (0.25) but a new libmirclient (0.26). Try updating to ensure they are all version 0.26.109:11
dufluhikiko: It appears you have an old version of the libmirclient package installed (0.25) but a new libmircommon (0.26). Try updating to ensure they are all version 0.26.109:11
dufluhikiko: zesty right?09:11
hikikoduflu, yes09:12
hikikobut apt-get update/dist-upgrade09:12
hikikodoesn't propose anything for mir09:12
dufluHmm09:12
dufluhikiko: dpkg -l | grep libmir09:12
hikikoduflu, http://pastebin.com/UWBS4hHx09:13
hikikoit seems that everything is 0.26 :s09:13
dufluOh, maybe I should not expect the symbol versions to change. Hang on09:13
* alan_g wonders why loading the font failed at L196, not L96 (which gives a clear message)09:20
hikikoalan_g, do you want a backtrace>09:20
hikiko?09:20
dufluhikiko: That PPA won't cause the problem either. I guess you have either leftovers from some old PPA or custom environment finding libmircommon in a strange place09:21
alan_ghikiko: does "$ miral-app -kiosk" run?09:21
dufluI really wish we didn't have launcher commands09:21
dufluBut now count at least four09:22
hikikoalan_g, it gives the same error09:22
hikikobut then:09:22
hikikowaiting for /run/user/1000/mir_socket09:22
hikikowaiting for /run/user/1000/mir_socket09:22
hikikooh09:22
hikikosec09:22
hikikomaybe it's the chroot09:22
* alan_g wonders how it can give an error from code that isn't running09:23
alan_gor even in the executable09:23
hikiko[2017-03-08 09:23:40.909694] mirserver: Using software cursor09:23
hikikoERROR: Throw location unknown (consider using BOOST_THROW_EXCEPTION)09:23
hikikoDynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >09:23
hikikostd::exception::what: bind: No such file or directory09:23
hikikoSegmentation fault09:23
hikikowaiting for /run/user/1000/mir_socket09:23
hikikowaiting for /run/user/1000/mir_socket09:23
hikikothen it prints the message forever09:24
alan_gIf the server crashes /run/user/1000/mir_socket will take a long time to appear09:24
alan_gJust kill it with ^C09:24
hikikoyep, I killed it already09:25
alan_gDo you have anything Mir in /usr/local/lib?09:25
hikikolet me check09:25
hikikono09:26
hikikojust python09:26
alan_g$ ldd `which miral-shell`09:26
dufluMorning alf_ ... Perhaps interesting reading: https://lists.freedesktop.org/archives/mesa-dev/2014-July/063977.html09:27
hikikoalan_g, http://pastebin.com/zAVKL89W09:27
duflu(which I only found when searching for the new function he added in the header but failed to implement)09:28
alan_gThat all looks sane09:30
hikikothen why it segfaults?09:31
alan_gNot obvious.09:33
alf_duflu: thanks09:35
alan_gIt's annoying to debug too - (mir-on-X grabs input). Can you ssh from a different machine?09:36
hikikoalan_g, it's a chroot I guess if I open it from another terminal it's fine09:36
hikikoit doesnt grub input btw if you roll the window :)09:37
alan_ghikiko: for differential diagnosis - do Mir & MirAL work outside the chroot?09:41
hikikommm miral-shell seems to work09:41
=== dandrader|afk is now known as dandrader
hikikoI don't know about mir I don't want to install its dependencies on desktop09:42
alan_gSure09:43
hikikoso, it's probably what I suspect09:43
hikikosomething missing from chroot09:43
alan_gYeah09:43
hikikothat is installed on desktop09:43
alan_gA stacktrace from miral-kiosk might give a clue09:45
alan_gThere's clearly also a problem with the font09:45
dufluIt may not be relevant now, but when I first did font support I found I could not use the Ubuntu font because it was missing in Core09:47
hikikointeresting: miral-kiosk without params can run (it shows a red screen that fades out) when I mount /run/user/100009:47
hikikobut miral-shell cant09:47
hikikoalan_g, the font is just a warning09:48
hikikoI think the real error is that:09:48
hikiko(anonymous namespace)::Printer::printhelp (09:48
hikiko    this=0x55555583a080 <(anonymous namespace)::render_pattern(MirGraphicsRegion*, unsigned char const*)::printer>, region=...)09:48
hikiko    at ./miral-shell/decoration_provider.cpp:19609:48
hikiko196     ./miral-shell/decoration_provider.cpp: No such file or directory.09:48
hikiko$ apt-file search decoration_provider.cpp returns nothing09:50
hikikothat's why I was wondering if my mir version is outdated and I need a ppa09:50
alan_ghikiko: ./miral-shell/decoration_provider.cpp:196 is trying to use the font. Are you sure it exists with sane access permissions in the chroot?09:51
dufluIf you're using Core/snappy then it's possible the Ubuntu font doesn't exist still. That's why I used LiberationSans-Bold.ttf. Confusingly Ubuntu Core did contain RedHat's font09:52
dufluhikiko: Are you running full desktop zesty?09:53
dufluMight have a similar problem with Ubuntu Server09:54
alan_gOK, if miral-kiosk runs then the only problem seems to be the font09:55
alan_gAre there any fonts in the chroot?09:55
hikikoI reinstalled the font09:55
hikikoand worked :)09:55
hikikonow I have to find out why mir doesn't build, I guess something similar :p09:55
hikikoalan_g, yes09:55
hikikothere were09:56
dufluhikiko: What ISO did you install from?09:56
dufluIf any09:56
hikikoduflu, no iso I used debootstrap09:56
hikikoon zesty09:56
alan_gYou can choose the font with --shell-titlebar-font09:56
dufluI guess a more elegant fallback than crashing is required for missing fonts09:57
hikikoyeah :)09:57
hikikoanyway, thanks duflu alan_g :)09:58
alan_gduflu: it's odd - it exits with an error if opening the font fails. This is something new.09:58
dufluOh09:58
dufluAnyone found PosixRWMutex unit tests hang/fail?09:58
dufluI'm only seeing it today09:58
alan_gHmm. I was wrong...09:59
alan_gWARNING: failed to load titlebar font: "rubbish"09:59
alan_gSegmentation fault (core dumped)09:59
dufluThat's not this one is it? https://errors.ubuntu.com/problem/c4a91485a9e7bf2774806d21e8c6c71f8ef79f0810:02
alan_ghikiko: do you see a "WARNING: failed to load titlebar font" message before the segfault?10:02
hikikoyes alan_g10:05
* alan_g goes to log a bug10:05
hikikobut as I said, after re-installing ubuntu fonts I don't see the segfault, it works great10:06
alan_gSure, but it shouldn't segfault if the font isn't there.10:06
alan_gduflu: I can't tell what that is10:07
alan_ggreyback: HTH https://bugs.launchpad.net/miral/+bug/1670741/comments/110:33
ubot5Ubuntu bug 1670741 in MirAL "Have a MIRAL_WINDOW_MANAGEMENT_TRACE env var" [Undecided,Invalid]10:33
greybackalan_g: oh so that already works? Great10:34
alan_gYou just had the spellign wrong10:34
greyback*nod* understood10:35
* alan_g can't type this morning10:35
greybackalan_g: https://bugs.launchpad.net/miral/+bug/1670876 <- ack, I couldn't see any real miral code that would impact it, but logged it against miral as miral-shell has the same bug11:45
ubot5Ubuntu bug 1670876 in Mir "Setting cursor causes window's input_region to be reset" [Undecided,New]11:45
alan_gSure, it's either the new APIs or misuse of the new APIs11:46
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
attenteis gtk supposed to be receiving a resize event when the window appears? or should gtk be querying this manually?15:50
alan_gattente: the resize events are mostly useless as they are not synced with the size of the buffer. The buffer has a size which is accurate.15:55
attentealan_g: but the resize events are still useful for checking when the buffer size changes, no?15:57
alan_gattente: well, if the size doesn't match the buffer, then there is a possibility that you'll get a buffer of a different size after a few swaps. (Unless there's another resize first)15:58
alan_gNot sure how useful that is though.15:58
attentealan_g: ok, so the buffer size is authoritative basically...15:59
attentealan_g: thanks15:59
attentethis is a bit annoying that we have to keep track of the size and synthesize the gdk event when it changes, but should be manageable16:02
alan_gkdub: ^^ anything to add for NBS?16:05
=== dandrader is now known as dandrader|afk
greybackattente: I can say from the Qt side, we totally ignore the mir resize event. It arrives at an arbitrary time. It would be far more useful if it arrived, and then you were guaranteed the next buffer you swap has that size.16:49
greybackwe go by the buffer size instead16:49
greybackwhich is not ideal16:49
attentegreyback: ok, thanks for the info. in the end i don't see it being too much of a problem16:50
* alan_g thinks we should never have provided resize events. Then people wouldn't try to use them.16:51
* attente shrugs17:00
greybackI see value in resize events, but only if they arrive at the right time17:01
attenteif this is the concern, why not deprecate them?17:01
kduboh, resize events make sense now17:02
kdubthey're a notification that the shell has redesignated the size, and the client is in control of the physical size of the buffers17:03
kduband lets the client figure out how its subscene should get resized17:03
attentekdub: what if the client decides to set the buffer size to something different from the resize event's size?17:05
greybackkdub: what if client creates buffers of sizes that the shell didn't decide on?17:05
greybackheh, same question, different epxression17:05
attente:)17:05
greybackonly real buffer management qtubuntu is doing is via egl swap buffers17:06
kduba different physical buffer size isn't a problem, the client arranges its scene via mir_window_spec_set_streams17:07
kduband the difference is accommodated by the renderer, usually scaling, but guess a renderer could also do clamping or whatever if it wanted17:07
kdubgreyback, the new system, when the resize event comes along, its only an indication that the shell has resized the on-screen size17:08
attentebut that kind of invalidates the approach we were talking about earlier where we would check the buffer size to reliably determine the window size17:09
kduband the client calls mir_render_surface_set_physical_size() (soon to be mir_surface_set_physical_size()), and at that point, then the next buffer out of eglSwapBuffers will be the right size17:09
greybackso it is up to shell to confine any client buffers that "mis-behave"17:09
kdubwell, the shell is already painting at the size it wants17:09
attentei'm really just looking for a reliable way to know the size we should render at to get no scaling17:10
greybacksure. But as I understood it, clients got a buffer of size whose size the shell decided ultimately17:10
kdubin the new system, the clients are in charge of buffers17:10
attentethis is what i thought too, greyback17:10
attentebased on what alan_g was saying17:11
kdubso, in the case where there are no sub-surfaces (one surface to one bufferstream)17:11
greybackkdub: ok, new system behaves differently, that's ok. I just wanted to be consider the diffference from the shell's PoV17:11
attentekdub: so does that mean this bug should theoretically fix itself once the new system is in place? https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/167039017:11
ubot5Ubuntu bug 1670390 in unity8 (Ubuntu) "Desktop applications don't get properly resized when launched in staged mode" [High,In progress]17:12
attente(speaking from a gtk perspective)17:12
greybackattente: that's unity8 only, right?17:12
attentegreyback: i'm not sure. but i haven't seen this bug in miral-shell17:13
greybackattente: if not in miral-shell, then probably unity8's fault17:13
kdubre the bug, not sure without thinking harder17:13
attentegreyback: i'm just confused about how to reliably get the window size17:13
greybackattente: I'd go with buffer size for now17:13
kdubattente, which window size? :)17:13
attentekdub: the mir window size :)17:14
greybackattente: there is a general problem with unity8 and window resizing, which I think is mainly qtmir's fault (for which I've ideas)17:14
attentekdub: like, should i be expecting it to come from a resize event? or do i have to query it?17:14
kdubsure, the size of the window that the shell designates is comes from the resize callback17:14
kdubright, resize event, no querying17:14
attentekdub: ok, then there's definitely an issue with unity8 not sending the proper resize event when the window appears17:15
attenteor in stage mode for that matter17:15
kdubattente, iirc, there's no resize event sent at startup17:15
greybackattente: here is how we're doing it in Qt: http://bazaar.launchpad.net/~phablet-team/qtubuntu/trunk/view/head:/src/ubuntumirclient/qmirclientwindow.cpp#L64117:16
attentekdub: what's the right thing to do here? query on window creation? or should u8 send a resize event?17:16
greybackattente: look for "handleGeometryChange" <- that is how we notify Qt of the window size change17:17
attentegreyback: is it worth doing this if the new system is supposed to send resize events reliably at some point?17:18
greybackattente: I can't answer that, sorry. I can only tell you what works for us now17:18
attentegreyback: fair enough, thanks for the pointers. i think i'll eventually just copy what you've already done17:19
kdubi think mir_window_get_parameters at startup to get the initial size the shell said, and after that the callback or you can requery via that function17:20
greybackyep, we do that in qtubuntu, works ok17:21
=== dandrader|afk is now known as dandrader
kdubright, in the old system, server/shell controlled both window size and physical size, in the new system, the server controls window size, and the client controls/owns the physical buffers (and their sizes)17:24
greybackgotcha17:24
greybackkdub: will old system hang around? Or eventually deprecated?17:24
greybackkdub: and roughly on the topic, what about pixel format. If every buffer can have different pixel format, why would Window have that property (ref: https://bugs.launchpad.net/mir/+bug/1666533/comments/9)17:25
ubot5Ubuntu bug 1666533 in MirAL "Shell wants api to listen for window pixel_format changes" [Medium,Incomplete]17:25
kdubgreyback, the old system really only exists in the client api that's being deprecated (internally, things are already plumbed with client-controlled physical sizes)17:27
kdubgreyback, windows no longer have pixel format17:28
kdubhmm, might be a missed deprecation there17:28
kdubi guess it says 'to be deprecated soon' in the comments17:28
greybackok17:28
greybackkdub: from unity8's perspective, something that we be really useful is a notification that a client swapped a buffer with the new size & pixel format, as soon as the client swapped it17:31
greybacks/we/would/17:31
greybackwelll17:32
greybackactually, ignore hat17:32
kdubsure :)17:32
greybackI need to test an idea first. But if that idea fails, I'll be back to you17:32
kdublooking at qmirclientwindow.cpp, mir_buffer_stream_get_egl_native_window is going away soon17:33
greybackkdub: I presume it will get a replacement of similar functionality?17:33
kdubgreyback, right, so in the mir-1.0 world, you just plug a MirSurface (formerly MirRenderSurface) into eglCreateWindowSurface17:34
kdubthe MirSurface->MirWindow and MirRenderSurface->MirSurface rename in 1.0 makes for confusion when talking about it :)17:35
kdubbasically, we've gone from being a server that supports 2 different EGL systems, to being one that has a mir egl platform17:36
greybackyep, the transition made all my old terminology confused17:37
kdubyeah, we also need a grand mir-server-internal rename for it :/17:39
=== JanC_ is now known as JanC

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!