chunky
11-12-2007 01:28:58
Heya,
I really like the look of quickGUI and have started trying to use it, and have come across a crash. I imagine I'm missing something horribly obvious, but I simply don't see what I'm doing wrong, I hope someone can point me in the correct direction.
First, I inject events in OIS using code exactly taken from QuickGUIDemo.
Second, this is all my GUI code so far [literally, all of it]:
On-screen, that works fine and looks like this:
http://chunkyks.com/videos/firstwindow.mov
Of note is that at this point, there's no text in the titlebar of the window. I don't know if that's relevant, but it stands out to me.
All good so far. Next I click on the textbox, and the cursor appears at the far left. As soon as I hit a key, I get a segmentation fault.
Apologies for using a screenshot where text would arguably have been easier, I have a hard time getting XCode to give me text that's usefully pastable while debugging:
http://chunkyks.com/quickguicrash.png.
Basically it appears that the crash is due to QuickGUITextBox.cpp:186. This line returning NULL:
So, I don't really know how to progress. I'm pretty much certain that I haven't initialised something in my code, but I'm not sure. I looked at the wiki, specifically http://www.ogre3d.org/wiki/index.php/QuickGUI_Beginner_Tutorial_1, but I fell at the first hurdle there, "STEP 1 : Registering the configuration parser", since QuickGUI::registerScriptParser(); appears to not exist.
Thank-you very much for your time,
Gary (-;
I really like the look of quickGUI and have started trying to use it, and have come across a crash. I imagine I'm missing something horribly obvious, but I simply don't see what I'm doing wrong, I hope someone can point me in the correct direction.
First, I inject events in OIS using code exactly taken from QuickGUIDemo.
Second, this is all my GUI code so far [literally, all of it]:
mGUIManager = QuickGUI::GUIManager::getSingletonPtr();
mGUIManager->setup(mWindow->getWidth(),mWindow->getHeight());
mSheet = mGUIManager->getDefaultSheet();
mSheet->setDefaultFont("TuxWars");
// This font exists, and is the one I'm using for the stuff [fps/speed] you see at the top of the screen
mChatWindow = mSheet->createWindow("Chat Window",QuickGUI::Rect(0.0,0.8,0.4,0.19));
mChatInputTB = mChatWindow->createTextBox(QuickGUI::Rect(0,0.8,1.0,0.2));
On-screen, that works fine and looks like this:
http://chunkyks.com/videos/firstwindow.mov
Of note is that at this point, there's no text in the titlebar of the window. I don't know if that's relevant, but it stands out to me.
All good so far. Next I click on the textbox, and the cursor appears at the far left. As soon as I hit a key, I get a segmentation fault.
Apologies for using a screenshot where text would arguably have been easier, I have a hard time getting XCode to give me text that's usefully pastable while debugging:
http://chunkyks.com/quickguicrash.png.
Basically it appears that the crash is due to QuickGUITextBox.cpp:186. This line returning NULL:
Quad* character = mText->getCharacter((mCursorIndex - mVisibleStart) - 1);
So, I don't really know how to progress. I'm pretty much certain that I haven't initialised something in my code, but I'm not sure. I looked at the wiki, specifically http://www.ogre3d.org/wiki/index.php/QuickGUI_Beginner_Tutorial_1, but I fell at the first hurdle there, "STEP 1 : Registering the configuration parser", since QuickGUI::registerScriptParser(); appears to not exist.
Thank-you very much for your time,
Gary (-;