质控/二进制二分查找(Bibisect)

From The Document Foundation Wiki
< QA
Jump to: navigation, search
This page is a translated version of the page QA/Bibisect and the translation is 74% complete.

Outdated translations are marked like this.
Other languages:
dansk • ‎English • ‎日本語 • ‎русский • ‎中文(简体)‎

简介

二进制二分查找(Bibisect,即 "binary bisect"),是一整套在软件中定位导致了某项功能“倒退(Regressions)”的源代码提交(commit)的方法。“倒退”问题是软件开发以及质量控制中最应该避免的错误,它是指在原来的版本中表现完好的某项功能,在后续的版本中缺却突然无法使用或者无法正常工作的现象,这通常是由于在之前能正常工作的版本与最近不能正常工作的版本之间,存在一个或多个有缺陷的源代码提交。我们需要尽早发现“倒退”问题,并尽快定位导致该问题的有缺陷的源代码,这是因为在问题出现的早期通常会很容易定位该问题,但是时间过的越旧,查找它就会越困难。

Bibisect 二进制二分查找原理

每个 bibisect 软件包(或者称为 bibisect 仓库)其实都是一个 git 仓库,该仓库中包含了成百上千个(次)从源代码编译的 LibreOffice 二进制程序,这些二进制程序在放入该 git 仓库时是按照对应的源代码提交先后顺序排列的。按照这种方式组织的 LibreOffice 二进制包的集合,是我们在多个版本中定位导致某个“倒退”问题源代码的绝佳方式。有了 bibisect 仓库,我们在测试时不需要每次切换到某个版本之后运行程序时重新编译源代码了。

采用这种方式,我们一方面可以使用 git 本身的二分查找工具(即 git bisect)直接基于二进制程序进行二分查找,另一方面又能受益于 git 对文件系统良好的差分压缩、去重以及文件组织方式。例如,一次完整的 LibreOffice 源代码编译后生成的二进制可执行程序至少会占用500MB磁盘空间,但是如果采用 git, 则虽然第一次添加占用的空间相同,但是后续每次添加产生的增量磁盘空间可能只有 25MB 大小。

您可以观看一部 Youtube 视频(墙外): Effective Bisection and Bibisection (Matthew Francis 于2015年在LibOCon上的演讲),它介绍并实际演示了使用 bibisect 仓库进行二进制二分查找的过程。

详情

一次成功的“二进制二分查找”(bibisect)会将导致“倒退”问题的可能源代码范围缩小至很少的几个commit,开发者可以从这个小范围内迅速找到引起“倒退”问题的真正“罪魁祸首”。 Bibisect 之后,QA 团队可以进行额外的步骤进行 bisect,从而将范围缩小到某个具体的源代码 commit, 或者将这项任务留给开发者完成。通常情况下,只要进行了成功的 bibisect, 则找到具体的导致“倒退”问题的具体 commit 会非常容易。

使用不到 10G 的 bibisect 仓库,您可以用于成百上千个编译后的 LibreOffice 版本进行测试。通常情况下完成一个 bibisect 二分查找过程只需要不到15分钟。

当前,“二进制二分查找”可在以下操作系统上进行:

涵盖的源代码范围及构建数章节所示, 取决于您所用的 bibisect 仓库,其涵盖的源代码 commit 范围,对于类似“43max”这样的仓库可能是80个一次构建(某些仓库可能达到几百个);而对于比较新的仓库,可能每隔1个或2个 commit 就有一次构建。(还有一些比较“粗糙”的仓库只是对每次的已发布版本 + beta 版本 + RC 版本进行了构建,这些仓库可能每个二进制构建涵盖上百个源代码 commit)。

当找到了commit范围后,您所测试的 bug 就可以标记关键词 "bibisected";进一步,如果找到了具体的 commit 之后,就可以再添加 "bisected" 关键词。

一般性说明

对于初学者,我们建议大家从已经完成了 bibisect 过程的示例中进行学习。为此,我们准备了Bibisect 入门教程

注意:二分查找的过程在不同的操作系统下会有差异。请阅读上面的链接中针对您的操作系统的指南,那里有非常详细的解释说明、视频以及其他资料。

“二进制二分查找”仅需要6个简单的步骤即可完成:

  1. 搭建环境,包括安装必要的软件。
  2. 下载 bibisect 仓库(其实质是集合了很多 LibreOffice 二进制包的 git 仓库,仓库中的每个commit对应的对 LibreOffice 源代码的一次编译)。
  3. 使用该 bibisect 仓库对 bug 进行二分查找。
  4. 获得二分查找的日志。
  5. 将日志附加到 bug 报告中。
  6. 更新 bug 报告的相应字段。
  7. 移除 keyword 字段中的 'bibisectRequest' 关键词,并添加 'bibisected' 关键词。
  8. 如果已经知道了究竟是哪个 commit 导致了问题,请同时添加 'bisected' 关键词,并将对应的开发者添加到 CC 列表中,并添加评论:'Adding Cc: to <开发者的名字>'

需要注意的是,您应当将最初的代码提交者(committer)添加到 CC 列表,而不是审阅者(Reviewer)。如果某个开发者已经不再参与这个项目了(您可以检查他/她最后一次提交commit的日期来判断),那么就没有必要将任何人添加到 CC 列表,此时您应当提高这个 bug 的优先级。

Some bibisect repositories have ranges of source commits folded into a single chunk. If after completing a bibisect you are presented with only a single one of these chunk commits, you can get the range by first copying the hash (note: not the source hash) and using it in a git log command like so:

git log c3f9dc54188b316a61dd871b63734d49b05f5d7f

现在,您可以复制第一个和前一个显示的二进制 commit 对应的源代码散列值(source hash),并构造出类似下面的查询: https://git.libreoffice.org/core/log/7c4d3ea6ba4d42b4dda5148a00c8c411b5d7703d..5b195fbcf7a441aeb193f6abd08b877e580938e0 得到这个范围之后,您就能通过范围内源代码 commit 的描述和变化内容来进行更深层次的筛查。见:深层次筛查部分的内容

限制

要进行 bibisect,您必须已经下载了针对您的操作系统的二进制软件 git 仓库,并且该仓库覆盖了合适的 LibreOffice 源代码 commit 范围。在这方面,我们在 GNU/Linux 操作系统下覆盖很全面。我们正在努力完善 Windows 和 macOS 下的覆盖度。

Some regressions are difficult to reproduce, and may require multiple test runs for a bug to appear. As you may imagine, trying to bibisect such regressions is very difficult, and requires one to perform many test runs after each checkout of a new version of LibreOffice to give some security / statistics that the bug is indeed present or not present with the given version.

We do not currently have bibisect support for

版本

Bibisect 仓库的版本包含在了不同的操作系统相关的介绍里,请见上面的 #详情 部分。

无法进行 Bibisect 的 bug

有一些 bug 无法进行 Bibisect,这包括:

  • Bugs that don't show up on a supported platform (see #Limitations)
  • Bugs that predate our bibisect builds (We're working on extending the range covered)
  • Bugs that depend upon build options not enabled in the TDF builds (e.g. -kde)

If a bug with bibisectRequest Keyword is found to be not bibisectable, leave a comment on the bug explaining why we're not able to use bibisect to track down the introduction of this problem, and replace Keyword bibisectRequest with notBibisectable.

找到 bug

找到需要进行“二进制二分查找”的 bug

包含以下关键词 bibisectRequest 的 bug 需要进行“二进制二分查找”:

Full Query
ID Summary Priority Status
56894 FORMATTING: Cell borders drawn using (python) scripts do not draw as expected in all cases medium NEW
62093 VIEWING of preview in Print Dialog destroyed after horizontal or vertical resize medium NEW
69017 FILEOPEN: text rendering (font replacement for UniversR 45 Light) in some cells too wide (new lines, changing row height, an extra page) medium NEW
70633 Writer EDITING: Unable to use AltGr to produce supplementary plane chars medium NEW
70676 PRINTING: Difficulties with combining smaller pages on a bigger one medium NEW
75218 Letter Wizard does not respect locale anymore medium NEW
79452 Themes with a separator line per toolbar incorrectly places separator line at bottom when toolbar docked at bottom low NEW
83159 DATALOSS: default font size not saved in chart textbox medium NEW
87058 column label functions do not update after inserting rows below title - needs save and reload including a hard recalc medium NEW
87289 UI: single cell selection frame is invisible in black documents medium NEW
88066 UI status line insert/overwrite mode display broken medium NEW
91237 CALC hangs on web table paste (intermittent) high NEW
92433 Writer hangs and eats a lot of memory until being killed while processing complex 134-page DOCX with images medium NEW
92880 CopyFromRecordset function not working since 4.x medium NEW
92909 UI - Table creation field data types are displayed in rounded buttons that do not fill grid cell (OSX only) low NEW
93890 FILEOPEN clean-up of bookmark-start and -end breaks references medium NEW
94113 Accessible focus event missing when caret moves to start of paragraph spanning two pages (see comment 11) medium NEW
95191 Forms and dialogs opened via macros on ODB file open no longer work high NEW
95492 LibreOffice start center: icons too bright on macOS medium NEW
96176 DRAW: Slow performance zooming an SVG after opening medium NEW
96310 LO will hang for 30 plus seconds after opening EMR software alongside the LO suite (1 processor fully consumed) medium NEW
96341 Version 5.1 takes a lot more RAM than version 5.0 in Windows medium NEW
97616 Calc conditional formatting: fast scrolling down and up shows borders that shouldn't be there low NEW
97790 [pyuno] unavailable exported functions and attributes medium NEW
98491 Split hsqldb Base application will not start under OSX10.11.x causes LO to freeze requiring force kill high NEW
98675 Missing possibility to print style definitions medium NEW
98743 TIFF EXPORT saves weird image: in different x-y resolution and dimensions medium NEW
99507 Paste Individual Image From MS Word fails (Paste special as GDI image works and should be default) per comment 11 and comment 12 medium NEW
100119 Korean Autocorrect does not work in OS X 10.11 medium NEW
100961 After inserting Fixed Date, and saving in DOC format, the date is not fixed anymore medium NEW
101376 Wordcount Beanshell macro execution causes deadlock / hang requiring forced kill high NEW
101379 UI - (on high resolution screens) text cursor is too thin and so nearly invisible medium NEW
101396 VIEWING Font color changes when auto spellcheck is enabled and text is underlined due to spelling error (steps in comment 7) medium NEW
103375 MAILMERGE: unpredictable failures: sometimes looses embedded image, or not all mails sent, when e-mailing as pdf medium NEW
103570 Java not selected automatically when a database is opened for the first time low NEW
103909 macOS: Start Center doesn't open on top - doesn't receive focus high NEW
104037 Writer: embedded Starview Metafile file results in slow scrolling medium NEW
104563 Writer doesn't allow to resize window to less than 4/5 of full screen in height medium NEW
105588 SVG exported from Impress or Draw cannot be correctly inserted as an image into another document medium NEW
105690 FILESAVE: Button dissapears after saving in Calc medium NEW
106484 UI: Print Properties Device tab dropdown items not applied or remembered medium NEW
106831 Can't print #10 envelopes properly and with proper orientation medium NEW
106962 Clicking text or text box on macOS Sierra results in sluggish UI high NEW
106981 The Repeat feature when you select an Inserted Video for it to play in a Loop during a slideshow no longer works (64-bit only) medium NEW
107443 FILEOPEN: "Open" in "Document in Use" dialog for non-default file format documents opens read-only medium NEW
107987 EDITING: Resizing an image is slow depending on slide design medium NEW
108232 Marco Flotante (floating frame) can not be modified, deleted or modified after inserting medium NEW
108244 Cell Comments Often Loss when Saving in FODS Format. Steps to reproduce in comment 5 medium NEW
108560 Editing multi-line cells with thousands of words is slow when OpenGL is enabled medium NEW
109004 External form does not save the path to database any more. medium NEW
109090 Lang pref English (USA) shows as French (France) in spell checker dialogue high NEW
111423 Page format not changing to "User" upon small change in page width low NEW
111461 XLSX with 0px height or 0px width images hangs LO and produce a lot of temp files medium NEW
111674 Always office:value="0" for field variable "Formula", which is <text:expression> in file format high NEW
112811 FILESAVE: DOCX - Dots separator in index not fully preserved medium NEW
113228 Gallery category/folder names not localized medium NEW
113273 Crash in: SfxShell::SetDisableFlags(SfxDisableFlags) medium NEW
113673 Filter WMF: fix for WMF images is not adopted by Slide Show mode (LO 6 Alpha 1 only) medium NEW
113721 One CPU core stuck at 100% after saving a file medium NEW
114272 [macOS] Some Asian characters are garbled with western fonts. medium NEW
114602 Query-Editor: No functions available for Sqlite 3 odbc high NEW
114653 using more than x custom properties in templates causes high CPU usage medium NEW
114980 "Preparing preview" for master slides "Recently used" or "Used in this presentation" takes a long time sometimes medium NEW
115077 Merge mail wizard send empty images by mail in HTML format medium NEW
116047 LO 6.0.1.1 (x64) calc windows, autofilter freezes medium NEW
116547 Export of mathematical formula in Writer document to DOCX is displayed incorrectly in Word medium NEW
117255 EDITING: Star Obj Descr (XML) Resize preview is sometimes inconsistent medium NEW
117818 CHAPTER NUMBERING DIALOG: Preview doesn't work as expected (steps in comment 1) medium NEW
117905 Coinmarketcap api doesn't work anymore medium NEW
118024 cursor stops moving up under certain conditions medium NEW
118603 Temporarily huge memory usage bump when saving a copy of a file (containing HI-res images); release is delayed medium NEW
118673 Cross reference category disappears when a comment is placed in the caption category medium NEW
118675 Low image quality when using special paste bitmap of a shape/textbox medium NEW
118713 macOS: The clicking area for the decrease button for a numeric box doesn't match the button size; it's smaller medium NEW
118748 Accessibility events missing when Calc cells become unselected due to navigating to focused cell medium NEW
119081 RTF paste not working when attempting to paste under an embedded table medium NEW
119139 Mysql timestamp fields not displayed in table data entry mode with mysql jdbc-connector ConnectorJ 8.x high NEW
119286 Sanitize documents using "Find & Replace" getting slower and slower medium NEW
119329 Variable in equation in .docx vanishes if we open the file in Writer (Win10 only?) medium NEW
119366 FREEZING with long and complex documents medium NEW
119419 Insert Field into Writer document attempts to connect to all registered database sources in sequence before displaying dialog high NEW
119520 The table borders/content shifting when saving with selected content (and afterwards when deselecting) medium NEW
119724 MacOS: Large delay before the red spell checker lines show up after pasting the same content multiple times. Lots of time spend in Scheduler::ProcessTaskScheduling() medium NEW
120014 MacOS: Lots of unresponsiveness (beachballs) when enabling automatic spell checking in a large document high NEW
120091 Some LO Base views with conversions or casting on datetime fields causing error message "the data content could not be loaded" with MySQL Connector/J 8 (not with with MySQL Connector/J 5). SQL Status: S1009 Parameter index out of range (1 > number of para high NEW
120154 High RAM usage ( around 300mb for 10 mins and drop to 150-200 mb) medium NEW
120216 Table make Impress slow and dump medium NEW
120295 A cell with comment text prevent a cell event medium NEW
120358 Long multi-layered numbered list in a table became mis-ordered after some editing medium NEW
120360 Draw extremely slow when table is added medium NEW
120440 Memory usage is increasing rather fast when creating lots of empty documents (45) and pasting a plain text in it medium NEW
120539 Position of adjusted middle line on connectors is randomly changed when copying the drawing to a writer document medium NEW
120646 Handling of columns in section not correct medium NEW
120695 FILEOPEN unixODBC connection to sqlite database not working high NEW
120796 Attempting to open a ".txt" file with Calc selected from Windows explorer "Open with", opens Writer instead medium NEW
121092 Libreoffice 6.1.3.2 does not allow saving Advanced Properties options with SQLITE 3 over ODBC medium NEW
121253 Database wizard opens when press CTRL+A inside the extension manager window high NEW
121698 Saving a document with thousands of comments hangs (GTK3) high NEW
121847 IMPRESS: slide marking on side pane lost when switching to notes view medium NEW
121860 System slows down (freezes) while marking/selecting a lot of single cells by Ctrl+Left Mouse Click medium NEW
121996 Crash in: rtl_uStringbuffer_remove when EDITING grid control high NEW
122206 FILEOPEN: Opening XML file with XSLT filter opens with plain text import dialogue medium NEW
122274 Annotating slide with INK using PEN cursor mode during edit session of file makes INK permanent medium NEW
122298 Charts in Base-Forms couldn't be changed by macro any more medium NEW
122408 Form couldn't connect to subform (Analyze SQL 'yes') with fields of different data types, which could be connected in queries (GUI and direct SQL). high NEW
122419 AutoFilter Search Freezes Calc in the Attached Spreadsheet medium NEW
122585 Classification: by using the dialog, footer text from policy is not placed in the document - it is the same as the header medium NEW
122586 Classification: by using the dialog, Watermark text from policy is not placed in the document medium NEW
122841 [UI] Dotted line cell border rendered incorrectly onscreen medium NEW
122905 FORM - Tablecontrol: Second listbox won't show right content when directly beneath first listbox high NEW
122952 Writer typing lag when editing text while header image is showing on screen medium NEW
122968 Stuttering/ judder while scrolling using page down (pages per second rate has worsened) medium NEW
123070 EDITING: Moving fields in Query designer GUI isn't shown with an arrow any more medium NEW
123167 BASIC: Pictures in buttons are not persistent in a dialog medium NEW
123234 Missing characters while exporting to PDF using certain fonts (IM fell from arch user repository) medium NEW
123418 Showing all comments takes longer compared with 4.4.7.2 medium NEW
123419 Scrolling around in a document with lots of comment shown very slow compared to 4.4.7.2 medium NEW
123466 Suspicious Log Messages about String comparison medium NEW
123555 Table of Content link tooltip renders blank squares instead of Chinese characters in Word openxml document high NEW
123633 Web view and hide whitespace causes view position to jitter until entire document is reformatted medium NEW
123700 Adding selection mode is unreliable, clearing selections instead of adding medium NEW
123801 Small caps captions do not display the Figure/Illustration/etc. category label medium NEW
123844 Groupedbar compact almost empty on MacOS high NEW
124000 FILEOPEN DOCX Last row of OLE object table is missing medium NEW
124059 FILEOPEN DOCX: Position of text changes when exporting to DOCX and reopen in LO medium NEW
124104 LibreOffice Base: Text cut off in GUI elements with font scaling enabling or when font size increased above 12 point medium NEW
124213 A recovered document has "(Remote)" in the title medium NEW
124214 Fuzzy rendering of a FontWork after some stressing medium NEW
124409 Opening the WriterGuideLO.odt manual is slower in 6.3 compared to 4.4.7.2 medium NEW
124465 Cannot press Green MacOS X button to tile 2 windows medium NEW
124569 Undoing a deletion of text with fieldmarks moves the closing fieldmark 2 chars right medium NEW
124587 Character highlighting going over text in other lines in slideshow mode medium NEW
124765 FILEOPEN LO Draw rasterizes vector graphics (PDF) on import (by drag-and-drop) medium NEW
124790 Background image in printed address labels not visible medium NEW
124795 Scrolling: Writer 100% CPU on specific docx (with table structure) medium REOPENED
124852 Heading characters much too big when copy-paste as GDI metafile medium NEW
124870 Up key does not move to line ended by hyphen medium NEW
125057 [FORMATTING] Conditional formatting KO while copying sheet medium NEW
125329 Automatic font color becomes invisible in Calc charts with dark background medium NEW
125357 LO Impress do not import eps medium NEW
125363 UI: LibreOffice Calc's AutoFilter treats combining and modifier letters the same as plain letters in the value list medium NEW
125398 VIEWING: Certain image shows shadow if you change zoom level medium NEW
125484 Updated locale does not update the result of text-resulting formulae medium NEW
125487 Small delay when closing a simple document containing fontwork with pattern fill medium NEW
125521 New Gallery items are always referenced to files medium NEW
125641 Slow scrolling responsiveness after saving a file with lots of comments medium NEW
125711 Large number of Comments (permanently) deleted, with record track changes enabled high NEW
125749 Layout on file open is different compared to the saved state medium NEW
125981 The "Default" button for quotes in AutoCorrect options doesn't reset the display of replacement medium NEW
126025 Extrusion on/off is faulty in saving for Fontwork favorite 40 medium NEW
126099 Arc tool goes crazy when drawing proportionally medium NEW
126269 Diagonal lines are sticking out, Calc print range not kept--when printing, for print preview, or exporting PDF. medium NEW
126289 Broken slide preview on Slide pane with enabled OpenGL medium NEW
126327 Conditional formatting: wrong reference when copying the table medium NEW
126344 Undo is slower and consumes more CPU time after pressing undo (compared to 4.4.7.2) medium NEW
126352 “Create Style” Dialogue Does not Work Correctly if Opened via Menu or Toolbar: (often/always) shows other styles than the 'own styles', sometimes inactive when it shouldn't .. medium NEW
126368 LO no print or crash when printing graphic/image in Linux medium NEW
126476 FILESAVE DOCX Embedded OLE object not displayed in embedded DOCX file medium NEW
126499 Chart in a form: setmodified(true) won't be executed high NEW
126698 Unable to update links to external files in Calc medium NEW
126715 UI: Hang up/Crash if I enter a space in a form control and then delete with Ctrl+Del medium NEW
126750 Macro not working .xlsm medium NEW
126762 Table style lost on export to HTML medium NEW
126881 CRASH: Closing LibreOffice while file in frame is being loaded medium NEW
126888 Ctrl+Shift+; shortcut to insert current time stopped working medium NEW
127123 Recently Used Fonts are not stored across sessions when sidebar is used medium NEW
127147 In Burmese some drop cap with numbers are bigger than others medium NEW
127184 AUTO CAPTION: Problems with Image Caption “Figure” in German UI medium NEW
127234 I can't save result of QR-code generator to PNG with good quality medium NEW
127310 Base/BASIC: RectangleShape object does not display an image by setting its FillBitmap medium NEW
127449 Edit->Find in LibreOffice Calc returns "search key not found" when the search term contains an apostrophe. medium NEW
127629 UI: Question to open links when opening a master document in English but different UI language medium NEW
127631 Impress becomes unresponsive after showing slide with animation in .ppt file medium NEW
127635 TRACK CHANGES: Replacement problem - spaces separated from other characters when replacing a single word by several words medium NEW
127655 [UI] Wrong font in formula bar (input line) medium UNCONFIRMED
127665 Address Datasource Wizard shows incorrect list of possible datasource types when compared to File> New >Database> connect to exising database medium NEW
127699 trail left by objects while dragging them with arrow keys in LibreOffice Impress medium NEW
127784 FIND & REPLACE DIALOG: Find & Replace Format dialog results in no found medium NEEDINFO
127790 Slide Show mode black screens if a zero width zero height image is inserted on slide medium NEW
127824 Navigation panel won't resize medium NEW
127833 Field shading in comments not properly refreshed medium NEW
128006 Macro warning dialog is prompted on every function or sub call medium NEW
128108 'File > Versions...' and then 'Compare' doesn't display deleted parts at the right place medium NEW
128355 Document is slow to load and unuseable after loading medium NEW
128455 Thumbnails on Start Screen is flickering when I try scroll it with mouse wheel (up-down-up-down) medium NEW
128498 OPTIONS DIALOG: "Update Links when Loading" doesn't work for sections medium NEW
128522 Error for non-existing hyperlink .TXT file "path is not an absolute uRL...:" should instead say "file does not exist" low NEW
128580 Copy text from Word is pasted as an image in Mac OS medium NEW
129166 XCellRangeData::setDataArray is many times slower when data contains some empty strings medium NEW
129312 [UI] Improve slide ordering graphics in LO Impress for MacOS low NEW
129457 writer pdf text import crash medium NEW
129824 Crash in: SwDocUpdateField::MakeFieldList_(SwDoc &,int) after "Insert" of a "User Field" with cursor in value field of dialog box ( steps in comment 3 ) medium NEW
129898 Drawings during presentations wouldn't be shown when setting "mouse pointer as pen" in the slide show settings medium NEW
130004 Navigator mode can no longer be set from its attached Navigation toolbox dialog--OK with tear-away of the floating toolbox medium NEW
130314 LibreOffice 6.4.0.3 hang convert-to pdf 6.4.0.3 medium NEW
130505 Open and save as dialogs become a pain to be used medium NEW
130543 Impress doesn't show existing background image in Slide Setup nor in Sidebar (Comment 5) medium NEW
130805 WRITER EDITING: Frame goes out of the shape when added to the shape medium NEW
130822 819-pages ODT continuously slower to open and freeze in 7.0+ medium NEW
130972 FILESAVE "Edit filter settings" grayed out / not accessible in "Save as" dialog of both Calc and Writer medium NEW
131321 FILEOPEN: ms word docx with styles that include bulleting / numbering loses bullet / number part of style in Writer medium NEW
131333 Cannot change data point icons in Calc's XY chart. medium NEW
131336 Command .uno:MacroDialog (Alt+F11) does no longer work medium NEW
131420 Filesave DOCX: Border from frame not present after RT medium NEW
131634 Crash in sd::View::SdrEndTextEdit(bool) medium NEW
131651 LO steadily increases memory usage until system freezes (lots of files open) medium NEW
131677 LibreOffice doesn't quit after crash & blocks relaunch medium NEW
131709 Copying a large sheet is very slow - II medium NEW
131863 LO-File-Dialog: filename when overwriting file medium NEW

209 Total; 209 Open (100%); 0 Resolved (0%); 0 Verified (0%);


另外, 所有的 LibreOffice 中尚未解决的“倒退型” bug 如果能进行“二进制二分查找”的话会很有帮助。

找到已经完成了“二进制二分查找”的 bug

请见 这里.

加入以上信息之后,开发者会知道这个“倒退”问题是在 master 分支源代码提交的 fb754a0df859e30255c25af8fa19bfaa75f257e7 (好) 和 2d19e9bb07ccff3134f855812dddfda5c07b1fe4 (坏) 之间产生的。

git log fb754a0df859e30255c25af8fa19bfaa75f257e7..2d19e9bb07ccff3134f855812dddfda5c07b1fe4

以上 git 命令将会显示 128 个提交,其中就包含了造成倒退问题的那个 bug. 这样,开发者就离修复这个 bug 不远了。 更多信息,请参考:

特殊情况

二分查找与特定语言(比如中日韩语言界面)相关的 bug

您要二分查找的 bug 可能与特定的界面语言相关。比如 tdf#115637,这个 bug 在中文界面上能够100%出现,而在英文界面上从来不出现。在这种情况下,因为 TDF 提供的二分查找仓库中默认没有提供任何语言包,只有英文界面,因此如果不进行改进,就无法二分查找这样的 bug。

如果某个 bug 在英文界面上工作正常,但在非英文界面上有问题(例如中日韩界面),您可以将以下文件从一个包含您的界面语言的常规发布版本中,复制到 bibisect 仓库:

  1. program/resource/<您的语言标记>
  2. share/registry/Langpack-<您的语言标记>.xcd
  3. share/registry/res/fcfg_langpack_<您的语言标记>.xcd
  4. share/registry/res/registry_<您的语言标记>.xcd

复制时,请注意尽量复制主版本号相同的版本中的资源。比如,对于 bibisect-linux-64-6.0 仓库,您可以复制 6.0.1.1 版本中的语言资源。

以单独的“用户配置文件”运行程序

如果想将用户配置文件放到 /tmp/ 临时目录中(该目录下的所有内容将在系统重启后被删除):

./opt/program/soffice -env:UserInstallation=file:///tmp/soffice-bisect

如果想在每次的二分查找中都让 libreoffice 以全新的用户配置文件启动,那么可以将 git commit 的希哈值附加到文件夹名称中,例如:

./opt/program/soffice \
-env:UserInstallation=file:///tmp/soffice-bisect-$(git rev-parse HEAD)

逆向 bibisect(找到修复了某个问题的提交)

Sometimes a bug is a collateral damage of another (possibly minor) bug, in a non obvious way. In such cases that other bug might be fixed on master, but was not backported to the release branch. To identify a problem-fixing commit you can use:

git bisect start --term-new=fixed --term-old=unfixed
git bisect fixed master
git bisect unfixed <some-old-sha> # you can use "git log --reverse" to detect the first revision in the bibisected package

As you test, say

git bisect fixed

or

git bisect unfixed

as appropriate.

If the fix is small and important enough, it likely can be easily backported to the release branch.

根据源代码的 hash 值检出某个特定的提交

有时候,您已经知道,在之前的某个特定的源代码 commit 中不存在您正在测试的 bug。

这种情况下,复制 LibreOffice 源代码 git 历史中的这个 source hash,并用它再 bibisecct 仓库的 log 中进行 grep:

git log --all --grep='29a9f433c268414747d8ec7343fc2b5987971738'

然后复制 bibisect 中的 commit hash,检出这个 commit,然后验证您的假设:

git checkout 38758b70f5278d4d8292a2e857e80a9a1130f38e

然后您可以使用 bibisect 仓库的 commit hash 来决定 bisect 过程中的 bad 和 good 的范围:

git bisect start 38758b70f5278d4d8292a2e857e80a9a1130f38e oldest

在某个 commit 范围内进行侦察

In case your bibisect result is a range of commits and you have trouble locating the offending commit, you might make your life easier by searching with a keyword.

An example for a case, where we know the problem is in Calc's Navigator view:

git log --stat --pretty=short --graph 169bd7718264b0e312052757f9bbd2321e1399c2...ff8b873936aa72b17309da4bfc2775573a5b1f55 | grep -B 10 -A 10 --color=always "sc/source/ui/navipi" | less -R

Adjust the -B and -A grep parameters to control how many lines before and after the hit you want to display. When piping to less, -R preserves the colouring of search results.

Bisect skip(跳过无法运行的 commit)

Sometimes we get stuck in a miserable situation, where we have to use git bisect skip over and over again due to various reasons. There are ways of getting out of these infuriating messes and here we will show one of them.

示例 bug: tdf#123095

Bug 出现在 4.0-4.1 范围内。

这里有太多的与自动筛选(autofilter)无关的 commit 了,因此需要忽略这些。

我们可以使用 git bisect visualize 来显示剩下的有嫌疑的 commits:

git bisect visualize --oneline > /some/path/bisect-viz-123095.txt

顶部显示的是最早的“坏”结果,底下显示的是您已经忽略的内容。再往下显示的是最近已知的“好”结果。

我的顶部结果包括:

  b842ac1 source-hash-7b4d76772ef76a8de852ed647ed0cad368f70189
  40ef04e source-hash-dc173b7f2a550185404aacbc6da744cb6d1880fc
  8e697de source-hash-eb96e4325278f31b9e6fbc1d5c6a01543204ded6

因此,我进行 git checkout b842ac1,测试检出的程序,再继续下一个,重复这个步骤。看起来顶部的第三个是一个可以忽略的提交。

我使用 source hash 按照 bottomcommit..firstbadcommit 的方式构造了一个查询

打开查询界面后,我进而搜索 "filter",然后找到了一个可疑的 commit,这个提交是关于对自动筛选的结果进行排序的。

如果在 bibisect 过程中 soffice 在某个或某几个 commit 下频繁崩溃,让您无法准确判断代码范围,那么 #Tidbits for efficiency 章节提供了解决办法。

使用 bibisect 找到源代码 commit

If bibisect was done, but not likely to be correct or in a repository known to have large range of source commits, we can check the range by finding a previous build commit from the found one and then find the source range.

$ git log -1 1f14665c5624bc7a502738aa8f4f2bd70a211e72^
$ git log --oneline b6c016da23d309b4ac7d154bc33a22397974ed73..d85fd8a85501547d5bb87822d2589a07aed7f2d6

故障排除

Please add your problems and how you solved them. This section covers issues that affect more than one OS. For OS-specific issues, please see the individual OS wiki pages.

无法提取文件

If you can't extract files (you should get an error message). Try to rename the file from *.tar.lzma to *.tar.xz.

已安装的 LibreOffice 被意外修改

问题 / 信息:

   error: Your local changes to the following files would be overwritten by checkout:
     opt/program/pythonloader.pyc
     opt/program/uno.pyc
     opt/program/unohelper.pyc
   Please, commit your changes or stash them before you can switch branches.
   Aborting

解决办法:

git checkout .

will repair the problem. Afterwards you can start the next test run as usual with

git bisect good # or git bisect bad

If that does not solve the problem, you can try

git clean -fd
git reset --hard

The ultimate repair is to delete everything except one

.git/

hidden folder, and do

git checkout oldest

无法启动 soffice

Problem 1: Upon trying to run soffice within bibisect you receive the error "unexpected operator terminate called after throwing an instance of 'com::sun::star::uno::DeploymentException'

Solution: Reset your libreoffice profile located in ~/.config/libreoffice. Make sure to backup the folder if you have any settings you'd like to preserve for use with your stable libreoffice release. After you're done with bibisect you can try to return your backed up profile to it's original location (ie. delete the new profile folder and replace it with the backed up one)

Problem 2: Trying to run soffice within bibisect gives frequent errors such as "Application Error" and skipping via 'git bisect skip' is tedious.

Solution: Upon an error, run one-line script to skip commit on error message and try the next one. Script will stop when soffice is successfully run and then you proceed with 'git bisect good' or 'git bisect bad'. If error is repeated, script can be run again.

 while (git clean -f -X && git bisect skip && ! instdir/program/soffice); do : ; done

如果 bisect RTL(从右向左)类型的 bug

如果想要对 RTL ( Right-To-Left,从右向左) 语言相关的 bug, 在运行 LibreOffice 之前请导入如下的变量:

SAL_RTL_ENABLED=1

如何 bisect 文件恢复类型的 bug

In case you need to bisect File Recovery bugs ( e.g. tdf#129210 ), comment out line OOO_DISABLE_RECOVERY=1 in file instdir/program/ooenv

提高效率

The repetitive nature of bibisecting gets tedious fast, so every trick you can use to make the process quicker is valuable. A typical way is to define aliases for complex commands in your .bashrc file.

The .bashrc of an active bibisecter might include a block such as this:

alias bad='git bisect bad && instdir/program/soffice'
alias good='git bisect good && instdir/program/soffice'
alias skip='git bisect skip && instdir/program/soffice'
alias next='git log --reverse --pretty=%H master | grep -A 1 $(git rev-parse HEAD) | tail -n1 | xargs git checkout'
alias prev='git checkout HEAD^1'
alias gallery='rm instdir/program/gengal'
alias pycache='find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf'
alias source='if [[ $(git log -1) =~ sha:([[:alnum:]]+) ]]; then git --git-dir ~/libreoffice/.git log -1 ${BASH_REMATCH[1]}; fi'
alias sof="\$( if [[ -d instdir ]] ; then echo instdir ; else if [[ -d opt ]] ; then echo opt ; fi ; fi )/program/soffice --norestore --nologo"

We have commands for jumping to the next or previous commit, "pycache" for dealing with a Windows-specific annoyance and finally "source" for quickly displaying source commit information. The command named "source" assumes you are in a bibisect repository, grabs the source hash of the currently checked out commit and feeds it to a git command targeting a full clone of the LibreOffice source code. To get a breakdown of the command, see the Bash Reference Manual.

The above examples are not exclusive to *nix systems, but work fine in a cygwin environment on Windows. If you want to open documents from the cygwin command line, enclose the ordinary Windows path in single quotes like so:

 instdir/program/soffice 'c:\users\test\downloads\example.ods'

更多信息

备注

For details on how the bibisect archives are generated:

We want to make a GUI for bibisect: