Apache OpenOffice (AOO) Bugzilla – Issue 97634
Impress Crash: when Find&Replace dialogbox show, switch view among "Notes", "Handout" and "Slide Sorter"
Last modified: 2009-02-16 16:31:49 UTC
[Steps] 1. Create a Impress doc. 2. "Ctrl + F", type some letters in "Search for" text field in "Find & Replace" dialogbox. 3. Switch view to "Slide Sorter", the "Find & Replace" dialogbox disappear. 4. Switch view to "Notes" or "Handout", when "Find & Replace" dialogbox re-emerge, click "Find" button on it. Then click "Yes" and "OK" button respectively on the following pop-up dialogboxes. 5. repeat step 3,4 for 5 times. [Reselt] In step 4, it will crash randomly. As the probability of 20-50%. [Expectation] "Find & Replace" runs stably with view switch. [Additions] This issue is similar to #97477. But I cannot testify wether they are duplicate or not. So I have to leave the work to Dev. Best regards!
Reproducible with DEV300m37 on WinXP and Fedora Li Meiying
Reproducible (also in 2.4.1 but not in 2.0 final)
Search and replace is applied to the normal view, notes, and handout view. Therefore sometimes during a search the views have to be switched. Switching from one view to another nowadays an asynchronous process (in 2.0 times it was not). In order to do it in the middle of the (old) search and replace code I had to resort to a trick/hack: request the view switch then call reschedule until the request is processed. The problem with this approach is that calling reschedule in the middle of some function is never a good idea, because, like in this case, it can lead to strange problems and crashes. A proper fix would require the search and replace code to be cleaned up so that it can cope with the asynchronous view switching.
Instead of making the Outliner able to handle asynchronous view switching I tried to make the view switching, in this one case, synchronous. The results look promising.
The assertion described in issue 98069 interferes with reproducing and fixing this issue.
The first part of the fix adds a non-API way to do a synchronous update of the configuration. Handle with care! Modified files are: sd\source\ui\framework\configuration\ConfigurationController.cxx sd\source\ui\framework\configuration\ConfigurationUpdater.hxx sd\source\ui\framework\tools\FrameworkHelper.cxx sd\source\ui\inc\framework\ConfigurationController.hxx sd\source\ui\inc\framework\FrameworkHelper.hxx Revision 266300.
The second and final part of the fix uses the synchronous update of the configuration in the Outliner. This is better then using reschedule to make the update synchronous. An even better solution would be to handle the asynchronous nature of view changes. That would require restructuring the Outliner code: too much work, too great a chance to break things. Modified files are: sd\inc\Outliner.hxx sd\inc\OutlinerIterator.hxx sd\source\ui\inc\OutlinerIteratorImpl.hxx sd\source\ui\view\Outliner.cxx sd\source\ui\view\OutlinerIterator.cxx Revision 266301.
@WG: Please verify.
Verified in CWS.
Tested in master OOO310_m1. Closed.