-
Notifications
You must be signed in to change notification settings - Fork 32
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
ReadOnlyMemoryError #107
Comments
Can you provide more context? Are you making any calls to GLFW before |
Sorry, sure some context might be helpful...
The error first showed up after I did a system update. I ran the same command on another (similar) one and it worked. So, this issue may not stem from GLFW.jl but from my system and if this is not the right place to discuss it, please let me know. But I'd be thankful for any help if you got an idea where this error comes from... |
I'm closing this issue since it sounds like it wasn't caused by GLFW.jl. Feel free to reopen if you now believe that GLFW.jl is the cause. Or add a note for future generations if you found the solution. |
I am having same problem with Ubuntu 16.04 and Archlinux. Both machines have an AMD gpu but different models. The first example of GLFW works for me. I don't know what additional information should I provide |
So it works from C, but not Julia? Can you provide the Julia code that causes it, and the stack trace from the error? |
If I run the last line again
dmesg say |
Can you try julia-debug and maybe gdb? also, did you compile GLFW into your system image by any chance? |
I have the same error whether I compile the shared library or I use the library located in deps. I compiled GLFW with debug symbols and in Julia fails in glfw-3.2.1/src/context.c:54 If I remove that line from GLFW I can create a window in Julia |
This issue #96 pointed me in the right direction. Apparently there is a problem when I compile julia with USE_SYSTEM_LLVM=1. When Julia compiles their own LLVM I can create the window without problems. |
Also seeing this. Looks like the problem is with multiple libLLVM are loaded in the same address space due to MESA/llvmpipe as in #96, but it's happening on Julia 0.6.1 generic build (Ubuntu 17.04). x-ref: JuliaLang/julia#19606 Before and after creating a Gtk GLArea with this test script:
|
This happens when Julia is compiled with certain parameters? Are you all building Julia yourselves or using prebuilt binaries? It seems like enough people have the issue that we should maybe add a blurb to the README about it, but I'd also like to figure out if there's some upstream issue to be raised. |
I'm building Julia myself and usually don't have any special parameters, but tried it now with |
Sorry, I was about 5-7 bug depth into my evening at this point and was commenting here as a potential FYI rather than necessarily for help, should have been clear about that 😄 (and there may be multiple issues conflated here)
In my case, I believe it's because of using mesa/llvmpipe graphics (I'm running ubuntu on virtualbox) or potentially other libraries that use LLVM at the same time as Julia. See JuliaLang/julia#19606 One work-around (for me) is to use LIBGL_ALWAYS_INDIRECT=1 but in real use that will probably be slow.
Yes -- the example is just showing that another version of libLLVM is loaded in the process after creating a GL context (which initializes mesa).
gdb |
Ah okay, so I did everything like you, but my process doesn't load a different llvm, since I'm not actually using the llvmpipe graphics. |
I am also experiencing the same issue on Arch Linux with AMD graphics. The GLFW getting started code runs fine, but I get the ReadOnlyMemoryException from Julia when creating a window. Has any progress been made on this issue using the binaries from julialang.org? |
Hi, when I try to create a window using
window = GLFW.CreateWindow(800, 600, "test")
I get the following error:
ERROR: LoadError: ReadOnlyMemoryError() in CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /home/andreas/.julia/v0.5/GLFW/src/glfw3.jl:351
Can you help me fix it? Thanks, Andreas
The text was updated successfully, but these errors were encountered: