Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

GLVisualize.glscreen() crashes Julia client #60

Closed
rapus95 opened this issue Feb 26, 2016 · 18 comments
Closed

GLVisualize.glscreen() crashes Julia client #60

rapus95 opened this issue Feb 26, 2016 · 18 comments

Comments

@rapus95
Copy link

rapus95 commented Feb 26, 2016

When trying to run GLVisualize.glscreen() the whole Julia client hangs up. Since the exception stated to file a bug report I came here hoping to get a fix for this.

(I got a similar error when using GLWindow (JuliaGL/GLWindow.jl#27))

julia> GLVisualize.glscreen()

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1a634600 -- glfwGetMonitorName at C:\WINDOWS\SYSTEM32\glfw3.DLL (unknown line)
while loading no file, in expression starting on line 0
glfwGetMonitorName at C:\WINDOWS\SYSTEM32\glfw3.DLL (unknown line)
call at C:\Users\necka\.julia\v0.5\GLFW\src\glfw3.jl:325
primarymonitorresolution at C:\Users\necka\.julia\v0.5\GLWindow\src\core.jl:40
standard_screen_resolution at C:\Users\necka\.julia\v0.5\GLWindow\src\screen.jl:154
julia_glscreen_1809 at  (unknown line)
glscreen at C:\Users\necka\.julia\v0.5\GLVisualize\src\renderloop.jl:9
julia_glscreen_1807 at  (unknown line)
jlcall_glscreen_1807 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_expr at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_thunk_with at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_f_tuple at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval at boot.jl:263
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval_user_input at REPL.jl:3
jlcall_eval_user_input_1211 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
anonymous at REPL.jl:92
jl_switchto at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
@SimonDanisch
Copy link
Member

Do have the newest version of GLWindow and GLVisualize? If yes, do have a code sample to reproduce this?

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

minimal working sample:

using GLWindow, GLVisualize
GLVisualize.glscreen()

well thinking about the reasons i might ask whether it's because i use Julia 0.5?
Version 0.5.0-dev+1526 (2015-11-30 04:16 UTC)
Commit b775873 (88 days old master)

@blegat
Copy link

blegat commented Feb 26, 2016

I use Julia 0.5:

Version 0.5.0-dev+1491 (2015-11-27 16:54 UTC)
Commit 41fb1ba (90 days old master)
x86_64-linux-gnu

and everything works fine

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

i'm on windows so maybe there is some problem with the UAC?

@SimonDanisch
Copy link
Member

Could you try:

using GLFW
monitor=GLFW.GetPrimaryMonitor()
GLFW.GetMonitorName(monitor)

?

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

the last call crashes in the same exception

julia> GLFW.GetMonitorName(monitor)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x61554600 -- glfwGetMonitorName at C:\WINDOWS\SYSTEM32\glfw3.DLL (unknown line)
while loading no file, in expression starting on line 0
glfwGetMonitorName at C:\WINDOWS\SYSTEM32\glfw3.DLL (unknown line)
GetMonitorName at C:\Users\necka\.julia\v0.5\GLFW\src\glfw3.jl:325
jlcall_GetMonitorName_1678 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_expr at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_thunk_with at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_f_tuple at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval at boot.jl:263
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval_user_input at REPL.jl:3
jlcall_eval_user_input_1205 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
anonymous at REPL.jl:92
jl_switchto at C:\Program Files\Julia\bin\libjulia.dll (unknown line)

@SimonDanisch
Copy link
Member

Okay so your GLFW is broken in some way...
You said something like "I installed the newest version" .... Did you try to just let GLFW install it with Pkg.build("GLFW")?

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

i haven't done before but now i did and now i'm getting an even more weird error (this time the error itself says in an unknown function):

julia> using GLFW

julia> monitor=GLFW.GetPrimaryMonitor()
Monitor(Ptr{Void} @0x0000000000000000)

julia> GLFW.GetMonitorName(monitor)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x61554600 -- unknown function (ip: 0000000061554600)
while loading no file, in expression starting on line 0
glfwGetMonitorName at  (unknown line)
GetMonitorName at C:\Users\necka\.julia\v0.5\GLFW\src\glfw3.jl:325
jlcall_GetMonitorName_1727 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_expr at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_interpret_toplevel_thunk_with at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_eval_with_compiler_p at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_f_tuple at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval at boot.jl:263
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval_user_input at REPL.jl:3
jlcall_eval_user_input_1205 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
anonymous at REPL.jl:92
jl_switchto at C:\Program Files\Julia\bin\libjulia.dll (unknown line)

@SimonDanisch
Copy link
Member

huh... now that I look at the code in glfw3.jl:325, this might as well some problem with ccall.
Can you try:

ccall( (:glfwGetMonitorName, GLFW.lib), Ptr{Cchar}, (GLFW.Monitor,), monitor)

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

yeah it's erroring:

julia> using GLFW

julia> monitor=GLFW.GetPrimaryMonitor()
Monitor(Ptr{Void} @0x0000000000000000)

julia> ccall( (:glfwGetMonitorName, GLFW.lib), Ptr{Cchar}, (GLFW.Monitor,), monitor)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x61554600 -- unknown function (ip: 0000000061554600)
while loading no file, in expression starting on line 0
glfwGetMonitorName at  (unknown line)
anonymous at essentials.jl:114
jl_eval_with_compiler_p at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
jl_f_tuple at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval at boot.jl:263
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
eval_user_input at REPL.jl:3
jlcall_eval_user_input_1204 at  (unknown line)
jl_apply_generic at C:\Program Files\Julia\bin\libjulia.dll (unknown line)
anonymous at REPL.jl:92
jl_switchto at C:\Program Files\Julia\bin\libjulia.dll (unknown line)

@SimonDanisch
Copy link
Member

oh... the first one is already null ... This is why people preach about proper error checks!
You don't happen to have no monitor? :D

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

I've a laptop so it's some kind of built-in monitor

(but a plug to connect to my eyes would be nice too :D)

@SimonDanisch
Copy link
Member

hmm... So this could happen if GLFW.Init() wasn't called... But this should have been called in the __init__() of GLFW... Can you try to put it before the call nevertheless?

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

Still null :/
Btw i'm having Nivida Optimus (Nvidia GPU & Intel GPU at once while Nvidia data is passed through the intel GPU

julia> using GLFW

julia> GLFW.Init()
true

julia> monitor=GLFW.GetPrimaryMonitor()
Monitor(Ptr{Void} @0x0000000000000000)

@SimonDanisch
Copy link
Member

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

so i uninstalled my intel gpu since there isn't any dedicated entry for a monitor
(->800x600 resolution) but after some mins windows recognized it back and now primaryMonitor atleast doesn't return null anymore :D

Tested one of the examples. Everything works fine now (except some performance problems...)
So is there a way to specify what gpu to use?

P.S. I gonna close the related issue in GLWindow ...

@SimonDanisch
Copy link
Member

uh, I guess this would be much rather a driver issue... Usually you can tell your driver settings what GPU to use.
Since GLVisualize won't work with multiple GPU's anytime soon, this shouldn't be at all handled on the GLVisualize level.

@rapus95
Copy link
Author

rapus95 commented Feb 26, 2016

ok then finally thanks for supporting to resolve my individual problems and i'm feeling a bit ashamed for requiring so much of your time that could be used for further improving the whole julia environment x)

@rapus95 rapus95 closed this as completed Feb 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants