setDefaultTooltip bug?

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

setDefaultTooltip bug?

Postby Pompei2 » Fri Jan 09, 2009 23:57

Hello,
As you know I'm still using some old 0.0.5 or 0.0.6 trunk. I found a bug but did not find a mantis ticket that seems to have solved it, so I still post it here. Sorry if it's already solved.

when doing setDefaultTooltip(NULL), it crashes because of the following code:

Code: Select all

d_weOwnTooltip = false;
d_defaultTooltip = tooltip;
d_defaultTooltip->setWritingXMLAllowed(false);

The last line then crashes.
When setting the default tooltip to an empty string, it is handled correctly.

Edit: sorry this post should go into bugreports, don't know how I can move it, noticed it too late ...

Edit: More info, when I do this:

Code: Select all

        m_pDefToolTip = CEGUI::System::getSingleton().getDefaultTooltip();
        CEGUI::System::getSingleton().setDefaultTooltip("");
        CEGUI::System::getSingleton().setDefaultTooltip(m_pDefToolTip);

then the CEGUI system crashes while handling the next mouse move event. m_pDefToolTip is not null. Callstack:

Code: Select all

CEGUI::System::injectMousePosition
CEGUI::System::injectMouseMove
CEGUI::Window::onMouseEnters
CEGUI::Tooltip::setTargetWindow
CEGUI::Window::addChildWindow
??(at the line: addChild_impl)

window is NOT null.

I hope (for me) this bug is not yet fixed in the current trunk, as I could find no mantis ticket for it.

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

Postby CrazyEddie » Sun Jan 11, 2009 22:18

Hi,

The first issue is very obviously wrong, and has not yet been fixed, a ticket will be added shortly.

The second issue, where you take the address of the default tooltip may or may not be a bug, depending on what whether you originally created that tooltip window manually.

If you did not create that tooltip object yourself, then the behaviour is as you'd expect - because you're taking the address of an object, setting the tooltip type to "", which causes the object you have the address of to be deleted, then setting the tooltip back to the address of the deleted object. Cue fireworks ;)

CE.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sun Jan 11, 2009 22:47

CrazyEddie wrote:If you did not create that tooltip object yourself, then the behaviour is as you'd expect - because you're taking the address of an object, setting the tooltip type to "", which causes the object you have the address of to be deleted, then setting the tooltip back to the address of the deleted object. Cue fireworks ;)

damn, you're right I'm doing:

Code: Select all

CEGUI::System::getSingleton().setDefaultTooltip("ArkanaLook/Tooltip");

I had enough fireworks on new year's eve :) thanks once again. Shall I mark this as solved? (I ask because of the first one)

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

Postby CrazyEddie » Mon Jan 12, 2009 21:34

Pompei2 wrote:Shall I mark this as solved? (I ask because of the first one)

You could maybe put [part-solved] or something, though leaving it as-is is fine also :)

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Jan 13, 2009 11:57

ok boss :P


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests