Apache OpenOffice (AOO) Bugzilla – Issue 119332
"Find & Replace" matches wrong sequences on Solaris
Last modified: 2012-07-04 08:02:49 UTC
Created attachment 77529 [details] "Find & Replace" matches wrong sequences The following text is given: "Referat und Gerichtschreiber und er ist erst in die Schule gegangen und hat weinen Vortrage erstellt." Using "Find & Replace" I search for "rat", what happens is: - Refe*rat* is found (good) - e*rst* is found (wrong) - e*rst*ellt is found (wrong) Also see the attachment which shows the issue. This is NOT reproducible in the official builds, but it is in our unofficial OpenSolaris/SPARC builds. Chances are, that a.) we did something wrong during build, or b.) this is a OpenSolaris/SPARC specific issue. The build can be found here: http://adfinis-sygroup.ch/aoo-solaris-sparc http://adfinis-sygroup.ch/file-exchange-public/Apache_OpenOffice_incubating_3.4.0_Solaris_Sparc_install-arc_en-US_r1332941.tar.gz The script to produce the build can be found here: http://adfinis-sygroup.ch/file-exchange-public/build-all_8475039.txt Any pointer into the right direction would be helpful :)
Which of the options in "search and replace" are enabled in your testing? E.g. only-in-selection, backwards, regular expressions, similarity-search, case-sensitivity, etc.
Hi, thanks for contacting me and taking a look into this! I didn't change any of the default settings (you can probably see them in the attachment https://issues.apache.org/ooo/attachment.cgi?id=77529). So this is: [ ] Match case [ ] Whole words only ----------------------- [ ] Current selection only [ ] Backwards [ ] Regular expressions [ ] Similarity search [ ] Search fpr Styles [ ] Notes The options in "Attributes" are empty too Hope that helps. This is with a clean profile and no installed extensions btw. Don't hesitate to contact me, if you want ssh/x11 access to the build machine. kind regards, nicolas
It is very strange that the problem doesn't happen on the official builds, but only on the ones you built yourself. This might be an optimization problem. The relevant code is in main/i18npool/source/search/textsearch.cxx and the method to debug into is TextSearch::NSrchFrwrd() and maybe TextSearch::MakeForwardTab(). If you could build the textsearch.cxx file without optimizations disabled and retest the problem with the resulting i18search library that could provide an interesting data point.
Of course I meant "with optimizations disabled" instead of "without optimizations disabled".
I just found bug 105945, which seems to match exactly that problem. It is marked as fixed though and we need to investigate whether we have a new problem here or whether the old fix doesn't work anymore.
Thank you very much for your investigation! I see, that bug #105945 also mentions optimization - so this could definitely be a starting point. I'll take a look at this and will provide feedback as fast as possible.
The fix from bug 105945 doesn't apply because it checked for "Solaris C52 Intel" which obviously doesn't apply for Solaris Sparc. The fix should be straight forward by adjusting the line in main/i18npool/source/search/makefile.mk with SOLARISC52INTEL to something that matches in your case, e.g. by dropping the CPUNAME part.
hdu, you're awesome :D It seems, that it was indeed the optimization which triggered this error. I changed the Makefile as you proposed, but was not sure if $(COM) doesn't restrict the selection to much. Maybe multiple versions of the SunStudio compiler are affected? We currently use this one: $ /opt/solarisstudio12.3/bin/cc -V cc: Sun C 5.12 SunOS_sparc 2011/11/16 Therefore I not only removed $(CPUNAME) but also $(COM) - not sure if this is right, maybe you can comment on this? Anyway using this patch, "Find & Replace" seems to work as expected - we'll test it further and I'll inform you, if we find something else. Thank you very much for you assistance! I really appreciate it! Have a nice weekend kind regards nicolas
Created attachment 77530 [details] Possible fix for #119332
Thanks for the flowers! I'm glad I could help. Welcome to our fine community. I took the liberty to apply your patch as revision 1337260.
I forgot to answer your question: > Therefore I not only removed $(CPUNAME) but also $(COM) > not sure if this is right, maybe you can comment on this Better a reliable working search than a very buggy but optimized search! ;-) Have a great weekend, Herbert
Thinking over this bug I think we should try to understand where the compiler problem comes from since it could hit us in other places where a problem would not show so clearly. Now that we can switch the problem on and off by changing the optimization setting we should use this chance to analyze this better. Could you debug into this? I suggest to add some fprintf to TextSearch's NSrchFrwrd, MakeForwardTab and MakeForwardTab2 methods, run your test with the different optimization settings and compare the fprintf outputs.
Updated the issue summary to be less generic.
Hi Herbert I'll get back to this issue asap - I'm currently working hard on #119263 and will of course try to help you to find the (real) reason behind the optimization issue. I hope you don't mind if it takes two or three days until I can work on this one again? kind regards, nicolas
No worries, there is always way more than enough to do all over the place in such a big project ;-) And with higher priority bugs, work items, issues in life, travel schedules, holidays, weekends, etc. delays of a couple of days are quite normal in an open source project.
set release blocker flag for 3.4.1
Also applied as revision 1344678 for AOO3.4.1
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.
Need verify this bug against Solaris system.