Segmentation Error When Using Glad #1988

Closed
opened 2018-07-30 22:53:18 +00:00 by FatKatOriginal · 3 comments
FatKatOriginal commented 2018-07-30 22:53:18 +00:00 (Migrated from github.com)

Segmentation Error When Using Glad But Not GL3W on Ubuntu With Codeblocks, Does not happen for older ImGui I Think 1.51 or so. Dont really need solved if I need to use newer ImGui and just switch to unlicensed GL3W instead of GLAD but not sure what the issue is.

Segmentation Error When Using Glad But Not GL3W on Ubuntu With Codeblocks, Does not happen for older ImGui I Think 1.51 or so. Dont really need solved if I need to use newer ImGui and just switch to unlicensed GL3W instead of GLAD but not sure what the issue is.
ocornut commented 2018-07-30 23:01:56 +00:00 (Migrated from github.com)

Please provide more details. None of the code provided under the examples/ folder uses Glad so the information is in your camp to provide, and I don’t understand half of your message.

If you say there is a crash please provide a callstack. Most likely you aren’t using/initializaing Glad properly and this isn’t an imgui example issue.

Please provide more details. None of the code provided under the examples/ folder uses Glad so the information is in your camp to provide, and I don’t understand half of your message. If you say there is a crash please provide a callstack. Most likely you aren’t using/initializaing Glad properly and this isn’t an imgui example issue.
FatKatOriginal commented 2018-07-31 00:31:26 +00:00 (Migrated from github.com)

Dude thanks so much for ImGui and the fast reply!!!

I'm still learning programming. Not completely sure what the call stack thing is. The error codeblocks shows is something segementation error 139 and then some pointer address I think, not sure if that is what you mean by call stack. (All I am doing when testing is taking the example code Opengl/GLFW, and uncommenting glad and commenting GL3W, and then changing gl3wInit to glfwInit--so perhaps there are other things that work with my older version of ImGui with Glad that I would find if I analyze the differences more.

The custom non example code I have been testing I created with ImGui like a year ago with GLAD and am continuing development. I have been trying to get the new version of ImGui example code running in a blank project for a few weeks now. Today I finally tried with GL3W, instead of GLAD and it's working fine with that.

I prefer The Unlicense to MIT so will probably just switch to GL3W if and when I need to use a newer version of ImGUI. I can try to test it out and figure it out more if you want, But this is a minor issue and I will probably figure it out on my own. Just figured I'd mention that a quasi fixed my problem by just using GL3W instead of GLAD.

Omar any chance you would ever consider changing the ImGui license to "The Unlicense"?

Thanks again for everything!!

Dude thanks so much for ImGui and the fast reply!!! I'm still learning programming. Not completely sure what the call stack thing is. The error codeblocks shows is something segementation error 139 and then some pointer address I think, not sure if that is what you mean by call stack. (All I am doing when testing is taking the example code Opengl/GLFW, and uncommenting glad and commenting GL3W, and then changing gl3wInit to glfwInit--so perhaps there are other things that work with my older version of ImGui with Glad that I would find if I analyze the differences more. The custom non example code I have been testing I created with ImGui like a year ago with GLAD and am continuing development. I have been trying to get the new version of ImGui example code running in a blank project for a few weeks now. Today I finally tried with GL3W, instead of GLAD and it's working fine with that. I prefer The Unlicense to MIT so will probably just switch to GL3W if and when I need to use a newer version of ImGUI. I can try to test it out and figure it out more if you want, But this is a minor issue and I will probably figure it out on my own. Just figured I'd mention that a quasi fixed my problem by just using GL3W instead of GLAD. Omar any chance you would ever consider changing the ImGui license to "The Unlicense"? Thanks again for everything!!
ocornut commented 2018-07-31 09:19:42 +00:00 (Migrated from github.com)

A call-stack is the list of nested function calls (along with corresponding source code line) that led to the crash, which helps understand the cause of the crash. When you compile with debug information and use a debugger this is what the debugger should give you when you get a crash.

and then changing gl3wInit to glfwInit

You mean gladLoadGL() ? that's the initialization function for glad. glfwInit() is for GLFW which handle windowing and inputs. Glad and Gl3w only "load" OpenGL functions. If you don't load them (which is done at the time of initialization, here probably gladLoadGL) it is probable that the function pointers will be NULL and lead to a crash when called.
If you are using Glad please check out its documentation and examples.

No plan to change the license at the moment.

A call-stack is the list of nested function calls (along with corresponding source code line) that led to the crash, which helps understand the cause of the crash. When you compile with debug information and use a debugger this is what the debugger should give you when you get a crash. > and then changing gl3wInit to glfwInit You mean `gladLoadGL()` ? that's the initialization function for glad. `glfwInit()` is for GLFW which handle windowing and inputs. Glad and Gl3w only "load" OpenGL functions. If you don't load them (which is done at the time of initialization, here probably gladLoadGL) it is probable that the function pointers will be NULL and lead to a crash when called. If you are using Glad please check out its documentation and examples. No plan to change the license at the moment.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#1988
No description provided.