When using WindowManager::loadWindowLayout with a C string string literal passed as the name_prefix, the incorrect overload of loadWindowLayout may be invoked, causing instead the use of a randomly generated prefix.
Steps to reproduce: This code will cause an unknown object exception: Window* sheet = winMgr.loadWindowLayout("Demo7Windows.layout", "test"); Window* wnd = sheet->getChild("testDemo7/Window1");
The window actually being named "0_Demo7/Window1"
Note that this code (explicitly using CEGUI::String) avoids the issue, so no exception is thrown: Window* sheet = winMgr.loadWindowLayout("Demo7Windows.layout", String("test")); Window* wnd = sheet->getChild("testDemo7/Window1");
Additional information: Since it has become common usage to use C style string literals with CEGUI function calls, it should be acceptable to assume that the use of them in this instance would not cause the issue that it does.
Any fix for this will require API changes of one form or another, so the fix will have to be done in trunk. A note in the docs will be added for branches/v0-6 to draw attention to the possible issue.