That isn't really a fix, rather the thing that shows you the problem. Original problem is a divsion by 0 in CEGUI code. The code indicated below makes sure that divison by 0 actually results in an exception so execution is breaked (otherwise it just continues happily).
What i would suggest is that you look over your skin/layout file and make sure you don't have any zero width components. I would also suggest that you contact the CEGUI people and make them aware that they might need a 0-check in loading/setup or something like that. -MÃ¥rten Quoting David Hendrickson <[EMAIL PROTECTED]>: > I fixed it! The code that was causing the error is: > > #ifdef CS_DEBUG > > // enable all kinds of useful FPU exceptions on a x86 > > // note that we can't do it above since at least on OS/2 each dynamic > > // library on loading/initialization resets the control word to default > > csControl87 (0x33, 0x3f); > > #else > > // this will disable exceptions on DJGPP (for the non-debug version) > > csControl87 (0x3f, 0x3f); > > #endif > > > > Which had come from the walktest app. > > ----- Original Message ----- > From: David Hendrickson > To: [email protected] > Sent: Wednesday, December 06, 2006 11:00 AM > Subject: [CsMain] Floating point exception in CEGUI > > > Greetings, > > I am attempting to add CEGUI into my app and am getting a curious > error while trying to load the layout: > > Floating point exception (core dumped) > > > I have performed a backtrace, here is the output: > > Program received signal SIGFPE, Arithmetic exception. > [Switching to Thread -1227782480 (LWP 23030)] > 0xad39e4bc in CEGUI::FalagardScrollbar::updateThumb > (this=0x98cd000) at FalScrollbar.cpp:87 > 87 theThumb->setHorzRange(area.d_left / w->getPixelSize().d_width, > (area.d_left + slideExtent) / w->getPixelSize().d_width); > (gdb) backtrace > #0 0xad39e4bc in CEGUI::FalagardScrollbar::updateThumb > (this=0x98cd000) at FalScrollbar.cpp:87 > #1 0xad39de41 in > CEGUI::FalagardScrollbar::performChildWindowLayout (this=0x98cd000) > at FalScrollbar.cpp:63 > #2 0xb7e0d64f in CEGUI::Window::performChildWindowLayout > (this=0x98ca030) at CEGUIWindow.cpp:2246 > #3 0xb7e826d2 in CEGUI::Scrollbar::initialiseComponents > (this=0x98ca030) at elements/CEGUIScrollbar.cpp:118 > #4 0xb7e0ba7e in CEGUI::Window::setLookNFeel (this=0x98ca030, > [EMAIL PROTECTED]) at CEGUIWindow.cpp:2201 > #5 0xb7e2071b in CEGUI::WindowManager::createWindow > (this=0x97b4cc8, [EMAIL PROTECTED], [EMAIL PROTECTED]) at > CEGUIWindowManager.cpp:107 > #6 0xb7eb7cfa in CEGUI::WidgetComponent::create (this=0x98607a8, > [EMAIL PROTECTED]) at falagard/CEGUIFalWidgetComponent.cpp:50 > #7 0xb7eba528 in CEGUI::WidgetLookFeel::initialiseWidget > (this=0x9860168, [EMAIL PROTECTED]) at > falagard/CEGUIFalWidgetLookFeel.cpp:132 > #8 0xb7e0ba73 in CEGUI::Window::setLookNFeel (this=0x98c7a70, > [EMAIL PROTECTED]) at CEGUIWindow.cpp:2199 > #9 0xb7e2071b in CEGUI::WindowManager::createWindow > (this=0x97b4cc8, [EMAIL PROTECTED], [EMAIL PROTECTED]) at > CEGUIWindowManager.cpp:107 > #10 0xb7dd296f in CEGUI::GUILayout_xmlHandler::elementWindowStart > (this=0xbfeed2c4, [EMAIL PROTECTED]) at > CEGUIGUILayout_xmlHandler.cpp:205 > > > > The code I am using is almost identical to the code found in the > ceguitest app, and I am using identical data files (ice.layout, > ice.scheme, etc) as the ceguitest app. The ceguitest app is still > working perfectly. The only major difference is that my app is using > CEL. Here is the related code: > > // Initialize CEGUI wrapper > cegui->Initialize (); > > // Set the logging level > cegui->GetLoggerPtr ()->setLoggingLevel(CEGUI::Informative); > > #if (CEGUI_VERSION_MAJOR == 0) && (CEGUI_VERSION_MINOR >= 5) > // Use the 0.5 version of the skin > myVFS->ChDir ("/ceguitest/0.5/"); > #else > // Use the old version of the skin > myVFS->ChDir ("/ceguitest/"); > #endif > > // Load the ice skin (which uses Falagard skinning system) > cegui->GetSchemeManagerPtr ()->loadScheme("ice.scheme"); > cegui->GetSystemPtr ()->setDefaultMouseCursor("ice", "MouseArrow"); > > #if (CEGUI_VERSION_MAJOR == 0) && (CEGUI_VERSION_MINOR >= 5) > CEGUI::Font* font = cegui->GetFontManagerPtr > ()->createFont("FreeType", "Vera", "/fonts/ttf/Vera.ttf"); > font->setProperty("PointSize", "10"); > font->load(); > #else > cegui->GetFontManagerPtr ()->createFont("Vera", > "/fonts/ttf/Vera.ttf", 10, CEGUI::Default); > #endif > > CEGUI::WindowManager* winMgr = cegui->GetWindowManagerPtr (); > > // Load layout and set as root > cegui->GetSystemPtr > ()->setGUISheet(winMgr->loadWindowLayout("ice.layout")); > > // Subscribe to the clicked event for the exit button > CEGUI::Window* btn = winMgr->getWindow("Demo7/Window1/Quit"); > btn->subscribeEvent(CEGUI::PushButton::EventClicked, > CEGUI::Event::Subscriber(&WalkTest::OnExitButtonClicked, this)); > > myVFS->ChDir ("/"); > > > > > > I am using CS and CEL 1.0rc1 and CEGUI 0.5. Compiling on Ubuntu > 6.1 with gcc 4.1.2. > > Any help would be greatly appreciated. > > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Crystal-main mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/crystal-main > Unsubscribe: > mailto:[EMAIL PROTECTED] > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Crystal-main mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-main Unsubscribe: mailto:[EMAIL PROTECTED]
