createfromimagefile problem (cegui 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

Tarzan02
Just popping in
Just popping in
Posts: 7
Joined: Tue Jul 29, 2008 21:32

createfromimagefile problem (cegui crash)

Postby Tarzan02 » Sun Oct 24, 2010 06:45

High everybody,

i'm trying ti use cegui 0.7.1 with irrkicht 1.7.1 in a small application. I've got a crash on the line: createfromimagefile as in the following code. I've tried with the irrlicht function (createImagefromfile) and irrlicht can load it. I'm searching since 2 days, can someone help me ?

the code:

strcpy_s(Repertoire,"D:\\christophe\\elite\\irrlicht-1.7.1\\examples\\03.CustomSceneNode\\ressources\\");
myRenderer = &CEGUI::IrrlichtRenderer::bootstrapSystem(*device);
menu=this;
// Set the window manager
wmgr = &WindowManager::getSingleton();
// Set the ressource provider
rp = static_cast<DefaultResourceProvider*> (System::getSingleton ().getResourceProvider ());
sprintf(buffer,"%sdatafiles\\schemes\\",Repertoire);
rp->setResourceGroupDirectory ("schemes", buffer);
sprintf(buffer,"%sdatafiles\\imagesets\\",Repertoire);
rp->setResourceGroupDirectory ("imagesets", buffer);
sprintf(buffer,"%sdatafiles\\fonts\\",Repertoire);
rp->setResourceGroupDirectory ("fonts", buffer);
sprintf(buffer,"%sdatafiles\\layouts\\",Repertoire);
rp->setResourceGroupDirectory ("layouts", buffer);
sprintf(buffer,"%sdatafiles\\looknfeel\\",Repertoire);
rp->setResourceGroupDirectory ("looknfeel", buffer);
IImage *ii=device->getVideoDriver()->createImageFromFile("taharezlook.tga");
imgmgr=&ImagesetManager::getSingleton();
if (imgmgr!=NULL)
imgs=&imgmgr->createFromImageFile("TaharezLook","TaharezLook.tga","imagesets");

and the logfile:
24/10/2010 08:44:03 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
24/10/2010 08:44:03 (Std) + Crazy Eddie's GUI System - Event log +
24/10/2010 08:44:03 (Std) + (http://www.cegui.org.uk/) +
24/10/2010 08:44:03 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

24/10/2010 08:44:03 (Std) CEGUI::Logger singleton created. (01666808)
24/10/2010 08:44:03 (Std)
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std) * Important: *
24/10/2010 08:44:03 (Std) * To get support at the CEGUI forums, you must post _at least_ the section *
24/10/2010 08:44:03 (Std) * of this log file indicated below. Failure to do this will result in no *
24/10/2010 08:44:03 (Std) * support being given; please do not waste our time. *
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std) ---- Version 0.7.1 (Build: Jul 19 2010 Microsoft Windows MSVC++ 8.0 32 bit) ----
24/10/2010 08:44:03 (Std) ---- Renderer module is: CEGUI::IrrlichtRenderer - Official Irrlicht based 2nd generation renderer module. RenderTarget support is enabled. ----
24/10/2010 08:44:03 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
24/10/2010 08:44:03 (Std) ---- Image Codec module is: IrrlichtImageCodec - Integrated ImageCodec using the Irrlicht engine. ----
24/10/2010 08:44:03 (Std) ---- Scripting module is: None ----
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
24/10/2010 08:44:03 (Std) ********************************************************************************
24/10/2010 08:44:03 (Std)
24/10/2010 08:44:03 (Std) ---- Begining CEGUI System initialisation ----
24/10/2010 08:44:03 (Std) CEGUI::ImagesetManager singleton created (01672950)
24/10/2010 08:44:03 (Std) CEGUI::FontManager singleton created. (01672B08)
24/10/2010 08:44:03 (Std) CEGUI::WindowFactoryManager singleton created
24/10/2010 08:44:03 (Std) CEGUI::WindowManager singleton created (0166EDA8)
24/10/2010 08:44:03 (Std) CEGUI::SchemeManager singleton created. (016734B0)
24/10/2010 08:44:03 (Std) CEGUI::MouseCursor singleton created. (0166ED50)
24/10/2010 08:44:03 (Std) CEGUI::GlobalEventSet singleton created. (01673928)
24/10/2010 08:44:03 (Std) CEGUI::WidgetLookManager singleton created. (0166F348)
24/10/2010 08:44:03 (Std) CEGUI::WindowRendererManager singleton created (01673AD0)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'DefaultWindow' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'DefaultWindow' windows added. (01672D40)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'DragContainer' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'DragContainer' windows added. (01674118)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'ScrolledContainer' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'ScrolledContainer' windows added. (01674288)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'ClippedContainer' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'ClippedContainer' windows added. (01674748)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Checkbox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Checkbox' windows added. (01674978)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/PushButton' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/PushButton' windows added. (01674B18)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/RadioButton' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/RadioButton' windows added. (01674D30)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Combobox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Combobox' windows added. (01674E08)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ComboDropList' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ComboDropList' windows added. (01674F68)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Editbox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Editbox' windows added. (01675190)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/FrameWindow' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/FrameWindow' windows added. (01675238)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ItemEntry' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ItemEntry' windows added. (01675688)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Listbox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Listbox' windows added. (016758A0)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ListHeader' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ListHeader' windows added. (01675948)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (01675B60)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Menubar' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Menubar' windows added. (01675E70)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/PopupMenu' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/PopupMenu' windows added. (01675F70)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/MenuItem' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/MenuItem' windows added. (016760D0)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/MultiColumnList' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/MultiColumnList' windows added. (01676178)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (016763C8)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ProgressBar' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ProgressBar' windows added. (01676528)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ScrollablePane' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ScrollablePane' windows added. (01676688)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Scrollbar' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Scrollbar' windows added. (016767E8)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Slider' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Slider' windows added. (01676890)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Spinner' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Spinner' windows added. (01676AA8)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/TabButton' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/TabButton' windows added. (01676B50)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/TabControl' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/TabControl' windows added. (01676E20)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Thumb' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Thumb' windows added. (01676F80)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Titlebar' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Titlebar' windows added. (01677028)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Tooltip' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Tooltip' windows added. (016770D0)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/ItemListbox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/ItemListbox' windows added. (01677398)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/GroupBox' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/GroupBox' windows added. (016774F8)
24/10/2010 08:44:03 (Std) Created WindowFactory for 'CEGUI/Tree' windows.
24/10/2010 08:44:03 (Std) WindowFactory for 'CEGUI/Tree' windows added. (01677658)
24/10/2010 08:44:03 (Std) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
24/10/2010 08:44:03 (Std) CEGUI::System singleton created. (0166E7A0)
24/10/2010 08:44:03 (Std) ---- CEGUI System initialisation completed ----
24/10/2010 08:44:03 (Std)
24/10/2010 08:44:03 (Std) Attempting to create Imageset 'TaharezLook' using image file 'TaharezLook.tga'.
24/10/2010 08:44:03 (Error) CEGUI::FileIOException in file ..\..\..\..\cegui\src\RendererModules\Irrlicht\CEGUIIrrlichtImageCodec.cpp(59) : IrrlichtImageCodec::load: Irrlicht failed to create irr::video::IImage from file data.

