Apache OpenOffice (AOO) Bugzilla – Issue 75416
Crash occurs when doing "Repeat Search" in Navigation.
Last modified: 2013-08-07 14:42:39 UTC
Crash occurs when doing "Repeat Search" in Navigation. The bug can be described as follows: 1.Create a new word-processor document; 2.CTRL+F to call "Find & Replace" dialog, input "d" in the "Search for" field, and click the "Find" button, then "Search key not found" dialog will pop up, click the "OK" button and close the "Find & Replace" dialog; 3.Press F5 to startup the "Navigator" dialog, and then click the "Navigation" button to startup the "Navigation" dialog (make sure do not drag the "Navigation" dialog); 4.In the "Navigation" toolbox, select "Repeat Search", then "Navigation" will disappear; 5.Startup "Navigation" again, click "Continue search forward" on the right side, and then "Search key not found" will pop up; 6.click the "OK" button, then "Navigation" will disappear, click "OK" button again, crash.
Reassigned to SBA.
I have repaired this bug,please have a look at the patch file.
Created attachment 43718 [details] the patch file
As this is a patch it should be marked as such, otherwise we might overlook it. Oliver, please have a look at this patch.
The provided patch has the drawback that the navigation toolbox is always teared off. The reason for the crash is the fact that the execution of repeated search is done synchronously. The message box initiates the destruction of the navigation toolbox while the MouseButtonUp event is still in processing. To fix this I propose to move the execution of the search from SwView::MoveNavigation to an asynchronously called static link. See IMPL_STATIC_LINK( SwGlobalTree, ShowFrameHdl,...) in sw/source/ui/utlui/glbltree.cxx as example of asynchronous execution.
lijian, are you still working on this issue?
Hi mathias, Sorry to having not seen your questions. For this bug, I've not found better solutions. And I'm busy with other important things recently. So, hope someone can give me some help.
lijian, OS suggested a solution that looks fine. Please read his last comment and in case you didn't understand something ask him directly. Thanks.
mba: Thank you for your friendly advice. I'll keep working on this issue.
lijian->os: > The provided patch has the drawback that the navigation toolbox is always > teared off. What do you mean by this ? Would you please explain it more clearly ? For this bug, I can not find what initiates the destruction of of the navigation toolbox? I need your help.Look forward to your reply.
When you click on the navigator button, keep it pressed and move to the button of the navigation PopupWindow and release the mouse then the related action is executed and the PopupWindow is closed afterwards. If you click the button and release it directly then the PopupWindow is teared off - it stays open as separate toolbox window. With you fix it will always be teared off. This is not desirable. The bug is that the MessageBox prevents the handler (MouseButtonUp(), calling ::SelectHdl) from returning immediately. It returns after the closing of the MessageBox finishes the search call. The PopupWindow has been closed by vcl at the moment you click the OKButton. This closing is initiated by the vcl lib.This is probably done to get the PopupWindow off the stack. pj knows this better than /me. p.s. If you want to reach someone via issue tracker you have to make sure that this someone is either submitter or owner of the issue or cc'ed. cc-ing /me to this issue. To get rid of this we need to call at least the search asynchronously.
lijian, can you proceed with the existing informatio or do you need some additional clarifications?
lijian->mba:I'm working on this issue now! I'll try to find the way to resolve it.
-> mba && os && lijian I have fixed the issue according to OS's suggestion: To fix this I propose to move the execution of the search from SwView::MoveNavigation to an asynchronously called static link. I will send the 75416.patch to you to review it. :-)
Created attachment 46127 [details] the version II patch file reviewed by os
reassign it to os to integrate this patch. :)
Patch slightly changed and integrated into cws os98 in sw/source/ui/inc/view.hxx sw/source/ui/utlui/navipi.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewmdi.cxx
Created attachment 46161 [details] the version III is better.
Reassigned for verification
SBA, please verify this in CWS os98.
SBA: Verified in CWS os98.
SBA: OK in OOg680m3. Closed.