Bug 144754 - Assertion opening page style dialog
Summary: Assertion opening page style dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Jan-Marek Glogowski
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-27 23:19 UTC by Mark Hung
Modified: 2021-09-28 17:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace copied from VS (7.43 KB, text/plain)
2021-09-27 23:20 UTC, Mark Hung
Details
backtrace with full path (12.70 KB, text/plain)
2021-09-28 11:54 UTC, Mark Hung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2021-09-27 23:19:25 UTC
Description:
LibreOffice always assert when I try to open default page style dialog, either by double clicking style name "Default style" from the status bar, or right button menu - edit when selecting "Default style" from the page style tab of sidebar. I've tested in Calc and Writer, but didn't test styles other than "Default style".

Assertion failed: mhDefFont, file C:/cygwin/home/hungl/lode/dev/core/vcl/win/gdi/salfont.cxx, line 866
Assertion failed: GetChildCount() == 2 || pWindowImpl->mbInDispose, file C:/cygwin/home/hungl/lode/dev/core/vcl/source/window/layout.cx
x, line 1513

Steps to Reproduce:
1. Open Writer or Calc.
2. Double click "Default Style" on the status bar.


Actual Results:
Assertion dialog pops up.

Expected Results:
Page style dialog pops up.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5bc3cc695d58848d937910bf6344af1fa6f71725
CPU threads: 16; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: zh-TW (zh_TW); UI: en-US
Calc: CL
Comment 1 Mark Hung 2021-09-27 23:20:54 UTC
Created attachment 175301 [details]
Backtrace copied from VS
Comment 2 Mark Hung 2021-09-27 23:22:08 UTC
See also
https://gerrit.libreoffice.org/c/core/+/122726
Comment 3 Jan-Marek Glogowski 2021-09-28 05:47:07 UTC
The Gerrit patch fixes the assert for me and it doesn't crash anymore.

After reviewing the Windows font handling code, I'm wondering, why the assert wasn't triggered before.

The attached bt doesn't have any assert. Is that one after applying the Gerrit patch for you? Do you see any other problems?
Comment 4 Commit Notification 2021-09-28 11:03:11 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3476106890ea2a00e6f949c918f6c05e17c66a36

tdf#144754 WIN de-assert ReleaseFonts / setFont

It will be available in 7.3.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 5 Mark Hung 2021-09-28 11:52:57 UTC
(In reply to Jan-Marek Glogowski from comment #3)
> The Gerrit patch fixes the assert for me and it doesn't crash anymore.
> 
> After reviewing the Windows font handling code, I'm wondering, why the
> assert wasn't triggered before.
> 
> The attached bt doesn't have any assert. Is that one after applying the
> Gerrit patch for you? Do you see any other problems?

That's before applying the patch.

vcllo.dll!VclFrame::get_child() Line 1513
	at C:\cygwin\home\hungl\lode\dev\core\vcl\source\window\layout.cxx(1513)

is
assert(GetChildCount() == 2 || pWindowImpl->mbInDispose);
Comment 6 Mark Hung 2021-09-28 11:54:24 UTC
Created attachment 175313 [details]
backtrace with full path
Comment 7 Mark Hung 2021-09-28 12:13:28 UTC
(In reply to Commit Notification from comment #4)
> Jan-Marek Glogowski committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 3476106890ea2a00e6f949c918f6c05e17c66a36
> 
> tdf#144754 WIN de-assert ReleaseFonts / setFont
> 
> It will be available in 7.3.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.

I just cherrypicked the commit to my local branch, the issue does not reproduce now.
Comment 8 Jan-Marek Glogowski 2021-09-28 17:20:37 UTC
As from comment 7.