On Friday 13 June 2003 12:03 am, Levi Burton wrote:
> It would actually segfault in the call to dynamic_cast. A mystery to me,
> but not deleting the tool and just assigning the value 0 to it seems to
> have fixed the problem, although there could be ramifications i'm not aware
> of.
On further investigation I noticed that in
SegmentSelector::handleMouseButtonRelease, when m_dispatchTool is deleted,
that tool needs to be created again (although this seems unneccesary). So, I
poked around and think I may have found the problem. I added a little bit of
trace code:
BaseTool* BaseToolBox::getTool(const QString& toolName)
{
BaseTool* tool = m_tools[toolName];
if (!tool) {
std::cout << "getTool " << toolName << std::endl;
tool = createTool(toolName);
}
std::cout << "BaseToolBox::getTool - tool = " << tool << std::endl;
return tool;
}
When I use the select tool to resize a segment, this triggers the delete of
m_dispatchTool. Fine, everything works. As soon as I select the resize tool
(this is what m_dispatchTool pointed to for the resize), it crashes. On
further inspection:
rosegarden: BaseTool::~BaseTool()
rosegarden: SegmentCanvas::slotSetTool(segmentresizer)[SegmentCanvas pointer
(0x8689b60) to unnamed widget, geometry=937x394+230+63]
Stowing segmentresizer
BaseToolBox::getTool (segmentresizer)
BaseToolBox::getTool - tool = 0x89581d0
BaseToolBox::getTool thinks the tool still exists -- A dangling pointer
problem? It then goes ahead and returns this pointer to a non-existant tool,
rather than creating a new one. I recently filed a bug about this behavior:
http://sourceforge.net/tracker/index.php?func=detail&aid=751176&group_id=4932&atid=104932
--
Levi Burton
http://www.puresimplicity.net/~ldb/
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel