Just tried it on windows and it works fine, seems to be only crashing on linux...but why
When selecting a text in the edit box it will, sometimes(everytime if the edit box has a large text into it) cause the application to crash.
Here is a test case (try selecting the text in the edit box all the way to the end):
Code: Select all
//Irrlicht version: 1.7.2
//OS: linux
#include <cstdlib>
#include <irrlicht.h>
using namespace std;
using namespace irr;
using namespace gui;
using namespace scene;
using namespace video;
/*
*
*/
int main(int argc, char** argv)
{
IrrlichtDevice *device = createDevice(video::EDT_OPENGL, core::dimension2d<u32> (800, 600), 32, false, false, false);
if (!device)
return EXIT_FAILURE;
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
gui::IGUIEditBox* e1 = guienv->addEditBox(L"", core::rect<s32>(50,150,250,240),true);
e1->setText(L"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
"Aliquam venenatis leo vitae lorem tristique non congue felis blandit.\n"
"Aliquam et libero sapien. Nullam a adipiscing nunc");
e1->setAutoScroll(true);
e1->setMultiLine(true);
//e1->setMax(1024);
while (device->run())
{
driver->beginScene(true, true, video::SColor(0xFFA0A0A0));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
return EXIT_SUCCESS;
}
Code: Select all
TestEditbox: ../../include/irrString.h:330: T& irr::core::string<T, TAlloc>::operator[](irr::u32) [with T = wchar_t, TAlloc = irr::core::irrAllocator<wchar_t>]: Assertion `!(index>=used)' failed.
Aborted
Press [Enter] to close the terminal ...