Download it now!
Bug 129798 - Crash in: SwViewShell::GetDoc() -- show print with Field dialog open
Summary: Crash in: SwViewShell::GetDoc() -- show print with Field dialog open
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.5.0 target:6.4.0.2 target:6.3.5
Keywords: bibisected, bisected, needUITest, regression
Depends on:
Blocks:
 
Reported: 2020-01-05 02:02 UTC by sdc.blanco
Modified: 2020-01-23 07:45 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["SwViewShell::GetDoc()"]


Attachments
procedure for crash (10.11 KB, application/vnd.oasis.opendocument.text)
2020-01-05 20:09 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2020-01-05 02:02:01 UTC
This bug was filed from the crash reporting server and is br-a5387a4e-0b5e-43a4-9f16-641c2320a779.
=========================================

Conducted in "Safe Mode"

1. Open new document.
2. Insert Footer, Insert Section (in Footer)
(show print - no problem)
3. Check Hide in Section and add a condition.
4. Create a "User Field" variable (corresponding to the variable in the condition), and Apply.
5.  Show print
6.  Crash.

Reproducible.
Comment 1 sdc.blanco 2020-01-05 02:11:14 UTC
Another crashreport (same procedure), but running in "Normal mode":  http://crashreport.libreoffice.org/stats/crash_details/9bcf8de9-3d1d-4749-8c6e-a4f4d2fe6f08

(which motivated the attempt in "Safe Mode")

Also crashed in:

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 444f0d256957544d26b9af9a0898364e829df1b5
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: en-US (en_DK); UI-Language: en-US
Calc: CL

(but no URL was provided in crashreport)
Comment 2 Julien Nabet 2020-01-05 08:53:42 UTC
On pc Debian x86-64 with master sources updated today or with LO Debian package 6.3.4 with gen rendering I don't reproduce this.

