EventListener
EventListener
When I insert create an EventListener, I get random memory errors all over the place. It only makes an error when I initialize the class. Help? :/
//Charles
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
I was only testing the event receiver
EventReceiver:
And it would crash in absolutely random spots.
Once here:
Then I commented it out and tried again.
Broke here:
EventReceiver:
Code: Select all
class EventReceiver : public IEventReceiver
{
virtual bool OnEvent(const SEvent & event)
{
return false;
}
};
Once here:
Code: Select all
IrrXMLReader * Xml = createIrrXMLReader("main.xml");
while(Xml->read())
{
//read xml
}
Broke here:
Code: Select all
ITexture * Sky = Driver->getTexture("Sky.png");
//Charles
Please post a complete example which we can compile, otherwise we don't really see what's going wrong. Your EventReceiver class is likely not the problem (my guess would be you instantiate it within some scope which is no longer valid when the receiver object is needed).
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm