[Solved] setEnabled(false) problems in Release-Mode

Wuempftlbruempftl

28-01-2010 16:18:18

Hi,
i'am using MyGUI now for about a month and (in general) I really like it, worlds more comfortable as CEGui imho :)

But now to my problem:
Most time when I disable Widgets in my application, they change their behavior but don't change their look - the strange thing is: In Debug-Mode it's allright, the widgets get darker; in Release-Mode they don't change their look, but at least they can't clicked



By the way: I'am using MyGUI 3.0, Ogre 1.7 with the OpenGL Renderer, the widgets are created by loading a layout-file

Have someone any idea what could cause this behavior?

Edit:
Before someone ask... the log:
18:52:16 | Platform | Info | * Initialise: OgreRenderManager | .\src\MyGUI_OgreRenderManager.cpp | 27
18:52:16 | Platform | Info | OgreRenderManager successfully initialized | .\src\MyGUI_OgreRenderManager.cpp | 55
18:52:16 | Platform | Info | * Initialise: OgreDataManager | .\src\MyGUI_OgreDataManager.cpp | 46
18:52:16 | Platform | Info | OgreDataManager successfully initialized | .\src\MyGUI_OgreDataManager.cpp | 50
18:52:16 | Core | Info | * Initialise: Gui | .\src\MyGUI_Gui.cpp | 82
18:52:16 | Core | Info | * MyGUI version 3.0.0 | .\src\MyGUI_Gui.cpp | 86
18:52:16 | Core | Info | * Initialise: ResourceManager | .\src\MyGUI_ResourceManager.cpp | 43
18:52:16 | Core | Info | ResourceManager successfully initialized | .\src\MyGUI_ResourceManager.cpp | 51
18:52:16 | Core | Info | * Initialise: LayerManager | .\src\MyGUI_LayerManager.cpp | 45
18:52:16 | Core | Info | LayerManager successfully initialized | .\src\MyGUI_LayerManager.cpp | 53
18:52:16 | Core | Info | * Initialise: WidgetManager | .\src\MyGUI_WidgetManager.cpp | 66
18:52:16 | Core | Info | WidgetManager successfully initialized | .\src\MyGUI_WidgetManager.cpp | 105
18:52:16 | Core | Info | * Initialise: InputManager | .\src\MyGUI_InputManager.cpp | 42
18:52:16 | Core | Info | InputManager successfully initialized | .\src\MyGUI_InputManager.cpp | 59
18:52:16 | Core | Info | * Initialise: SubWidgetManager | .\src\MyGUI_SubWidgetManager.cpp | 44
18:52:16 | Core | Info | SubWidgetManager successfully initialized | .\src\MyGUI_SubWidgetManager.cpp | 64
18:52:16 | Core | Info | * Initialise: SkinManager | .\src\MyGUI_SkinManager.cpp | 46
18:52:16 | Core | Info | SkinManager successfully initialized | .\src\MyGUI_SkinManager.cpp | 54
18:52:16 | Core | Info | * Initialise: FontManager | .\src\MyGUI_FontManager.cpp | 44
18:52:16 | Core | Info | FontManager successfully initialized | .\src\MyGUI_FontManager.cpp | 53
18:52:16 | Core | Info | * Initialise: ControllerManager | .\src\MyGUI_ControllerManager.cpp | 42
18:52:16 | Core | Info | ControllerManager successfully initialized | .\src\MyGUI_ControllerManager.cpp | 52
18:52:16 | Core | Info | * Initialise: PointerManager | .\src\MyGUI_PointerManager.cpp | 51
18:52:16 | Core | Info | PointerManager successfully initialized | .\src\MyGUI_PointerManager.cpp | 69
18:52:16 | Core | Info | * Initialise: ClipboardManager | .\src\MyGUI_ClipboardManager.cpp | 82
18:52:16 | Core | Info | ClipboardManager successfully initialized | .\src\MyGUI_ClipboardManager.cpp | 96
18:52:16 | Core | Info | * Initialise: LayoutManager | .\src\MyGUI_LayoutManager.cpp | 43
18:52:16 | Core | Info | LayoutManager successfully initialized | .\src\MyGUI_LayoutManager.cpp | 49
18:52:16 | Core | Info | * Initialise: DynLibManager | .\src\MyGUI_DynLibManager.cpp | 35
18:52:16 | Core | Info | DynLibManager successfully initialized | .\src\MyGUI_DynLibManager.cpp | 37
18:52:16 | Core | Info | * Initialise: PluginManager | .\src\MyGUI_PluginManager.cpp | 37
18:52:16 | Core | Info | PluginManager successfully initialized | .\src\MyGUI_PluginManager.cpp | 41
18:52:16 | Core | Info | * Initialise: LanguageManager | .\src\MyGUI_LanguageManager.cpp | 40
18:52:16 | Core | Info | LanguageManager successfully initialized | .\src\MyGUI_LanguageManager.cpp | 44
18:52:16 | Core | Info | * Initialise: FactoryManager | .\src\MyGUI_FactoryManager.cpp | 34
18:52:16 | Core | Info | FactoryManager successfully initialized | .\src\MyGUI_FactoryManager.cpp | 37
18:52:16 | Core | Info | Load ini file 'core_theme.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_language.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_font.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using texture size 512 x 256 | .\src\MyGUI_ResourceTrueTypeFont.cpp | 183
18:52:16 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using real height 17 pixels | .\src\MyGUI_ResourceTrueTypeFont.cpp | 184
18:52:16 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.14' using texture size 256 x 256 | .\src\MyGUI_ResourceTrueTypeFont.cpp | 183
18:52:16 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.14' using real height 14 pixels | .\src\MyGUI_ResourceTrueTypeFont.cpp | 184
18:52:16 | Core | Info | Load ini file 'core_resource.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_skin.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_pointer.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_layer.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Load ini file 'core_settings.xml' | .\src\MyGUI_ResourceManager.cpp | 152
18:52:16 | Core | Info | Gui successfully initialized | .\src\MyGUI_Gui.cpp | 129
18:52:25 | Core | Info | * Shutdown: Gui | .\src\MyGUI_Gui.cpp | 136
18:52:25 | Core | Info | * Shutdown: PointerManager | .\src\MyGUI_PointerManager.cpp | 76
18:52:25 | Core | Info | PointerManager successfully shutdown | .\src\MyGUI_PointerManager.cpp | 92
18:52:25 | Core | Info | * Shutdown: InputManager | .\src\MyGUI_InputManager.cpp | 66
18:52:25 | Core | Info | InputManager successfully shutdown | .\src\MyGUI_InputManager.cpp | 71
18:52:25 | Core | Info | * Shutdown: SkinManager | .\src\MyGUI_SkinManager.cpp | 61
18:52:25 | Core | Info | SkinManager successfully shutdown | .\src\MyGUI_SkinManager.cpp | 66
18:52:25 | Core | Info | * Shutdown: SubWidgetManager | .\src\MyGUI_SubWidgetManager.cpp | 71
18:52:25 | Core | Info | SubWidgetManager successfully shutdown | .\src\MyGUI_SubWidgetManager.cpp | 91
18:52:25 | Core | Info | * Shutdown: LayerManager | .\src\MyGUI_LayerManager.cpp | 60
18:52:25 | Core | Info | destroy layer 'Wallpaper' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Back' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Overlapped' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Middle' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Modal' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Main' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Popup' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'FadeMiddle' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Info' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'ToolTip' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'DragAndDrop' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'FadeBusy' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Pointer' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Fade' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | destroy layer 'Statistic' | .\src\MyGUI_LayerManager.cpp | 208
18:52:25 | Core | Info | LayerManager successfully shutdown | .\src\MyGUI_LayerManager.cpp | 71
18:52:25 | Core | Info | * Shutdown: FontManager | .\src\MyGUI_FontManager.cpp | 60
18:52:25 | Core | Info | FontManager successfully shutdown | .\src\MyGUI_FontManager.cpp | 67
18:52:25 | Core | Info | * Shutdown: ControllerManager | .\src\MyGUI_ControllerManager.cpp | 59
18:52:25 | Core | Info | ControllerManager successfully shutdown | .\src\MyGUI_ControllerManager.cpp | 70
18:52:25 | Core | Info | * Shutdown: ClipboardManager | .\src\MyGUI_ClipboardManager.cpp | 103
18:52:25 | Core | Info | ClipboardManager successfully shutdown | .\src\MyGUI_ClipboardManager.cpp | 105
18:52:25 | Core | Info | * Shutdown: LayoutManager | .\src\MyGUI_LayoutManager.cpp | 56
18:52:25 | Core | Info | LayoutManager successfully shutdown | .\src\MyGUI_LayoutManager.cpp | 60
18:52:25 | Core | Info | * Shutdown: PluginManager | .\src\MyGUI_PluginManager.cpp | 48
18:52:25 | Core | Info | PluginManager successfully shutdown | .\src\MyGUI_PluginManager.cpp | 53
18:52:25 | Core | Info | * Shutdown: DynLibManager | .\src\MyGUI_DynLibManager.cpp | 44
18:52:25 | Core | Info | DynLibManager successfully shutdown | .\src\MyGUI_DynLibManager.cpp | 58
18:52:25 | Core | Info | * Shutdown: LanguageManager | .\src\MyGUI_LanguageManager.cpp | 51
18:52:25 | Core | Info | LanguageManager successfully shutdown | .\src\MyGUI_LanguageManager.cpp | 55
18:52:25 | Core | Info | * Shutdown: ResourceManager | .\src\MyGUI_ResourceManager.cpp | 58
18:52:25 | Core | Info | ResourceManager successfully shutdown | .\src\MyGUI_ResourceManager.cpp | 68
18:52:25 | Core | Info | * Shutdown: FactoryManager | .\src\MyGUI_FactoryManager.cpp | 44
18:52:25 | Core | Info | FactoryManager successfully shutdown | .\src\MyGUI_FactoryManager.cpp | 46
18:52:25 | Core | Info | * Shutdown: WidgetManager | .\src\MyGUI_WidgetManager.cpp | 112
18:52:25 | Core | Info | WidgetManager successfully shutdown | .\src\MyGUI_WidgetManager.cpp | 122
18:52:25 | Core | Info | Gui successfully shutdown | .\src\MyGUI_Gui.cpp | 175
18:52:25 | Platform | Info | * Shutdown: OgreRenderManager | .\src\MyGUI_OgreRenderManager.cpp | 62
18:52:25 | Platform | Info | OgreRenderManager successfully shutdown | .\src\MyGUI_OgreRenderManager.cpp | 70
18:52:25 | Platform | Info | * Shutdown: OgreDataManager | .\src\MyGUI_OgreDataManager.cpp | 57
18:52:25 | Platform | Info | OgreDataManager successfully shutdown | .\src\MyGUI_OgreDataManager.cpp | 59

Altren

28-01-2010 18:15:58

Show your layout and code. I'm almost sure that it is uninitialised variable. Not sure if it our bug or yours.

Wuempftlbruempftl

28-01-2010 19:21:44

There are two layout files. One for the window and one for the player-panels (I did this because I didn't found any satisfiing possibility to clone a single one):

Window:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="WindowCS" position="275 55 975 650" layer="Back">
<Property key="Widget_Caption" value="New Game"/>
<Property key="Widget_Alpha" value="1"/>
<Property key="Window_MinSize" value="975 650"/>
<Widget type="Button" skin="Button" position="402 570 160 35" align="HCenter Bottom" name="startgame">
<Property key="Widget_Caption" value="Start Game!"/>
</Widget>
<Widget type="Widget" skin="Panel" position="675 10 280 125" align="Right Top" name="properties">
<Widget type="Edit" skin="WordWrapSimple" position="15 15 45 25">
<Property key="Widget_Caption" value="Map:"/>
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Edit_Static" value="true"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="55 15 210 25" name="map">
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="15 82 89 25">
<Property key="Widget_Caption" value="Max. Player:"/>
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Edit_Static" value="true"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="98 85 54 25" name="maxplayer">
<Property key="ComboBox_ModeDrop" value="true"/>
<Property key="Text_TextAlign" value="Center"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="15 50 120 25">
<Property key="Widget_Caption" value="End by:"/>
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Edit_Static" value="true"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="71 50 99 25" name="endcondition1">
<Property key="ComboBox_AddItem" value="time"/>
<Property key="ComboBox_AddItem" value="percentage"/>
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="175 50 80 25" name="endcondition2">
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="680 145 179 20" align="Right Top">
<Property key="Widget_Caption" value="Single-Player time record:"/>
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Edit_Static" value="true"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="855 145 49 20" align="Right Top" name="timerecord">
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Widget_Caption" value="00:00"/>
<Property key="Text_TextColour" value="1 0 0"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="680 170 119 20" align="Right Top">
<Property key="Widget_Caption" value="Colourable fields:"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="795 170 35 21" align="Right Top">
<Property key="Widget_Caption" value="00"/>
</Widget>
<Widget type="Widget" skin="Panel" position="10 10 655 360" align="HStretch Top" name="playerlist"/>
<Widget type="List" skin="List" position="10 395 945 130" align="Stretch" name="chatlist"/>
<Widget type="Edit" skin="WordWrapSimple" position="10 374 69 21" align="Left Top">
<Property key="Widget_Caption" value="Chat:"/>
</Widget>
<Widget type="Button" skin="ButtonSmall" position="10 525 55 25" align="Left Bottom" name="chatsend">
<Property key="Widget_Caption" value="Send"/>
</Widget>
<Widget type="Edit" skin="Edit" position="65 525 890 25" align="Left Bottom" name="chatmessageentry">
<Property key="Edit_MultiLine" value="false"/>
<Property key="Edit_MaxTextLength" value="255"/>
</Widget>
<Widget type="Button" skin="Button" position="801 569 155 35" align="Left Bottom" name="cancel">
<Property key="Widget_Caption" value="Cancel"/>
</Widget>
</Widget>
</MyGUI>


The LayoutFile for a single panel, when loading I give them numbers as prefixes:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Widget" skin="Panel" position="5 0 645 35" align="HStretch Top" layer="Back" name="player1">
<Widget type="Edit" skin="Edit" position="115 5 160 25" align="HStretch VCenter" name="playername">
<Property key="Widget_Caption" value="Player 1"/>
<Property key="Edit_MaxTextLength" value="63"/>
<Property key="Edit_MultiLine" value="false"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="435 5 45 25" align="Right VCenter" name="keys_text">
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Widget_Caption" value="Keys:"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="485 5 155 25" align="Right VCenter" name="keys">
<Property key="ComboBox_AddItem" value="arrow keys + STRG"/>
<Property key="ComboBox_AddItem" value="WAD + shift"/>
<Property key="ComboBox_AddItem" value="IJL + space"/>
<Property key="ComboBox_AddItem" value="846 + 0 (numpad)"/>
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="335 5 95 25" align="Right VCenter" name="colour">
<Property key="ComboBox_AddItem" value="red"/>
<Property key="ComboBox_AddItem" value="blue"/>
<Property key="ComboBox_AddItem" value="green"/>
<Property key="ComboBox_AddItem" value="yellow"/>
<Property key="ComboBox_AddItem" value="pink"/>
<Property key="ComboBox_AddItem" value="orange"/>
<Property key="ComboBox_AddItem" value="turquoise"/>
<Property key="ComboBox_AddItem" value="brown"/>
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
<Widget type="Edit" skin="WordWrapSimple" position="280 5 55 25" align="Right VCenter">
<Property key="Text_TextAlign" value="Left VCenter"/>
<Property key="Widget_Caption" value="Colour:"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="5 5 105 25" name="playertype">
<Property key="ComboBox_ModeDrop" value="true"/>
</Widget>
</Widget>
</MyGUI>


Hm code.. i'am not sure which parts are relevant... There's code is already very much code around this menu..
Here what happens when one of the PlayerPanels gets loaded:

//......
// panel
m_PlayerPanels.push_back(MyGUI::LayoutManager::getInstance().loadLayout("newgame_playerpanel.layout", (boost::format("%i") % (m_PlayerPanels.size()+1)).str(),
m_pPlayerList).front());
m_PlayerPanels.back()->setPosition(m_PlayerPanels.front()->getLeft(), 5+m_PlayerPanels.front()->getBottom() * (m_PlayerPanels.size()-1));

// empty addressblock
m_PlayerAssociatedMaschines.push_back(UNASSIGNED_RAKNET_GUID);

// Playertype and consequences
SetPlayerType(PLAYERSTAT_OPEN, m_PlayerPanels.size()-1, UNASSIGNED_RAKNET_GUID, false);

// playertype
m_PlayerPanels.back()->findWidget((boost::format("%iplayertype") % m_PlayerPanels.size()).str())->castType<MyGUI::ComboBox>()->eventComboChangePosition =
MyGUI::newDelegate(this, &GUI_NewGame::OnSelectedPlayerType);

// playername reset
MyGUI::Edit* pEdit = m_PlayerPanels.back()->findWidget((boost::format("%iplayername") % m_PlayerPanels.size()).str())->castType<MyGUI::Edit>();
pEdit->setCaption((boost::format("Player %i") % m_PlayerPanels.size()).str());
// both call leads to the same
pEdit->eventEditSelectAccept = MyGUI::newDelegate(this, &GUI_NewGame::OnSelectAcceptPlayerText);
pEdit->eventKeyLostFocus = MyGUI::newDelegate(this, &GUI_NewGame::OnFocusLostPlayerText);

// .........
}


But this strange error happens through the entire program. E.g. there are two RadioBoxes in another window which do this:
void GUI_Lobby::OnLocalGameRadio(MyGUI::Widget* Sender)
{
if(!Sender->castType<MyGUI::Button>()->getStateCheck())
{
Sender->castType<MyGUI::Button>()->setStateCheck(true);
m_pWindow->findWidget("directipoption")->castType<MyGUI::Button>()->setStateCheck(false);
m_pWindow->findWidget("refresh")->setEnabled(true);
m_pWindow->findWidget("serverlist")->setEnabled(true);
m_pWindow->findWidget("directipedit")->setEnabled(false);
}
}
void GUI_Lobby::OnDirectIPRadio(MyGUI::Widget* Sender)
{
if(!Sender->castType<MyGUI::Button>()->getStateCheck())
{
Sender->castType<MyGUI::Button>()->setStateCheck(true);
m_pWindow->findWidget("localgamesoption")->castType<MyGUI::Button>()->setStateCheck(false);
m_pWindow->findWidget("refresh")->setEnabled(false);
m_pWindow->findWidget("serverlist")->setEnabled(false);
m_pWindow->findWidget("directipedit")->setEnabled(true);
}
}

The corresponding window has this layout file:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="WindowCS" position="605 210 430 390" layer="Back" name="lobby">
<Property key="Widget_Caption" value="Create/Join Game"/>
<Property key="Window_MinSize" value="300 290"/>
<Widget type="Button" skin="Button" position="80 10 260 35" align="HCenter Top" name="creategame">
<Property key="Widget_Caption" value="Create new Game"/>
</Widget>
<Widget type="List" skin="List" position="15 84 390 136" align="Stretch" name="serverlist"/>
<Widget type="Edit" skin="Edit" position="111 259 134 25" align="Left Bottom" name="directipedit">
<Property key="Edit_MultiLine" value="false"/>
<Property key="Edit_MaxTextLength" value="30"/>
<Property key="Widget_Caption" value="198.168.0.1"/>
<Property key="Widget_Enabled" value="false"/>
</Widget>
<Widget type="Button" skin="Button" position="80 310 260 35" align="Left Bottom" name="joingame">
<Property key="Widget_Caption" value="Join Game"/>
</Widget>
<Widget type="Button" skin="ButtonSmall" position="15 220 390 20" align="HStretch Bottom" name="refresh">
<Property key="Widget_Caption" value="Refresh"/>
</Widget>
<Widget type="Button" skin="RadioBox" position="16 60 134 25" name="localgamesoption">
<Property key="Button_Pressed" value="true"/>
<Property key="Widget_Caption" value="Local Games"/>
</Widget>
<Widget type="Button" skin="RadioBox" position="16 259 90 25" align="Left Bottom" name="directipoption">
<Property key="Widget_Caption" value="Direct IP:"/>
</Widget>
</Widget>
</MyGUI>

Wuempftlbruempftl

31-01-2010 13:15:03

In my own code I can't find any uninitialised variables... has anyone an idea where I could search for errors? :(

my.name

02-02-2010 18:44:10

try OpenGL and DirectX

Altren

02-02-2010 20:19:30

Ok, we found way how to reproduce bug. Trying to fix now. Please wait.

Altren

02-02-2010 20:56:41

Done. As I told it was uninitialised variable and we missed it because we have two constructors and forgot to update 2nd. And cppcheck tool missed that for some reason.
So what you need to do is replace in MyGUI_Widget.cpp line 74 (second constructor)
Widget::Widget() :
mMaskPickInfo(nullptr),
mText(nullptr),
mMainSkin(nullptr),
mEnabled(true),
mSubSkinsVisible(true),
mInheritsVisible(true),
mAlpha(ALPHA_MIN),
mInheritsAlpha(true),
mParent(nullptr),
mIWidgetCreator(nullptr),
mNeedKeyFocus(false),
mNeedMouseFocus(true),
mInheritsPick(false),
mWidgetClient(nullptr),
mNeedToolTip(false),
mEnableToolTip(true),
mToolTipVisible(false),
mToolTipCurrentTime(0),
mToolTipOldIndex(ITEM_NONE),
mWidgetStyle(WidgetStyle::Child),
mDisableUpdateRelative(false)
{
}
with Widget::Widget() :
mMaskPickInfo(nullptr),
mText(nullptr),
mMainSkin(nullptr),
mEnabled(true),
mInheritsEnabled(true),
mSubSkinsVisible(true),
mInheritsVisible(true), // <- this was missing
mAlpha(ALPHA_MIN),
mInheritsAlpha(true),
mTexture(nullptr), // <- this was missing
mParent(nullptr),
mIWidgetCreator(nullptr),
mNeedKeyFocus(false),
mNeedMouseFocus(true),
mInheritsPick(false),
mWidgetClient(nullptr),
mNeedToolTip(false),
mEnableToolTip(true),
mToolTipVisible(false),
mToolTipCurrentTime(0),
mToolTipOldIndex(ITEM_NONE),
mWidgetStyle(WidgetStyle::Child),
mDisableUpdateRelative(false)
{
}

Wuempftlbruempftl

03-02-2010 19:02:07

It works :) :)
Thank you very much! I wouldn't found this in years ^^