Summary: | Assertion failure in offline help viewer when searching for string starting or ending in non-alphanumeric character | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Gabor Kelemen (allotropia) <kelemeng> |
Component: | framework | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | serval2412 |
Priority: | low | Keywords: | haveBacktrace |
Version: | 6.4.0.0.alpha1+ | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | target:6.4.0 target:6.3.0.1 target:6.2.6 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 105537 | ||
Attachments: | Backtrace of the assertion error |
Description
Gabor Kelemen (allotropia)
2019-06-24 20:14:37 UTC
On Win10 with master sources updated today, I could reproduce this. Adding some traces on PrepareSearchString method in sfx2/source/appl/newhelp.cxx, I got: before loop rSearchString=foo. loop aBoundary.startPos=0 aBoundary.endPos=3 loop aBoundary.startPos=4 aBoundary.endPos=0 This straightforward patch seems a good fix: diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 8f6ccd8af2be..8595cd436aef 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -207,7 +207,7 @@ namespace sfx2 Boundary aBoundary = xBreak->getWordBoundary( rSearchString, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, true ); - while ( aBoundary.startPos != aBoundary.endPos ) + while ( aBoundary.endPos && aBoundary.startPos != aBoundary.endPos ) { nStartPos = aBoundary.endPos; OUString sSearchToken( rSearchString.copy( Gabor: I'll be able to submit it on gerrit review only after my daytime job so if you want to give it a try or submit it to review, don't hesitate! Patch submitted to review here: https://gerrit.libreoffice.org/#/c/74716/ Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/0328e0af9532d5ab26840cf58b9dcbb69bb8c33d%5E%21 tdf#126071: fix assertion with offline help viewer It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Patches on gerrit review for 6.3: https://gerrit.libreoffice.org/#/c/74845/ for 6.2: https://gerrit.libreoffice.org/#/c/74846/ Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/+/03ef64befed26a03b35d6e977649face888f41a5%5E%21 tdf#126071: fix assertion with offline help viewer It will be available in 6.3.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/cb1c5ae7af997d7643da97235caf95789ba09416%5E%21 tdf#126071: fix assertion with offline help viewer It will be available in 6.2.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |