Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Redundant Crash in CCManager::OnShowCallTip()
ollydbg:
--- Quote from: oBFusCATed on August 14, 2015, 09:18:56 am ---After looking at the docs for vector/iterator I think that the iterator is not a good choice for this case.
If I were you, I'd replace it with a simple index variable.
--- End quote ---
Indeed, this idea also comes to my mind, but that need a lot of code changes, I'm not fully understand the ccmanager.h/cpp, so let's do it step by step. Also, I need Alpha's comment.
Also, I want to know whether it fixes the crash issue. Since I don't have this crash in my computer even without this patch.
ollydbg:
--- Quote from: ollydbg on August 12, 2015, 07:22:48 am ---
--- Quote from: Alpha on August 12, 2015, 06:13:48 am ---
--- Quote from: ollydbg on August 12, 2015, 04:10:58 am ---Here, why you use the static_cast<wxScintilla*>(stc)->CallTipCancel();? You want to skip the condition check on m_tabSmartJump? and force to cancel it?
--- End quote ---
Yes; calling base class to force it to cancel.
--- End quote ---
OK, thanks, then do we use the wxScintilla::CanTipCancel() in the void CCManager::OnEditorTooltip()?
--- End quote ---
I think I can answer this question myself, this won't cause some memory leak if the tip window is not cancled, then we try to show it again, the already opened tip window will be reused. When we call stc->CallTipShow(pos, tip);, we will finally reach the blow code:
--- Code: ---void ScintillaWX::CreateCallTipWindow(PRectangle) {
if (! ct.wCallTip.Created() ) {
ct.wCallTip = new wxSCICallTip(sci, &ct, this);
ct.wDraw = ct.wCallTip;
}
}
--- End code ---
oBFusCATed:
--- Quote from: ollydbg on August 14, 2015, 10:33:52 am ---Indeed, this idea also comes to my mind, but that need a lot of code changes, I'm not fully understand the ccmanager.h/cpp, so let's do it step by step.
--- End quote ---
I think the changes are quite trivial and low-risk.
Navigation
[0] Message Index
[*] Previous page
Go to full version