I am having the infamous SubscribeEvent crash. I have read the forums and checked some of the other issues and solutions folks have had, and none seem to apply in my case.
My game runs ok, in VC2k3.net, building cegui 0.4. I am having unrelated issues that make me want to try VC2k8 express edition ( sp1 ).
The game compiles & runs fine in debug mode in vc2k8, rebuilding cegui and my app using multithreaded debug dll libraries, neither one using STL port. When I build & run in release mode, multithreaded dll, i crashes on my 1st SubscribeEvent call.
I have checked via dependencywalker that the app only is loading my freshly built ceguibase.dll, ceguifalgardbase.dll and directx9GUIrenderer.dll, and not the debug versions.
Please Help!
Another SubscribeEvent Crash
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
At this stage I'm not certain what you've done wrong.
Can you please post the exact error that you're getting and a call stack showing where things are going awry (I'm aware that this may not actually be much use in Release mode without symbols ).
Due to the nature of the issue, it's highly likely I'll have to ask for other info too if/when the above does not shed any light.
CE.
At this stage I'm not certain what you've done wrong.
Can you please post the exact error that you're getting and a call stack showing where things are going awry (I'm aware that this may not actually be much use in Release mode without symbols ).
Due to the nature of the issue, it's highly likely I'll have to ask for other info too if/when the above does not shed any light.
CE.
Still broken
Ok, after converting over to my own freshly built cegui v 0.6, again built with the same settings as my exe, it works in debug mode ( at least doesn't crash ), but crashes in subscribeevent in release mode.
I am very sad.
First-chance exception at 0x0068cb8c in AncientGalaxy.exe: 0xC0000005: Access violation reading location 0x00000008.
at this line : mpBackBtn->subscribeEvent( CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &MainMenu::HandleBackToGame, this ) );
Right after i step over
template<typename T>
SubscriberSlot(bool (T::*function)(const EventArgs&), T* obj) :
d_functor_impl(new MemberFunctionSlot<T>(function, obj))
{}
It goes back to the subscribeEvent line above, i attempt to step in, then the crash.
I am using vc2k8 sp1 beta.
I am very sad.
First-chance exception at 0x0068cb8c in AncientGalaxy.exe: 0xC0000005: Access violation reading location 0x00000008.
at this line : mpBackBtn->subscribeEvent( CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &MainMenu::HandleBackToGame, this ) );
Right after i step over
template<typename T>
SubscriberSlot(bool (T::*function)(const EventArgs&), T* obj) :
d_functor_impl(new MemberFunctionSlot<T>(function, obj))
{}
It goes back to the subscribeEvent line above, i attempt to step in, then the crash.
I am using vc2k8 sp1 beta.
quick update
As a test, I changed the subscribe function to a static member function, and got it compiling, ran, and now it crashes as soon as I try to step into the subscribeEvent call, so looks like the pointer to member function was not the issue...
this
In debug mode, everything is fine, and i can walk through the whole shebang.
In Ship mode ( optimizations on but also debug symbols ), I can step into the 1st template function, in which case the mpBackButton is still valid, but after i next hit F11, and it comes back out to the calling scope that calls SubscribeEvent, then mpBackButton is set to 0x0000000d, so something is getting corrupted.
In Ship mode ( optimizations on but also debug symbols ), I can step into the 1st template function, in which case the mpBackButton is still valid, but after i next hit F11, and it comes back out to the calling scope that calls SubscribeEvent, then mpBackButton is set to 0x0000000d, so something is getting corrupted.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Still broken
Hi,
This is worrying me at the moment:
I'm not saying it's definitely this, though using a beta compiler, other than for the purposes of testing said compiler, is asking for trouble. Is there any chance you can try the same code on a version of the compiler without the beta service pack installed?
Does a minimal example exhibit the same result?
CE.
This is worrying me at the moment:
simmerd wrote:I am using vc2k8 sp1 beta.
I'm not saying it's definitely this, though using a beta compiler, other than for the purposes of testing said compiler, is asking for trouble. Is there any chance you can try the same code on a version of the compiler without the beta service pack installed?
Does a minimal example exhibit the same result?
CE.
Some more clues.
Re : beta compiler - yes, I know, I only used it b/c of a large compiler bug in the released version. I have d/l vc2k5 express edition and will try that later.
Ok, a new clue : I tried setting all dlls to '_CRT_SECURE_NO_DEPRECATE' and '_SECURE_SCL=0', and now I get past the line, and have a crash in my app, which still shouldn't happen, but at least it's not crashing in CEGUI right now.
Assuming I can fix this, my next step is to get the GUI visible on the screen - it's invisible right now, although I am getting text.
BTW, what is the technique in CEGUI 0.6 to set font sizes for text I mean to just draw arbitrarily at runtime?
Ok, a new clue : I tried setting all dlls to '_CRT_SECURE_NO_DEPRECATE' and '_SECURE_SCL=0', and now I get past the line, and have a crash in my app, which still shouldn't happen, but at least it's not crashing in CEGUI right now.
Assuming I can fix this, my next step is to get the GUI visible on the screen - it's invisible right now, although I am getting text.
BTW, what is the technique in CEGUI 0.6 to set font sizes for text I mean to just draw arbitrarily at runtime?
Stopped the crash!
Ok, here is the solution for those who enter the same hell I did. Make sure you compile all of your DLLs with the same _SECURE_SCL setting. Making that consistent was the key. Seems like it uses incompatible heaps or something??!?
I am still having trouble getting my gui converted from 0.4 to 0.6, but will start a separate thread on that...
I am still having trouble getting my gui converted from 0.4 to 0.6, but will start a separate thread on that...
Who is online
Users browsing this forum: No registered users and 15 guests