setting faulty text on a CEGUI::Spinner leads to a uncaught exception

Issue #866 resolved
Lukas Meindl created an issue

Problem occurs here on a non-numeric text input:

CEGUI_THROW(InvalidRequestException( "The string '" + getEditbox()->getText() + "' can not be converted to numerical representation."));

Should probably be caught internally?

Reproducibility: always

Steps to reproduce: make a CEGUI::Spinner and set a text string on it that is not a valid number

Additional information: CALLSTACK:

KernelBase.dll!_RaiseException@16() + 0x58 bytes msvcr100d.dll!CxxThrowException@8() + 0x52 bytes

CEGUIBase_d.dll!CEGUI::Spinner::getValueFromText() Line 282 + 0xdb bytes C++

CEGUIBase_d.dll!CEGUI::Spinner::handleEditTextChange(const CEGUI::EventArgs & formal={...}) Line 438 + 0x12 bytes C++ CEGUIBase_d.dll!CEGUI::MemberFunctionSlot<CEGUI::Spinner>::operator()(const CEGUI::EventArgs & args={...}) Line 55 + 0x1a bytes C++ CEGUIBase_d.dll!CEGUI::SubscriberSlot::operator()(const CEGUI::EventArgs & args={...}) Line 82 + 0x17 bytes C++ CEGUIBase_d.dll!CEGUI::Event::operator()(CEGUI::EventArgs & args={...}) Line 103 + 0x1e bytes C++ CEGUIBase_d.dll!CEGUI::EventSet::fireEvent_impl(const CEGUI::String & name={...}, CEGUI::EventArgs & args={...}) Line 199 C++ CEGUIBase_d.dll!CEGUI::EventSet::fireEvent(const CEGUI::String & name={...}, CEGUI::EventArgs & args={...}, const CEGUI::String & eventNamespace={...}) Line 160 C++ CEGUIBase_d.dll!CEGUI::Window::onTextChanged(CEGUI::WindowEventArgs & e={...}) Line 2216 + 0x21 bytes C++ CEGUIBase_d.dll!CEGUI::Editbox::onTextChanged(CEGUI::WindowEventArgs & e={...}) Line 904 C++ CEGUIBase_d.dll!CEGUI::Window::setText(const CEGUI::String & text={...}) Line 759 + 0x16 bytes C++ CEGUIBase_d.dll!CEGUI::Spinner::onTextChanged(CEGUI::WindowEventArgs & e={...}) Line 329 C++ CEGUIBase_d.dll!CEGUI::Window::setText(const CEGUI::String & text={...}) Line 759 + 0x16 bytes C++ CEGUIWidgetDemo-9999.0_d.dll!WidgetDemo::createWidget(const CEGUI::String & widgetMapping={...}, const CEGUI::String & widgetType={...}) Line 450 + 0xf bytes C++ CEGUIWidgetDemo-9999.0_d.dll!WidgetDemo::handleWidgetSelectionChanged(const CEGUI::EventArgs & args={...}) Line 264 + 0x22 bytes C++ CEGUIWidgetDemo-9999.0_d.dll!CEGUI::MemberFunctionSlot<WidgetDemo>::operator()(const CEGUI::EventArgs & args={...}) Line 55 + 0x14 bytes C++ CEGUIBase_d.dll!CEGUI::SubscriberSlot::operator()(const CEGUI::EventArgs & args={...}) Line 82 + 0x17 bytes C++ CEGUIBase_d.dll!CEGUI::Event::operator()(CEGUI::EventArgs & args={...}) Line 103 + 0x1e bytes C++ CEGUIBase_d.dll!CEGUI::EventSet::fireEvent_impl(const CEGUI::String & name={...}, CEGUI::EventArgs & args={...}) Line 199 C++ CEGUIBase_d.dll!CEGUI::EventSet::fireEvent(const CEGUI::String & name={...}, CEGUI::EventArgs & args={...}, const CEGUI::String & eventNamespace={...}) Line 160 C++ CEGUIBase_d.dll!CEGUI::Listbox::onSelectionChanged(CEGUI::WindowEventArgs & e={...}) Line 789 + 0x21 bytes C++ CEGUIBase_d.dll!CEGUI::Listbox::onMouseButtonDown(CEGUI::MouseEventArgs & e={...}) Line 890 + 0x16 bytes C++ CEGUIBase_d.dll!CEGUI::GUIContext::injectMouseButtonDown(CEGUI::MouseButton button=LeftButton) Line 724 + 0x16 bytes C++ CEGUISampleFramework_d.exe!SamplesFramework::injectMouseButtonDown(const CEGUI::MouseButton & ceguiMouseButton=LeftButton) Line 218 + 0x37 bytes C++ CEGUISampleFramework_d.exe!CEGuiGLFWSharedBase::glfwMouseButtonCallback(int key=0, int action=1) Line 220 + 0x19 bytes C++ glfw.dll!66ef6c66() [Frames below may be incorrect and/or missing, no symbols loaded for glfw.dll] glfw.dll!66ef5625() user32.dll!_InternalCallWinProc@20() + 0x23 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_CallWindowProcAorW@24() + 0x5e bytes user32.dll!_CallWindowProcW@20() + 0x1b bytes opengl32.dll!_wglWndProc@16() + 0x20b bytes user32.dll!_InternalCallWinProc@20() + 0x23 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchMessageWorker@8() + 0xed bytes user32.dll!_DispatchMessageA@4() + 0xf bytes glfw.dll!66ef69cc() glfw.dll!66ef63ac() CEGUISampleFramework_d.exe!CEGuiGLFWSharedBase::endRendering() Line 115 + 0x8 bytes C++ CEGUISampleFramework_d.exe!CEGuiBaseApplication::renderSingleFrame(const float elapsed=0.0030327723) Line 106 + 0xf bytes C++ CEGUISampleFramework_d.exe!CEGuiGLFWSharedBase::drawFrame() Line 127 C++ CEGUISampleFramework_d.exe!CEGuiGLFWSharedBase::run() Line 96 C++ CEGUISampleFramework_d.exe!CEGuiBaseApplication::execute(SamplesFrameworkBase * sampleApp=0x00d5fcbc) Line 160 + 0x15 bytes C++ CEGUISampleFramework_d.exe!SamplesFrameworkBase::runApplication() Line 267 + 0xf bytes C++ CEGUISampleFramework_d.exe!SamplesFrameworkBase::run() Line 130 + 0xf bytes C++ CEGUISampleFramework_d.exe!main(int formal=1, int formal=1) Line 61 + 0x8 bytes C++ CEGUISampleFramework_d.exe!tmainCRTStartup() Line 555 + 0x19 bytes C CEGUISampleFramework_d.exe!mainCRTStartup() Line 371 C kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!_RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!RtlUserThreadStart@8() + 0x1b bytes

Comments (2)

  1. Paul Turner

    I think I misunderstood when you raised this on #cegui yesterday. After reading the information here, if this only happens when calling setText, and not for instance, as a result of the user typing into the box, I think the behaviour is as intended and has always been this way as far as I am aware.

  2. Log in to comment