Event Subscriber Crashes App.. need help :(

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Mystique7
Just popping in
Just popping in
Posts: 5
Joined: Thu Mar 30, 2006 15:18
Location: Hull, UK

Event Subscriber Crashes App.. need help :(

Postby Mystique7 » Thu Mar 30, 2006 23:50

Hi all,

Just started on CEGUI, and am so far very impressed.. it looks like it should save me a lot of time!

Have a small problem though that has been bugging me for the past couple of hours. Have read as many related topics on this forum about it as I can, and have tried many solution but nothing has worked so far.

The problem is that my App crashes with an 'Illegal Operation' style error. When I run the debugger, it says 'Access violation reading location 0x00000008'. Now, I'm pretty sure this error stems from the Event Subscriber function.. here's my code:

Code: Select all

   WindowManager& winMgr = WindowManager::getSingleton();
   Window* window = winMgr.getWindow("testWindow/Controls/Add");
   window->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&GUI::handleButton, this));

bool GUI::handleButton(const CEGUI::EventArgs& e) {

   // Do stuff here
   return true;
}



As can be seen, its all pretty normal looking (I think), however, if I comment the line beginning 'window->subscriber...' out, the App doesn't crash :?: .

Other notes on my situation are as follows:

I'm using Visual C++ 6.0 'cos Visual Studio 2003 keeps screwing stuff up, however, I'm currently using the RELEASE CEGUIBase.dll for the VS2003 build. This is because all other builds (CEGUIBase_d.dll and CEGUIBase.dll from the VS6.0) give 'Procedure Entry Point could not be located in x.dll' errors, even when I compile my own .dll :(

Anyway, any help would be greatly appreciated.

Thanks.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Fri Mar 31, 2006 00:52

The code looks fine, but the combo of visual studios sounds like trouble to me though!

Mystique7
Just popping in
Just popping in
Posts: 5
Joined: Thu Mar 30, 2006 15:18
Location: Hull, UK

Postby Mystique7 » Fri Mar 31, 2006 08:45

Ah right.. I didn't know there would be that much difference in the .dll files. I'd use the VS6.0 .dll files, but as I've already mentioned, they cause an error within themselves :( If I can get that sorted, it might be a step in the right direction.

Thanks for your help.

Mystique7
Just popping in
Just popping in
Posts: 5
Joined: Thu Mar 30, 2006 15:18
Location: Hull, UK

Postby Mystique7 » Fri Mar 31, 2006 15:14

Well, I think I've got it working now. I decided to switch to VS2003, and use the VS2003 DLL files. App doesn't crash now, which is good, but the event doesn't work either :P I think thats my fault though.

Hmm, just wondering though.. is there much difference between the DEBUG and RELEASE DLLs? I ask because the VS2003 DEBUG DLL gives an error about directx_27.dll or something, which is included in the August 2005 DirectX9.0 redistributable, but I can't install it 'cos *cough*haxedwindows*cough* ;) I do now have a legit CD-Key, but I don't really want to format just yet.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Fri Mar 31, 2006 23:07

There are links on google to a directx 9 sdk feb 2006 that do not require windows genuine validation!

Mystique7
Just popping in
Just popping in
Posts: 5
Joined: Thu Mar 30, 2006 15:18
Location: Hull, UK

Postby Mystique7 » Sat Apr 01, 2006 10:53

Well I have the Feb SDK (had it for a while now), but it still whines about that .dll from August :?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests