Possible bug/corruption or whatever [Solved]

mrmclovin

17-08-2008 14:25:47

I've been struggling with several problem with the MyGUI library and yet not come any further then to just initialise the object(s) and load a simple layout. This post is about some intresting information i've dug up due some research about what could cause my crashes. For a description of the problem read this thread.

Okey now to my results. I load a .layout which contains:
<?xml version="1.0" encoding="UTF-8"?>

<MyGUI type="Layout">

<Widget type="Button" skin="Button" position="10 10 300 26" align="ALIGN_DEFAULT" layer="Main" name="MyFirstButton" >
<Property key="Widget_Caption" value="exit" />
</Widget>

</MyGUI>

This will cause a crash of my app. when I load the layout.

The button uses the skin "Button" so let us have a look at the Skin "Button":
core.skin
<Skin name = "Button" size = "54 26" texture = "core.png">
<Property key="FontName" value = "MyGUI_CoreFont.18" />
<Property key="FontHeight" value = "18" />
<Property key="AlignText" value = "ALIGN_CENTER" />
<Property key="Colour" value = "0 0 0" />

<BasisSkin type="SubSkin" offset = "0 0 20 26" align = "ALIGN_LEFT ALIGN_VSTRETCH">
<State name="disable" offset = "2 2 20 26"/>
<State name="normal" offset = "2 30 20 26"/>
<State name="active" offset = "2 58 20 26"/>
<State name="pressed" offset = "2 86 20 26"/>
<State name="select" offset = "2 114 20 26"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "20 0 20 26" align = "ALIGN_STRETCH">
<State name="disable" offset = "22 2 20 26"/>
<State name="normal" offset = "22 30 20 26"/>
<State name="active" offset = "22 58 20 26"/>
<State name="pressed" offset = "22 86 20 26"/>
<State name="select" offset = "22 114 20 26"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "40 0 14 26" align = "ALIGN_RIGHT ALIGN_VSTRETCH">
<State name="disable" offset = "42 2 14 26"/>
<State name="normal" offset = "42 30 14 26"/>
<State name="active" offset = "42 58 14 26"/>
<State name="pressed" offset = "42 86 14 26"/>
<State name="select" offset = "42 114 14 26"/>
</BasisSkin>
<BasisSkin type="SimpleText" offset = "23 0 28 26" align = "ALIGN_STRETCH">
<State name="disable" colour="0.87 0.87 0.87"/>
<!--State name="normal" colour="0 0 0"/-->
<!--State name="active" colour="2C8AD5"/-->
<!--State name="pressed" colour="0 0 0"/-->
<!--State name="select" colour="2C8AD5"/-->
</BasisSkin>
</Skin>

As you can see one of its BasisSkin element have the type "SimpleText" and that is the intresting part. If i delete the BasisSkin element of type "SimpleText" the app does not crash and Im able to see a widget on my screen.

This crash-phenomenon applies to every widget-type that uses a skin where <BasisSkin type="SimpleText"> occurs.

Im now qurios curious about further possible ways to find the root of this problem? Im pretty sure it now has to do something with SimpleText. Any help?

Thanks in advance!

~[L]~

17-08-2008 16:44:39

You didn't gave up, uh ?
yeah, it's too weird...

but anyways, I invite you to take the latest SVN Snapshot that I took : http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=7854

And compile it on release mode, AAAAAALLLL the solution, and then, check out the layout manager if crashes ...

Visual C++ 2008 or 2005, makes no diference with sources ~>

Then come here and we see what's going on ...
The source looks right ...

It could be a problem with resources (I HAD A LOT, often when you load the core files from another resource group than General), But, let's make sure that the SDK works fine....

I'll be watching this thread ;)

Adieu !

mrmclovin

17-08-2008 18:02:41

Okey hope I get this right with all revision numbers, libs and dll. I built the 'tag' version of svn with VC 2008 SP1 Debug mode and recompiles my app with that SDK. I noticed loadLayout() and SetSceneManager has been removed. Anyway, Im getting this exception when I run the App:
http://picasaweb.google.com/simwarg/Ogre/photo?authkey=7rcDxboLXcQ#5235532025613008178

I'll build in release too later.

btw, the svn requeriers dependecy lib freetype_230. But the freetype that i downloaded from src-forge is named freetype_235. However i changed name and it compiled. But just that you know.

EDIT: same results in release mode!

mrmclovin

17-08-2008 18:17:13

I copied the media files fron the 'tag' svn version to my media as well, and dude... IT WORKS!

Don't have an explaination though coz' I have compiled, compiled and re-compiled over and over again, same and diffrent versions (at least, as far as I know) and now just god are letting me get it work!

Cheers and thanks L for your magic suggestion!

~[L]~

17-08-2008 19:56:17

Yeap, don't forget that MyGUI requires some files (like core, plugins and so on) and if they don't exist, or are corrupted, there is a problem =P (depends ..)

And about those "snapshots", I update them every 10 revisions (because the project GOES TOO FAST XDD wich is good =) ) or if there's an important bug fix ...

Anyways, if you need something, just post ;)

Adieu ~>