Would it be possible you attach an example file?
I mean, perhaps I missed something.
Comment 3 Dieter 2020-01-05 12:46:06 UTC
(In reply to Julien Nabet from comment #2)
> On pc Debian x86-64 with master sources updated today or with LO Debian
> package 6.3.4 with gen rendering I don't reproduce this.
> 
> Would it be possible you attach an example file?
> I mean, perhaps I missed something.

All crash reports for this signature are from a wndows system see https://crashreport.libreoffice.org/stats/signature/SwViewShell::GetDoc()
Comment 4 Roman Kuznetsov 2020-01-05 19:10:53 UTC
no repro in

Версия: 6.5.0.0.alpha0+ (x64)
ID сборки: c97f9af5e47ea234ad709a1f66c1e8ed20640066
Потоков ЦП: 4; ОС:Windows 6.1 Service Pack 1 Build 7601; Отрисовка ИП: GL; VCL: win; 
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: CL

win 10 only?
Comment 5 Mike Kaganski 2020-01-05 19:22:53 UTC
No repro with Version: 6.4.0.1 (x64)
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

Possibly more detailed steps needed ("a condition"?, "create a user field" - where? with what value - to hide or not?, "show print" - print preview or print dialog or...?)
Comment 6 Mike Kaganski 2020-01-05 19:28:30 UTC
Specifically I tried to create the field both inside the section, and in main text body; the condition was just a variable name ("userF1"); I tried assigning values 0 and 1 to the field.
Comment 7 sdc.blanco 2020-01-05 20:09:04 UTC
Created attachment 156950 [details]
procedure for crash

Thanks to all for vigorous testing.

Attached is a test document (with instructions).

NB.  "Set Variable" does not create any problems.

I just tried (type) "User Field"  (without a value).

This yields a crash for me.  (have not tried other variations, because the crashreport goes into a loop)

Here is the latest crashreport (where I shutdown and rebooted the machine, and only opened LibreOffice before running the test.)

http://crashreport.libreoffice.org/stats/crash_details/0ea8185c-dff3-4657-9c96-7cde94687ccf

Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded

Version 1909 
OS Build 18363.535
Comment 8 sdc.blanco 2020-01-05 20:16:31 UTC
Also tested again with attachment 156950 [details] and:

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 444f0d256957544d26b9af9a0898364e829df1b5
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: en-US (en_DK); UI-Language: en-US
Calc: CL

Again with "User Field" (and no value) and "Print Preview" - Crash

(claims to want to sent a report, but no URL is given, and then the crash recovery procedure loops (until each step is cancelled or discarded).
Comment 9 Mike Kaganski 2020-01-05 20:49:17 UTC
Steps:

1. In a new text document, Ctrl+F2 to open Fields dialog
2. Keeping Fields dialog, click Print Preview on toolbar.
Comment 10 Telesto 2020-01-05 21:48:58 UTC
No repro with
Versie: 6.0.4.1
Build ID: a63363f6506b8bdc5222481ce79ef33b2d13c741
CPU-threads: 4; Besturingssysteem: Windows 6.3; UI-render: GL; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 11 Telesto 2020-01-05 22:01:33 UTC
Bisected to:
author	Kshitij Pathania <kshitijpathania@gmail.com>	2018-07-02 18:48:19 +0530
committer	Szymon Kłos <szymon.klos@collabora.com>	2018-07-04 12:46:01 +0200
commit	d05b7b32d9ecb6fcb4a268eb68cdcee09bafa6dd (patch)
tree	c82f797131cfbdfd8933daad0fea249b50c49ad6
parent	ea39c41fdf63191579d25f327db81db14862251c (diff)
Notebookbar:Context for printpreview is now working
Also the context stuff is now working well even
after print preview is set

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d05b7b32d9ecb6fcb4a268eb68cdcee09bafa6dd
Comment 12 Telesto 2020-01-05 22:02:16 UTC
Adding CC to: Kshitij Pathania
Comment 13 Mike Kaganski 2020-01-05 22:53:01 UTC
https://gerrit.libreoffice.org/c/core/+/86253
Comment 14 sdc.blanco 2020-01-06 01:20:28 UTC
(In reply to Telesto from comment #11)

> Notebookbar:Context for printpreview is now working
> Also the context stuff is now working well even
> after print preview is set

Adding "see also" to bug #129411 (in case relevant).

Was not using notebookbar layout in this crash.
Comment 15 sdc.blanco 2020-01-06 01:41:53 UTC
Was closing Field dialog boxes in a test document (used in bug #129824) and got a mergedlo.dll crash.  

Noticed a similarity in the third frame of that crash, to the third frame of the crash report for this bug 129798.

	swuilo.dll 	SwFieldDlg::`scalar deleting destructor'(unsigned int) 

Here is the URL for that crash report, in case it might provide anything useful. 

http://crashreport.libreoffice.org/stats/crash_details/5a4168d9-5e18-40f4-952c-4a3925973230
Comment 16 Commit Notification 2020-01-06 06:37:11 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/016c69c99e1ab26e6582ca8dea6fa1b4b9e5d109

tdf#129798: store SwWrtShell when it's available

It will be available in 6.5.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.
Comment 17 Mike Kaganski 2020-01-06 11:50:04 UTC
(In reply to Commit Notification from comment #16)

After that one, and https://git.libreoffice.org/core/+/afa6a774936c34b09b37ab8539193ac529681798, could you please re-test? several different crashes in one place :-)
Comment 18 Julien Nabet 2020-01-06 19:50:16 UTC
(In reply to Mike Kaganski from comment #9)
> Steps:
> 
> 1. In a new text document, Ctrl+F2 to open Fields dialog
> 2. Keeping Fields dialog, click Print Preview on toolbar.

Indeed I could reproduce this with LO debian package 6.3.4 but not with master sources updated today:
Author: Stephan Bergmann <sbergman@redhat.com>
Date:   Mon Jan 6 16:05:34 2020 +0100

    Avoid $(shell $(gb_MKTEMP))
    
    ...which, when included in a
    
      ifneq ($(MACOSX_SHELL_HACK),)
...
Great job! :-)
Comment 19 Commit Notification 2020-01-07 15:32:22 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/98f69a9785332bda092d373fb96ee1135fb79210

tdf#129798: store SwWrtShell when it's available

It will be available in 6.4.0.2.

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.
Comment 20 Xisco Faulí 2020-01-07 16:08:22 UTC
(In reply to Mike Kaganski from comment #9)
> Steps:
> 
> 1. In a new text document, Ctrl+F2 to open Fields dialog
> 2. Keeping Fields dialog, click Print Preview on toolbar.

I do confirm this is fixed in

Version: 6.5.0.0.alpha0+
Build ID: bf540873f5e258452fed5006f65a403c95e7872a
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

while reproducible in

Versió: 6.3.3.2
ID de la construcció: 1:6.3.3-0ubuntu0.18.04.1~lo1
Fils de CPU: 4; SO: Linux 4.15; Renderitzador de la IU: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_ES.UTF-8); Llengua de la IU: ca-ES
Calc: threaded

@Mike, thanks for fixing this issue!! Should it be closed as RESOLVED FIXED ?
Comment 21 Mike Kaganski 2020-01-07 16:11:46 UTC
(In reply to sdc.blanco from comment #14)
> Was not using notebookbar layout in this crash.

(In reply to sdc.blanco from comment #15)
> Was closing Field dialog boxes in a test document (used in bug #129824) and
> got a mergedlo.dll crash.  

So both crashes mentioned fixed here - in comment 16 and in comment 17 - *seem* to be something different from what sdc.blanco sees; that's why in comment 17 I asked for re-check...
Comment 22 sdc.blanco 2020-01-07 23:01:25 UTC
(In reply to Mike Kaganski from comment #9)
> 1. In a new text document, Ctrl+F2 to open Fields dialog
> 2. Keeping Fields dialog, click Print Preview on toolbar.

Did not crash. (I also tried with the procedure of the original report.)
Changed summary to indicate the problem more accurately. Thanks.

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 035c7717c135c66c0ec025500b73ae9c13b7c586
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded
(7 jan 2020 build)
Comment 23 Mike Kaganski 2020-01-08 05:16:38 UTC
Thanks for checking!
Comment 24 Xisco Faulí 2020-01-08 09:10:48 UTC
Hi Mike,
Would it be possible to backport the commit to 6.3 branch ?
Comment 25 Commit Notification 2020-01-22 19:42:58 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/fa28b588db339964303a06d739a4424b97d642cb

tdf#129798: store SwWrtShell when it's available

It will be available in 6.3.5.

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.