Skip to content

glx::MakeCurrent failed #6042

Closed
Closed

Description

@Alibirb

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

Activity

  1. added
    I-crash
    P-linux
    on May 14, 2015
  2. mmatyas commented on May 14, 2015

    @mmatyas
    Contributor

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

  3. nbaksalyar commented on May 16, 2015

    @nbaksalyar

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

  4. ColdPie1 commented on May 16, 2015

    @ColdPie1

    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 [email protected]
    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
    
  5. Alibirb commented on May 16, 2015

    @Alibirb
    ContributorAuthor

    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.

  6. jdm commented on May 17, 2015

    @jdm
    Member

    cc @zmike for feedback

  7. added a commit that references this issue on May 17, 2015
  8. mmatyas commented on May 18, 2015

    @mmatyas
    Contributor

    I can also confirm that this solves the issue.

  9. zmike commented on May 19, 2015

    @zmike
    Contributor

    Should be resolved with my recent glutinup PR to servo.

  10. larsbergstrom commented on May 19, 2015

    @larsbergstrom
    Contributor

    Fixed by #6120

  11. qdot commented on May 22, 2015

    @qdot
    Contributor

    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

  12. mmatyas commented on May 26, 2015

    @mmatyas
    Contributor

    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.

  13. qdot commented on May 26, 2015

    @qdot
    Contributor

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

  14. tomaka commented on May 30, 2015

    @tomaka

    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.

  15. mukilan commented on May 30, 2015

    @mukilan
    Member

    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

  16. jdm commented on May 30, 2015

    @jdm
    Member

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

  17. zmike commented on Jun 3, 2015

    @zmike
    Contributor

    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.

  18. meteficha commented on Jun 3, 2015

    @meteficha

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

  19. mmatyas commented on Jun 3, 2015

    @mmatyas
    Contributor

    It works for me too, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gfx/renderingI-crashP-linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions