Unhandled execption on System::create()

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

RickP
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Sat Mar 13, 2010 03:52

Re: Unhandled execption on System::create()

Postby RickP » Mon Mar 15, 2010 14:48

I have to remember to look at the log more :)

15/03/2010 09:39:55 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIWindowFactoryManager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/PushButton' Window objects is not registered with the system.

So not sure how I register that text to point to the object.

TaharezLook/FrameWindow works and I didn't seem to have to do anything special with making one of those.

RickP
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Sat Mar 13, 2010 03:52

Re: Unhandled execption on System::create()

Postby RickP » Mon Mar 15, 2010 15:15

OK, looks like it's just Button and not PushButton.

So another question would be, what about these positions and sizes? Is there any way to do some sort of conversion into actual pixels instead of what it currently is? I think humans work better in pixels and it would be easier.

Code: Select all

Window* btnExit = wmgr.createWindow("TaharezLook/Button", "btnExit");
btnExit->setPosition(UVector2(UDim(0, 0), UDim(0, 0)));
btnExit->setSize(UVector2(UDim( 0.15f, 0), UDim(0.15f, 0)));
btnExit->setText("Exit");
fWnd->addChildWindow(btnExit);

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Unhandled execption on System::create()

Postby CrazyEddie » Mon Mar 15, 2010 18:35

Hi,

Yes I'm so sorry for not spotting the Button / PushButton difference. Now I feel like a total disk (only the IRC ppl will get that little joke :P ).

With regards to the sizes, the second component of the UDim is pixels. So if you set all the first components to zero and only use the second components, that will be everything using pixels.

HTH

CE.

RickP
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Sat Mar 13, 2010 03:52

Re: Unhandled execption on System::create()

Postby RickP » Mon Mar 15, 2010 19:15

Perfect. OK, I think I have a good base here now. Just curious though, why have 2 options for position/size? What is the first variable in UDim?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Unhandled execption on System::create()

Postby CrazyEddie » Tue Mar 16, 2010 09:40

The first component is the 'scale' or relative component; it allows a size or position to be specified that is some percentage of the parent element. So, if you set the width of a Window to UDim( 0.5, 0), that window will he half as wide as it's parent. If you subsequently resize the parent, or move the window to a new parent, the window with the 0.5 width will automatically be resized to remain half as wide as the parent.

Back in the 'dark ages' of CEGUI we used to have this as a separate mode; each window would use either absolute or relative vales for positions and sizes. We later introduced the UDim concept (the feature was proposed by a user), and unified the two approaches since it gives a lot of power for positioning and sizing of elements.

CE.

RickP
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Sat Mar 13, 2010 03:52

Re: Unhandled execption on System::create()

Postby RickP » Tue Mar 16, 2010 12:27

Very cool. So this would allow me to scale on the width and keep constant pixels on the height. I like it. So it can act kind of like docking controls.Very flexible. Thank you for all your tips. It's nice to see the owner/creator of a library be so involved in helping new people. I really appreciate it.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Unhandled execption on System::create()

Postby CrazyEddie » Tue Mar 16, 2010 19:40

No problem - glad to be of some help :)

CE.

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Re: Unhandled execption on System::create()

Postby agamemnus » Tue Mar 16, 2010 23:52

I have the same problem with the same error code and memory location as the first post. I tried a lot of different combinations and nothing works.

// Loads schemes, fonts, or image sets.
void DLL_EXPORT CEGUICreate () {
//char *xml_filename, unsigned int object_type, char *resource_group = "", unsigned int action_flag = 0) {

//CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
//(CEGUI::System::getSingleton().getResourceProvider());
//rp->setResourceGroupDirectory("schemes", "data/gui/schemes/");
CEGUI::SchemeManager::getSingleton().create( "data/gui/schemes/TaharezLook.scheme" );
return;
}


Log file:
16/03/2010 20:34:53 (Error) CEGUI::InvalidRequestException in file ..\..\..\..\cegui\src\RendererModules\Irrlicht\CEGUIIrrlichtResourceProvider.cpp(63) : IrrlichtResourceProvider::loadRawDataContainer: Filename supplied for loading must be valid [È D]

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Unhandled execption on System::create()

Postby CrazyEddie » Wed Mar 17, 2010 09:53

agamemnus wrote:I have the same problem with the same error code and memory location as the first post.

I'm confused. What you subsequently posted in your reply is nothing like what was in the first post :? The issue in the first post is because it can't find the XML parser DLL (or perhaps the image codec DLL).

For the issue you actually posted, that exception is thrown when it fails to open / load the file. We can see in the message the name of the file it attempted to load was "È D" - so it appears that the String holding the filename does not contain valid data, and certainly not "data/gui/schemes/TaharezLook.scheme".

The kind of thing in the code you posted is used all over the place by us and everybody else, so that definitely is valid code; there's obviously something else going wrong, though I have no idea what. It could be some memory issue of some kind, which might point to a configuration error for the project being built (the fact that you're having so many of these issues with - what can only be described as - 'common uses' of the system, almost certainly indicates this).

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests