-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QtMir shell dies on Mir-on-X when mapping AnonymousShm file #120
Comments
I'm still seeing this with Mir trunk and UBPorts on Bionic: |
Problem is that we were trying to mmap a file of zero length, which you can see from frame 3 of the backtrace. |
The issue is how QtMir disables Mir's cursor, it implements mir::graphics::CursorImage to supply an empty image (size 0x0) in a class named "qtmir::NamedCursor". Mir tries to mmap memory for it, and naturally mmap chokes on the 0 size. What I'm trying to figure out is how to avoid that. Is calling mg::SoftwareCursor::show on a CursorImage which is zero sized wrong? I.e. should it throw on a null cursor? |
It seems to me that disabling Mir's cursor by giving a software cursor an empty image is simply a bad idea. We should support "--cursor null" in addition to "--cursor sofware" and "--cursor auto" |
@wmww this is the bug we were telling you about last night |
244: Software cursor: throw exception for zero sized cursor image r=wmww a=gerboland Server supplying zero sized cursor image to Mir causes Mir to die with an obscure error message: "Failed to map file: Invalid argument" Catch zero sized cursor image and throw with a better error message. Will help other Mir users when encountering #120
I'd consider this fixed, the ball is in QtMir's court to use a different Mir api to request a hidden cursor. One (bad) option is setenv("MIR_SERVER_CURSOR", "null", 1)... |
With:
In a Terminal, we want to test QtMir with Mir-on-X, so run
./demos/qml-demo-shell/qtmir-demo-shell
It fails for me with "Failed to map file: Invalid argument" which is coming from mir::AnonymousShmFile constructor.
The text was updated successfully, but these errors were encountered: