Created attachment 125012 [details]
REGEX search and replace of [:alpha:] in the attached document loops indefinitely (loading the document is also a bit long)
On pc Debian x86-64 with master sources updated today, I noticed this on console just by opening your file:
warn:legacy.osl:18588:1:sw/source/core/layout/calcmove.cxx:293: :-( Layout unstable (this not found).
and this one seems to never end:
warn:legacy.osl:18588:1:sw/source/core/layout/tabfrm.cxx:2552: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
So can't even reproduce your problem because of these.
The document does load (on win32 & Fedora64), it's just pathologically long (and that's bug #99800). I seems writer has lots of problems computing page and column breaks in this document. I did gave up on document loading several times, killing writer and restarting it on the same document usually succeeded (after a looong time).
The search & replace is a different problem, it seems to be linked to the text areas in the margins, removing them makes S&R succeed. IIRC I could not reproduce the S&R bug in openoffice.org.
Search key replaced 36704 times.
I should do a Callgrind for bug 99800.
Arch Linux 64-bit, KDE Plasma 5
Build ID: 1dbdc947fcc9d843764731e6dae7ce60082576e0
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default;
Locale: fi-FI (fi_FI.UTF-8)
Built on May 14th 2016
While I could not reproduce this, I believe bug 100535 is about the same issue. The infinite loop seems to be gone starting with 18.104.22.168, please test again either with an RC version, or the released 5.1.4 version that should be available in a couple of days.
Bug 100538 has been opened as a follow-up to bug 100535 with different issues.
*** This bug has been marked as a duplicate of bug 100535 ***
*** This bug has been marked as a duplicate of bug 98224 ***