mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
Access Violation Error ImGui_Impl_OpenGL3 #3986
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#3986
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ImGui Docking Branch, version 1.82 WIP // ImGui GLFW and OpenGL 3 // MSVC // WIN32
Hello, I'm running into an issue I've never had before. When I run my program on my home computer, everything works fine, but I cloned my repository at school and when I start the program I have an error : Access violation executing location in imgui_impl_opengl3.cpp at line 682.
I can confirm ImGui and OpenGL works on the computer I tried because when I run an older version of my program, it works fine.
Here's a screenshot of the debugger

And here is my code (copied from the ImGui_Impl_openGL3 example)
And last, here is the link to my main file (where the window is implemented)
https://github.com/DonRomanooo/RomanoRender/blob/RomanoRender/RomanoRender/src/Main.cpp
First of all please confirm if the unmodified examples/ application work on this machine.
Then you will probably need to step in a debugger and check the different return values and GL errors to try to nail down what's happening.
I copy/pasted the example code in examples/example_glfw_opengl3/main.cpp and overriden the code in my main.cpp to see if it was a mistake I made, but it's not working. From the bit of debugging I tried while waiting for your answer, it seems that glCreateShader() returns 0 which means an error, but I haven't found any more information on this since then.
When I compile and run an older version program, which is using ImGui 1.79 (and not the docking branch), it works fine. The computer has OpenGL 4.6.
I'm not sure I understand your answer clearly or why you copy/paste example code.
Does running the example application unmodified (as provided in the repository) works?
I just meant that I tried to copied the example code over my existing code to test if the example code was working, and so there was a bug in my implementation.
I tested with the OpenGL3 example and it works fine yes !
Thank you. Well from this point if it isn't a bug in dear imgui examples nor backends it is an issue in your code and we unfortunately can't really debug your code.
Looking at the first screenshot I would say that your issue is that your GL loader are not initialized and
glCreateShader()points to NULL and therefore fails to execute. You need to make sure the loader used by the opengl3 backend has been initialized in your code. But your previous message suggests thatglCreateShader()which would contradict this, unless you misunderstood something in the debugger session.Try to step in
ImGui_ImplOpenGL3_Init()and check the value ofgl_loaderand make sure imgui_impl_opengl3 is using the same GL loader as the one that's initialized by your code.