Skip to content
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

glx::MakeCurrent failed #6042

Closed
WriterOfAlicrow opened this issue May 14, 2015 · 18 comments
Closed

glx::MakeCurrent failed #6042

WriterOfAlicrow opened this issue May 14, 2015 · 18 comments

Comments

@WriterOfAlicrow
Copy link
Contributor

@WriterOfAlicrow WriterOfAlicrow commented May 14, 2015

When I try to run servo (./mach run tests/html/about-mozilla.html), it crashes immediately, giving the following output:

[glutin] x error code=21 major=0 minor=0!
[glutin] x error code=22 major=0 minor=0!
[glutin] x error code=23 major=0 minor=0!
[glutin] x error code=26 major=0 minor=0!
[glutin] x error code=27 major=0 minor=0!
[glutin] x error code=28 major=0 minor=0!
[glutin] x error code=30 major=0 minor=0!
[glutin] x error code=33 major=0 minor=0!
[glutin] x error code=48 major=0 minor=0!
thread '<main>' panicked at 'glx::MakeCurrent failed', /home/daniel/Documents/RustProjects/servo/.cargo/git/checkouts/glutin-72cd277ab8976bc1/servo/src/x11/window/mod.rs:744
stack backtrace:
   1:     0x7f6a0ca1b259 - sys::backtrace::write::h6dd465a29c00292cqYr
   2:     0x7f6a0ca1ee21 - panicking::on_panic::hce7ca60568ec6ad9low
   3:     0x7f6a0ca09f22 - rt::unwind::begin_unwind_inner::h2ea6b65af87d2482v3v
   4:     0x7f6a0bcc53be - rt::unwind::begin_unwind::h7752693844274499332
                        at /home/larsberg/rust/src/libstd/rt/unwind.rs:522
   5:     0x7f6a0bcd9e1d - platform::window::Window::make_current::h5270023c305b696459b
                        at /home/daniel/Documents/RustProjects/servo/components/servo/<std macros>:3
   6:     0x7f6a0bbbe5a9 - window::Window::make_current::h2ca40e10732eee97lie
                        at /home/daniel/Documents/RustProjects/servo/.cargo/git/checkouts/glutin-72cd277ab8976bc1/servo/src/window.rs:329
   7:     0x7f6a0bbb8d24 - window::Window::new::hd4f1db162941715c0na
                        at /home/daniel/Documents/RustProjects/servo/ports/glutin/window.rs:83
   8:     0x7f6a0bcc40b5 - create_window::hbe06bbafe7c882f7cTa
                        at /home/daniel/Documents/RustProjects/servo/ports/glutin/lib.rs:47
   9:     0x7f6a0a742948 - main::h30e90660da0bf387paa
                        at /home/daniel/Documents/RustProjects/servo/components/servo/main.rs:56
  10:     0x7f6a0ca23eb8 - rust_try_inner
  11:     0x7f6a0ca23ea5 - rust_try
  12:     0x7f6a0ca2067f - rt::lang_start::h09e0526b407d67dbQiw
  13:     0x7f6a0a870c14 - main
  14:     0x7f6a096c2b04 - __libc_start_main
  15:     0x7f6a0a742718 - <unknown>
                        at ../sysdeps/x86_64/start.S:112
  16:                0x0 - <unknown>
[glutin] x error code=50 major=0 minor=0!

System info: openSUSE 13.2, GNOME Shell 3.14.2, NVIDIA proprietary drivers version 340.76

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 14, 2015

This just happened to me too, on Ubuntu Gnome 14.04, using NVIDIA 331.113

@nbaksalyar
Copy link

@nbaksalyar nbaksalyar commented May 16, 2015

Same issue for me on Fedora 21 + Gnome Shell 3.14 + NVIDIA 346.59.

@ColdPie1
Copy link

@ColdPie1 ColdPie1 commented May 16, 2015

I bisected this, and it's down to this merge commit in glutin. Still unclear if it's an nvidia driver issue or a glutin issue.

commit b28f35aa5b06e7d34ada307a5a1b1e9b9de697a1
Merge: a9f7227 2061402
Author: Lars Bergstrom larsberg@mozilla.com
Date: Tue May 12 14:00:50 2015 -0500

Merge pull request #20 from zmike/parenting

add ability to set parent window when creating windows
@WriterOfAlicrow
Copy link
Contributor Author

@WriterOfAlicrow WriterOfAlicrow commented May 16, 2015

I managed to fix it, thanks to the info ColdPie1 provided. That commit removes the code in glutin/src/x11/window/mod.rs that created the color map. I added the color map stuff back in, and now it runs.

Not sure if this is the optimal solution (I assume there was some reason for removing the color map stuff), but now we know where the problem is, at least.

@jdm
Copy link
Member

@jdm jdm commented May 17, 2015

cc @zmike for feedback

lglearn referenced this issue in servo/rust-azure May 17, 2015
@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 18, 2015

I can also confirm that this solves the issue.

@zmike
Copy link
Contributor

@zmike zmike commented May 19, 2015

Should be resolved with my recent glutinup PR to servo.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 19, 2015

Fixed by #6120

@qdot
Copy link
Contributor

@qdot qdot commented May 22, 2015

I'm still getting the same error msg and crash even after this patch went in. Seems to be from the same version of glutin mentioned earlier (b28f35aa5b). I'm on debian jessie, nvidia quadro k1000 card, 349.16 drivers.

Checking out a servo that depends on a version of glutin older than the aforementioned hash seems to work.

cc @zmike

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 26, 2015

Yes, the problem still persists. Before #6120, this snippet fixed fixed the problem:
https://gist.github.com/mmatyas/e1e2f06e97f43c4e4198

...but on current master I get the error even after applying that.

@qdot
Copy link
Contributor

@qdot qdot commented May 26, 2015

Same here, restoring the color map no longer works for me either.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented May 30, 2015

@Manishearth Manishearth reopened this May 30, 2015
@tomaka
Copy link

@tomaka tomaka commented May 30, 2015

Actually I don't exactly know what are ColorMaps and how they work. Glutin's code on X11 is mostly copy-pasted from examples found around the web.

No-one reported this issue with upstream glutin, so it's probably related to the changes in servo/glutin.

@mukilan
Copy link
Contributor

@mukilan mukilan commented May 30, 2015

Adding the colormap related code fixes the issue (for me at least). @mmatyas you forgot to set the CWColorMap flag in window_attributes. Here is the working fix: https://gist.github.com/mukilan/6fe5445f69faa0a88bf7#file-gistfile1-diff-L29

@jdm
Copy link
Member

@jdm jdm commented May 30, 2015

Interestingly @zmike specifically removed all traces of colormap stuff recently.

@zmike
Copy link
Contributor

@zmike zmike commented Jun 3, 2015

Ah, this is indeed my fault. I forgot that glutin is creating the GLX window, in which you do actually need a writeable (created) colormap.

@meteficha
Copy link

@meteficha meteficha commented Jun 3, 2015

@zmike, servo/glutin#29 fixed the problem for me, thanks!

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented Jun 3, 2015

It works for me too, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.