[fixed, workaround] MessageBox

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

[fixed, workaround] MessageBox

Post by Acki »

Hi,
I used this code:

Code: Select all

#include <irrlicht.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

int main(){
  IrrlichtDevice *device = createDevice(EDT_DIRECT3D9);
  IVideoDriver* driver = device->getVideoDriver();
  IGUIEnvironment* guienv = device->getGUIEnvironment();

  guienv->addMessageBox(L"aaa", L"bbb");

  while(device->run()){
    driver->beginScene(true, true, SColor(255,255,255,255));
    guienv->drawAll();
    driver->endScene();
  }
  device->drop();
  return 0;
}
when I run this the message box appears and has the focus...
if I press "Escape" the message box closes...
but if I then press "Escape" two times more the app crashes with the standard Windows error message ("The App has encountered a problem...") and the console tells "Process returned -1073741819 (0xC0000005)" !!! :shock:
this doesn't happen if I close the box via mouse click on "OK"...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks. Hm, I think the problem is that the focus is not removed in remove(). Maybe we should do that for all gui-elements.

edit: Hmpf, that's this stupid problem again that the gui-environment doesn't know yet when elements get removed(). I can fix it for the focus, but it also affects hovered elements which I can't fix without interface change :(
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I have added a workaround which will fix this crash in the svn 1.7 branch.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply