Created attachment 97457 [details] sub-grid number is 0. Problem description: Crash when setting sub-grid. Steps to reproduce: 1. Writer-option-LibreOfficeWiter 2. grid-subgrid- number 0 Ok crash 3. Recovery operation OK crash Current behavior: Endless loop during autosave Expected behavior: repair Operating System: Windows 7 Version: 4.2.2.1 release
Created attachment 97533 [details] bt with symbols On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Michael: would you have some time to give your opinion about this? Indeed, I thought about 2 ways (perhaps there are others) 1) put a minimum to 1 for subdivisionX/Y so we're sure there's no problem (but how to do this?) 2) Investigating the code, here what I found: rOpt.GetDivisionX/Y() return -1 if 0 has been selected on UI because the values come from this part: 359 short nDiv = (short)pGridItem->GetFldDivisionX() ; 360 if( aViewOpt.GetDivisionX() != nDiv ) 361 aViewOpt.SetDivisionX( nDiv ); 362 nDiv = (short)pGridItem->GetFldDivisionY(); 363 if( aViewOpt.GetDivisionY() != nDiv ) 364 aViewOpt.SetDivisionY( nDiv ); in sw/source/core/uibase/app/appopt.cxx (see http://opengrok.libreoffice.org/xref/core/sw/source/core/uibase/app/appopt.cxx#359) then http://opengrok.libreoffice.org/xref/core/svx/source/dialog/optgrid.cxx#211 show this: 211 aGridItem.nFldDivisionX = static_cast<long>(pNumFldDivisionX->GetValue()-1); 212 aGridItem.nFldDivisionY = static_cast<long>(pNumFldDivisionY->GetValue()-1); So I don't know the reason of all this but this simple patch could make it: diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index b46d071..31d2fda 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2149,8 +2149,8 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) pDView->SetGridCoarse( rSz ); const Size aFSize - ( rSz.Width() ? rSz.Width() / (rOpt.GetDivisionX()+1) : 0, - rSz.Height()? rSz.Height()/ (rOpt.GetDivisionY()+1) : 0); + ( (rSz.Width() && rOpt.GetDivisionX() != -1) ? rSz.Width() / (rOpt.GetDivisionX()+1) : 0, + (rSz.Height() && rOpt.GetDivisionY() != -1)? rSz.Height()/ (rOpt.GetDivisionY()+1) : 0); I tested it, it doesn't crash but has it a meaning?
Bug tested with different versions: 3.6.7: OK 4.1.5: OK 4.2.0: Crash 4.3.0: Crash Hence regression.
Thank you Harald for this piece of information. I add regression on keywords and increase the importance. BTW, I still reproduce the problem with master sources updated today.
Set platform All per comment 1 Add bibisectRequest to Whiteboard per Bug 82632
Caolan McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4bd317f845c2f3470c7fc354e478be08c2949e0c Resolves: fdo#77516 sub-grid shouldn't be allowed as 0 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolan McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d557b1e7c998b3895fde7236c1a2d8e0998922c5&h=libreoffice-4-2 Resolves: fdo#77516 sub-grid shouldn't be allowed as 0 It will be available in LibreOffice 4.2.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolan McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe228874772e692acf2a899259e961f57175cd94&h=libreoffice-4-3 Resolves: fdo#77516 sub-grid shouldn't be allowed as 0 It will be available in LibreOffice 4.3.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I verified this fix in the three versions below. Changed status to verified. Version: 4.3.2.0.0+ Build ID: 233e6a62d12d2d67089f1934777ac41c9fc88238 TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-09-05_11:10:36 Version: 4.2.7.0.0+ Build ID: fef72d750ea29dd3368f2e5f3099bb81e22ab07c TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-09-05_17:30:54 Version: 4.4.0.0.alpha0+ Build ID: 040a59e513b6435fb39bfecad9a54b3283216d0e TinderBox: Win-x86@42, Branch:master, Time: 2014-09-04_23:21:24
*** Bug 80609 has been marked as a duplicate of this bug. ***
Migrating Whiteboard tags to Keywords: (bibisectRequest) [NinjaEdit]