Critical Error - Open GL component is disabled.
JakeZw opened this issue · 6 comments
In trying to run some of the examples in the manual, I came across an error that states my open GL component is disabled.
`julia> render_area = RenderArea()
(julia.exe:47448): mousetrap-CRITICAL **: 15:16:34.050: In RenderArea(): trying to instantiate RenderArea, but the OpenGL component is disabled.
RenderArea()`
Duplicate of: #54
RenderArea
is currently not available on certain MacOS architectures. While it should be fixable, I have no way to do so as I would need a physical apple machine to debug this and Apple makes it impossible to debug from another OS.
Until then, you are unable to use the RenderArea
widget, I'm sorry.
If you are not on an Apple device, please post your system info. So far, everytime this has occurred it has always been one of the newer macs though
The error remains on both a Linux box and Win 11 machine. On first execution on the Win 11 machine I get
julia> render_area = RenderArea() RenderArea()
And on the second execution
`julia> render_area = RenderArea()
(julia.exe:22664): mousetrap-CRITICAL **: 11:13:53.570: In RenderArea(): trying to instantiate RenderArea, but the OpenGL component is disabled.
RenderArea()`
One the Linux machine I get the error when executing
using Mousetrap
The Win 11 machine has the 'Intel(R) UHC Graphics 630' hardware.
Ubuntu has a '3rd Gen Core processor graphics controller'
I am guessing it is a hardware issue?
It's usually a diver issue, but it may also be a hardware issue, though I have never encountered this on Windows before.
What version of ubuntu are you using, also do you have all OpenGL drivers installed? The apt package is called mesa-dev I think.
The error persists on both Ubuntu and Win 11 .
Win 11 gives
`julia> render_area = RenderArea()
(julia.exe:31760): mousetrap-CRITICAL **: 18:20:09.972: In RenderArea(): trying to instantiate RenderArea, but the OpenGL component is disabled.
RenderArea()`
For Ubuntu I installed OpenGL via sudo apt install freeglut3-dev
There is another method I found but have not yet tried https://medium.com/geekculture/a-beginners-guide-to-setup-opengl-in-linux-debian-2bfe02ccd1e
Ubuntu is version 23.10
The current error message is:
precompiling project... 147 dependencies successfully precompiled in 190 seconds. 5 already precompiled. 1 dependency had output during precompilation: ┌ Mousetrap │ (process:21577): mousetrap-WARNING **: 20:32:05.444: In gdk_window_create_gl_context:Failed to create EGL display │ │ (process:21577): mousetrap-CRITICAL **: 20:32:05.444: In initialize_opengl: Unable to create global OpenGL context, disabling the
RenderArea` widget
└
Testing Running tests...
(process:21599): mousetrap-WARNING **: 20:32:39.504: In gdk_window_create_gl_context:Failed to create EGL display
(process:21599): mousetrap-CRITICAL **: 20:32:39.504: In initialize_opengl: Unable to create global OpenGL context, disabling the RenderArea
widget
[ERROR] In Mousetrap.main: MethodError: Cannot convert
an object of type Nothing to an object of type Mousetrap.detail._Window
Closest candidates are:
convert(::Type{Mousetrap.detail._Window}, ::Mousetrap.detail._WindowAllocated)
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:686
convert(::Type{Mousetrap.detail._Window}, ::Mousetrap.detail._WindowDereferenced)
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:687
convert(::Type{Mousetrap.detail._Window}, ::T) where T<:Mousetrap.detail._Window
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:682
...
Stacktrace:
[1] Window(_internal::Nothing)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:400
[2] (::var"#176#180")(app::Application)
@ Main ~/.julia/packages/Mousetrap/CHEs7/test/runtests.jl:2874
[3] (::TypedFunction)(args::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:91
[4] (::Mousetrap.var"#14#15"{TypedFunction})(app::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1542
[5] (::TypedFunction)(args::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:91
[6] (::Mousetrap.var"#6#8"{TypedFunction})(x::Tuple{CxxWrap.CxxWrapCore.CxxRef{Mousetrap.detail._Application}})
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:657
[7] safe_call(scope::String, f::Function, args::Tuple{CxxWrap.CxxWrapCore.CxxRef{Mousetrap.detail._Application}})
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:190
[8] run!(arg1::Mousetrap.detail._ApplicationAllocated)
@ Mousetrap.detail ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
[9] run!(app::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1511
[10] main(f::Function, application_id::String)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1552
[11] top-level scope
@ ~/.julia/packages/Mousetrap/CHEs7/test/runtests.jl:2785
[12] include(fname::String)
@ Base.MainInclude ./client.jl:489
[13] top-level scope
@ none:6
[14] eval
@ ./boot.jl:385 [inlined]
[15] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:291
[16] _start()
@ Base ./client.jl:552
Testing Mousetrap tests passed
julia> using Mousetrap
(process:18750): mousetrap-WARNING **: 20:33:15.791: In gdk_window_create_gl_context:Failed to create EGL display
(process:18750): mousetrap-CRITICAL **: 20:33:15.791: In initialize_opengl: Unable to create global OpenGL context, disabling the RenderArea
widget
julia> render_area = RenderArea()
(process:18750): mousetrap-CRITICAL **: 20:33:28.276: In RenderArea(): trying to instantiate RenderArea, but the OpenGL component is disabled.
RenderArea()
julia> pwd()
"/home/jake"
julia> Precompiling project...
147 dependencies successfully precompiled in 190 seconds. 5 already precompiled.
1 dependency had output during precompilation:
┌ Mousetrap
│ (process:21577): mousetrap-WARNING **: 20:32:05.444: In gdk_window_create_gl_context:Failed to create EGL display
│
│ (process:21577): mousetrap-CRITICAL **: 20:32:05.444: In initialize_opengl: Unable to create global OpenGL context, disabling the RenderArea
widget
└
Testing Running tests...
(process:21599): mousetrap-WARNING **: 20:32:39.504: In gdk_window_create_gl_context:Failed to create EGL display
(process:21599): mousetrap-CRITICAL **: 20:32:39.504: In initialize_opengl: Unable to create global OpenGL context, disabling the `RenderArea` widget
[ERROR] In Mousetrap.main: MethodError: Cannot `convert` an object of type Nothing to an object of type Mousetrap.detail._Window
Closest candidates are:
convert(::Type{Mousetrap.detail._Window}, ::Mousetrap.detail._WindowAllocated)
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:686
convert(::Type{Mousetrap.detail._Window}, ::Mousetrap.detail._WindowDereferenced)
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:687
convert(::Type{Mousetrap.detail._Window}, ::T) where T<:Mousetrap.detail._Window
@ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:682
...
Stacktrace:
[1] Window(_internal::Nothing)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:400
[2] (::var"#176#180")(app::Application)
@ Main ~/.julia/packages/Mousetrap/CHEs7/test/runtests.jl:2874
[3] (::TypedFunction)(args::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:91
[4] (::Mousetrap.var"#14#15"{TypedFunction})(app::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1542
[5] (::TypedFunction)(args::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:91
[6] (::Mousetrap.var"#6#8"{TypedFunction})(x::Tuple{CxxWrap.CxxWrapCore.CxxRef{Mousetrap.detail._Application}})
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:657
[7] safe_call(scope::String, f::Function, args::Tuple{CxxWrap.CxxWrapCore.CxxRef{Mousetrap.detail._Application}})
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:190
[8] run!(arg1::Mousetrap.detail._ApplicationAllocated)
@ Mousetrap.detail ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
[9] run!(app::Application)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1511
[10] main(f::Function, application_id::String)
@ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1552
[11] top-level scope
@ ~/.julia/packages/Mousetrap/CHEs7/test/runtests.jl:2785
[12] include(fname::String)
@ Base.MainInclude ./client.jl:489
[13] top-level scope
@ none:6
[14] eval
@ ./boot.jl:385 [inlined]
[15] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:291
[16] _start()
@ Base ./client.jl:552
Testing Mousetrap tests passed
julia> using Mousetrap
(process:18750): mousetrap-WARNING **: 20:33:15.791: In gdk_window_create_gl_context:Failed to create EGL display
(process:18750): mousetrap-CRITICAL **: 20:33:15.791: In initialize_opengl: Unable to create global OpenGL context, disabling the `RenderArea` widget
julia> render_area = RenderArea()
(process:18750): mousetrap-CRITICAL **: 20:33:28.276: In RenderArea(): trying to instantiate RenderArea, but the OpenGL component is disabled.
RenderArea()
julia>
`
FYI, I just see this warning raised in my wayland session on kde plasma. X11 session is perfectly fine with RenderArea
.
As a workaround, force gtk back to XWayland in a wayland session:
env GDK_BACKEND=x11 julia
Hi, I have Dell laptop with Windows 1, graphic card Intel UHD 620 which uses OpenCl instead of OpenGl without administrator privileges. Is there any way around to install OpenGl or use mousetrap without OpenGl?