I've recompiled all the cegui project with the irrlicht lib and dll, i ddon't know what to do else.

thank's for your reply

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: createfromimagefile problem (cegui crash)

Postby Kulik » Sun Oct 24, 2010 09:47

You could try upgrading to latest stable release (0.7.4). There have been a lot of fixes between 0.7.1 and 0.7.2.

Tarzan02
Just popping in
Just popping in
Posts: 7
Joined: Tue Jul 29, 2008 21:32

Re: createfromimagefile problem (cegui crash)

Postby Tarzan02 » Thu Oct 28, 2010 11:15

I've just try with the 0.7.4 version => same error, can't read the TGA file. I've got a modified vesion of irrlicht so i recompile CEGUI with the new version => no error in the compilation, but when i ran=> exception on the las statement (cf log file)

Tarzan02
Just popping in
Just popping in
Posts: 7
Joined: Tue Jul 29, 2008 21:32

Re: createfromimagefile problem (cegui crash)

Postby Tarzan02 » Thu Oct 28, 2010 15:18

I've modified the ceguiirrlichtimagecodec to send some trace do cegui.log:

using namespace irr;

// wrap data in a IrrlichtMemoryFile so Irrlicht can try to 'load' it.
Logger::getSingleton().logEvent("Debut chargement");
IrrlichtMemoryFile imf("IrrlichtImageCodec::Load",
data.getDataPtr(),
data.getSize());

// get irrlicht to parse the file data
Logger::getSingleton().logEvent(data.getDataPtr());
Logger::getSingleton().logEvent(imf.getFileName().c_str());
video::IImage* image = d_driver.createImageFromFile(&imf);

if (!image)
CEGUI_THROW(FileIOException(
"IrrlichtImageCodec::load: Irrlicht failed to create "
"irr::video::IImage from file data."));


This is teh result in the cegui.log (last line):

---- Source texture file: TaharezLook.tga in resource group: (Default)
28/10/2010 17:15:39 (Std) Debut chargement
28/10/2010 17:15:39 (Std)
28/10/2010 17:15:39 (Std) IrrlichtImageCodec::Load

It seems that cegui is trying to load irrlichtimagecodec::load (it's not an image of course) => don't understand...

Tarzan02
Just popping in
Just popping in
Posts: 7
Joined: Tue Jul 29, 2008 21:32

Re: createfromimagefile problem (cegui crash)

Postby Tarzan02 » Thu Oct 28, 2010 15:26

Error from me, i've added some trace until the end of the function load => ok end of function reaches, continue to search where is the problem....

Tarzan02
Just popping in
Just popping in
Posts: 7
Joined: Tue Jul 29, 2008 21:32

Re: createfromimagefile problem (cegui crash)

Postby Tarzan02 » Thu Oct 28, 2010 15:33

I'm apologize !!! After re-compiling every thing, all is working now.

Sorry


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests