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?