Aborted after initializing core_font.xml

Fdot

23-09-2010 17:05:01

Hi,

I'm new to MyGUI. I got it installed today and tried to run the "quickstart" http://www.ogre3d.org/tikiwiki/MyGUI+quickstart

But I get following error by starting the programm:

Load ini file 'core_theme.xml'
Load ini file 'core_language.xml'
Load ini file 'core_font.xml'
ResourceTrueTypeFont 'font_DejaVuSans.17' using texture size 512 x 256
ResourceTrueTypeFont 'font_DejaVuSans.17' using real height 17 pixels
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted


MyGUI.log:
17:56:04 | Core | Info | * Initialise: RenderManager | /home/michi/workspace/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp | 35
17:56:04 | Core | Info | RenderManager successfully initialized | /home/michi/workspace/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp | 63
17:56:04 | Core | Info | * Initialise: DataManager | /home/michi/workspace/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp | 26
17:56:04 | Core | Info | DataManager successfully initialized | /home/michi/workspace/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp | 30
17:56:04 | Core | Info | * Initialise: Gui | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_Gui.cpp | 75
17:56:04 | Core | Info | * MyGUI version 3.2.0 | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_Gui.cpp | 80
17:56:04 | Core | Info | * Initialise: ResourceManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 48
17:56:04 | Core | Info | ResourceManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 56
17:56:04 | Core | Info | * Initialise: LayerManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp | 49
17:56:04 | Core | Info | LayerManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp | 57
17:56:04 | Core | Info | * Initialise: WidgetManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_WidgetManager.cpp | 68
17:56:04 | Core | Info | WidgetManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_WidgetManager.cpp | 100
17:56:04 | Core | Info | * Initialise: InputManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_InputManager.cpp | 58
17:56:04 | Core | Info | InputManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_InputManager.cpp | 76
17:56:04 | Core | Info | * Initialise: SubWidgetManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_SubWidgetManager.cpp | 50
17:56:04 | Core | Info | SubWidgetManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_SubWidgetManager.cpp | 72
17:56:04 | Core | Info | * Initialise: SkinManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_SkinManager.cpp | 51
17:56:04 | Core | Info | SkinManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_SkinManager.cpp | 59
17:56:04 | Core | Info | * Initialise: FontManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_FontManager.cpp | 48
17:56:04 | Core | Info | FontManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_FontManager.cpp | 57
17:56:04 | Core | Info | * Initialise: ControllerManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ControllerManager.cpp | 46
17:56:04 | Core | Info | ControllerManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ControllerManager.cpp | 56
17:56:04 | Core | Info | * Initialise: PointerManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_PointerManager.cpp | 60
17:56:04 | Core | Info | PointerManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_PointerManager.cpp | 78
17:56:04 | Core | Info | * Initialise: ClipboardManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ClipboardManager.cpp | 87
17:56:04 | Core | Info | ClipboardManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ClipboardManager.cpp | 101
17:56:04 | Core | Info | * Initialise: LayoutManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LayoutManager.cpp | 45
17:56:04 | Core | Info | LayoutManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LayoutManager.cpp | 50
17:56:04 | Core | Info | * Initialise: DynLibManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_DynLibManager.cpp | 41
17:56:04 | Core | Info | DynLibManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_DynLibManager.cpp | 45
17:56:04 | Core | Info | * Initialise: PluginManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_PluginManager.cpp | 45
17:56:04 | Core | Info | PluginManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_PluginManager.cpp | 49
17:56:04 | Core | Info | * Initialise: LanguageManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LanguageManager.cpp | 45
17:56:04 | Core | Info | LanguageManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_LanguageManager.cpp | 49
17:56:04 | Core | Info | * Initialise: FactoryManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_FactoryManager.cpp | 39
17:56:04 | Core | Info | FactoryManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_FactoryManager.cpp | 41
17:56:04 | Core | Info | * Initialise: ToolTipManager | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ToolTipManager.cpp | 47
17:56:04 | Core | Info | ToolTipManager successfully initialized | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ToolTipManager.cpp | 58
17:56:04 | Core | Info | Load ini file 'core_theme.xml' | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 130
17:56:04 | Core | Info | Load ini file 'core_language.xml' | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 130
17:56:04 | Core | Info | Load ini file 'core_font.xml' | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 130
17:56:04 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using texture size 512 x 256 | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp | 206
17:56:04 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using real height 17 pixels | /home/michi/workspace/mygui/MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp | 207


The Code in the project:
MyGUI::OgrePlatform* mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(GraphicsController::GetSingleton().GetRoot()->getAutoCreatedWindow(), Scenegraph::GetSingleton().GetMaster(), "i6engine"); // mWindow is Ogre::RenderWindow*, mSceneManager is Ogre::SceneManager*
MyGUI::Gui * mGUI = new MyGUI::Gui();
mGUI->initialise();


MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 10, 10, 300, 26, MyGUI::Align::Default, "Main");
button->setCaption("exit");
// set callback
button->eventMouseButtonClick = MyGUI::newDelegate(this, &GUIController::Callback);


Any ideas?

my.name

24-09-2010 09:06:31

IDE?
Project settings? (CRT DLL or CRT static)

Fdot

24-09-2010 13:54:16

MyGUI SVN 3629
Ubuntu 10.04
using libMyGUIEngine.so & libMyGUI.OgrePlatform.a
CMake with gcc

The projet itself is build to shared libraries.

Fdot

25-09-2010 15:09:05

Okay I debuged it a little bit. Following line causes the error:

mVectorRangeInfo.push_back(info);

It's line 415 in MyGUIEngine/src/MyGUI_Resource_TrueTypeFont.cpp

EDIT:
It seems to be
void* buffer_ptr = mTexture->lock(TextureUsage::Write);
Not push_back

Another problem, maybe it helps you:

When i remove the line
<List file="core_font.xml"/>

in core.xml it also fails:

Load ini file 'core_theme.xml'
Load ini file 'core_language.xml'
Load ini file 'core_resource.xml'
Load ini file 'core_skin.xml'
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture core.png face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /home/i6stud/simifrem/Desktop/ogre3d/source/ogre_src_v1-7-1/RenderSystems/GL/src/OgreGLTexture.cpp (line 406)
Aborted


When I remove core_skin.xml I get the error:

Load ini file 'core_theme.xml'
Load ini file 'core_language.xml'
Load ini file 'core_resource.xml'
Load ini file 'core_pointer.xml'
Load ini file 'core_layer.xml'
Load ini file 'core_settings.xml'
Skin 'StaticImage' not found. Replaced with default skin.
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture core_pointer.png face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /home/i6stud/simifrem/Desktop/ogre3d/source/ogre_src_v1-7-1/RenderSystems/GL/src/OgreGLTexture.cpp (line 406)
Aborted


I don't know if they are dependent or something else?

my.name

27-09-2010 11:31:34

try make MyGUI without FreeType library (MYGUI_USE_FREETYPE in CMake)

Fdot

28-09-2010 17:04:19

still crashing

Load ini file 'core_theme.xml'
Load ini file 'core_language.xml'
Load ini file 'core_font.xml'
ResourceTrueTypeFont 'font_DejaVuSans.17' - Ttf font disabled. Define MYGUI_USE_FREETYE if you need ttf fonts.
ResourceTrueTypeFont 'font_DejaVuSans.14' - Ttf font disabled. Define MYGUI_USE_FREETYE if you need ttf fonts.
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture core_micro_font.PNG face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /home/i6stud/simifrem/Desktop/ogre3d/source/ogre_src_v1-7-1/RenderSystems/GL/src/OgreGLTexture.cpp (line 406)
Aborted

my.name

29-09-2010 10:24:22

open core_micro_font.PNG in editor and check size

Fdot

29-09-2010 13:12:22

open core_micro_font.PNG in editor and check size

5,7 KB, should be okay. I can open and watch it.

my.name

29-09-2010 17:54:09

open core_font.xml and remove manual font (font_Micro.11).

Fdot

29-09-2010 22:43:11

The same error. I think the failure is in core_skin.xml. Thats the last loaded file.

Altren

29-09-2010 23:30:48

Guys, you are looking in wrong direction, there is error about _createSurfaceList and impossibility to create or load texture from file. And it doesn't looks like there is much about MyGUI itself.
Check that you have proper video drivers, try to run Ogre Demos. Try to load any texture with 1024*1024 size.

Fdot

30-09-2010 09:35:19

I opened the core.png graphic with gimp and resized it to 1024*1024 and editet the core_theme_tag.xml file, but the error message is still the same:

Load ini file 'core_theme.xml'
Load ini file 'core_language.xml'
Load ini file 'core_font.xml'
ResourceTrueTypeFont 'font_DejaVuSans.17' - Ttf font disabled. Define MYGUI_USE_FREETYE if you need ttf fonts.
ResourceTrueTypeFont 'font_DejaVuSans.14' - Ttf font disabled. Define MYGUI_USE_FREETYE if you need ttf fonts.
Load ini file 'core_resource.xml'
Load ini file 'core_skin.xml'
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture core_big.png face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /home/i6stud/simifrem/Desktop/ogre3d/source/ogre_src_v1-7-1/RenderSystems/GL/src/OgreGLTexture.cpp (line 406)
Aborted


Which drivers have to be installed (ubuntu)? Ogre itself runs.

Fdot

04-10-2010 14:42:50

Some new hints?

my.name

05-10-2010 11:37:12

try to run Ogre Demos

Fdot

06-10-2010 11:17:13

Okay silly question: How to run the demo? I got only the SDK files and I don't know where the demo from ogre3d saves the files. Moreover thats 1.6.4 (ogre) I got 1.7.1