Hi!
I'm pretty new to C++, OpenGL and mostly CEGUI, but I am working on a school project. The main application runs fine, now I only want to add some GUI elements with CEGUI. My problem is, after calling CEGUI::OpenGLRenderer::bootstrapSystem(); I simply want to render the GUI (or do ANYTHING with CEGUI::System). But no matter what I try, my application always crashes. gDEBugger showed me it is a Second chance exception, "the thread tried to read from or write to a virtual address for which it does not have access".
Now I understand, what the exception mean and I tried to find some solution using Google of course, but right now I am simply stuck.
I am using CEGUI 0.7.5 (I know... please focus on the problem) and SDL2. I've set all search directories in code::blocks, the linker options as well and copied the required .dlls to the right folder. (Yeah, I've included the headers )
If you need some code snippets, let me know, but right know I have no idea what can be wrong and I don't want to spam the forum with all my codes.
Thanks for any help in advance!
Second chance exception on CEGUI::System::getSingleton().*
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 2
- Joined: Thu Apr 07, 2016 17:37
Re: Second chance exception on CEGUI::System::getSingleton().*
Pilgrim0819: let's start with a backtrace. And plz post the most minimal cegui code that doesn't work for u. That should do for a start.
Re: Second chance exception on CEGUI::System::getSingleton().*
Did you create the opengl context before you do this call?
CrazyEddie: "I don't like GUIs"
-
- Just popping in
- Posts: 2
- Joined: Thu Apr 07, 2016 17:37
Re: Second chance exception on CEGUI::System::getSingleton().*
First of all, yes, I create the oepngl context before this call. Basically, I start to initialize CEGUI after anything else...
Now the minimal code is really not much, but here it is:
(after initializing SDL...)
void SDLManager::initCEGUI(){
CEGUI::OpenGLRenderer& cegui_renderer = CEGUI::OpenGLRenderer::create(CEGUI::Size(1024.f, 768.f));
}
(later on, at the end of my Draw() function...)
CEGUI::System::getSingleton().renderGUI();
And this line causes my app to crash. (Or any other CEGUI::System::getSingleton().* function calls).
Now the minimal code is really not much, but here it is:
(after initializing SDL...)
void SDLManager::initCEGUI(){
CEGUI::OpenGLRenderer& cegui_renderer = CEGUI::OpenGLRenderer::create(CEGUI::Size(1024.f, 768.f));
}
(later on, at the end of my Draw() function...)
CEGUI::System::getSingleton().renderGUI();
And this line causes my app to crash. (Or any other CEGUI::System::getSingleton().* function calls).
Re: Second chance exception on CEGUI::System::getSingleton().*
please post the log and show the callstack..
CrazyEddie: "I don't like GUIs"
Who is online
Users browsing this forum: No registered users and 21 guests