Absolute MetricsMode causes crash?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Just popping in
Just popping in
Posts: 7
Joined: Thu Jan 12, 2006 04:46

Absolute MetricsMode causes crash?

Postby Nyxojaele » Tue Jan 17, 2006 05:27

I'm having issues with Absolute MetricsMode in CEGUI...

There isn't any problems with Relative MetricsMode, as I can use it with something simple like:

Code: Select all

mWindow->setSize(CEGUI::Relative, CEGUI::Size(100, 100));

But if I do nothing but change it to Absolute, ala

Code: Select all

mWindow->setSize(CEGUI::Absolute, CEGUI::Size(100, 100));

my program freezes up for a moment, then crashes with a bad_alloc exception. The call stack doesn't have anything useful other than that it's hiding inside of CEGUIBase_d.dll (and eventually down to kernel) somewhere..

Have I maybe not done something I should have? I've seen nobody else mentioning this in the forums, which makes me think that I'm the error here... heh.

Okay, it's obviously me somewhere, as I can do an absolute size change earlier in the code... I guess I'll have to sift thru and see what the problem is. So now my question is: Does anybody know what could potentially cause this?

Still not sure what causes this, but I've narrowed it down enough to implement a different way to do things. I was passing a pointer to a CEGUI::Window into a structure, and passing that structure into a multiset. Then from the class holding the multiset, I would access the window via an iterator for the multiset. APPARENTLY this isn't good. For some reason. Using this method allows me to do everything else I've wanted to do with the window (including relative size changes, etc..), but I just couldn't do any absolute size changes. Anyways, I did a work around, and passed the name of the window into the initial structure, instead of a pointer to the window. Then I'd just call up the WindowManager singleton, and tell it to do a getWindow() on the name passed in. Strange behavior tho.. any thoughts?

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests