Bug 109253 - FONT NAME list: Scrolling through the list causes a crash. "Bad allocation" error message
Summary: FONT NAME list: Scrolling through the list causes a crash. "Bad allocation" e...
Status: RESOLVED DUPLICATE of bug 112180
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All Windows (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needUITest
Depends on:
Blocks: Fonts-Name-Combobox
  Show dependency treegraph
 
Reported: 2017-07-21 07:18 UTC by JohnHardy
Modified: 2018-02-01 17:44 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
TTF font file that crashes LibreOffice (39.93 KB, application/x-font-ttf)
2017-09-04 10:10 UTC, JohnHardy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JohnHardy 2017-07-21 07:18:58 UTC
Open LibreOffice Writer. Open a new Writer document. Scroll through the list of fonts in the FONT NAME list. It crashes. There is a "LibreOffice 5.4 - Fatal Error. Bad allocation" error message much of the time. Sometimes there is a Windows error message that LibreOffice has stopped working and Windows is searching for a cause.

It seems to be scroll-speed related. If I scroll very slowly with the scroll wheel on my mouse (one or two clicks per second), it does not crash. If I use the PAGE UP and PAGE DOWN buttons at one button-press per second to scroll, it does not crash. But anything significantly faster than that will cause a crash. Using the scroll bar will cause a crash.

Your results will probably vary. But it crashes under what I consider normal-use situations. If I have done considerable typing after the last auto-save and before the crash, considerable work is lost.

I did not experience this prior to the 5.4 betas. The last three 5.4 beta versions that I tried have this problem.

Thank you.
Comment 1 Xisco Faulí 2017-07-21 09:15:17 UTC Comment hidden (obsolete)
Comment 2 JohnHardy 2017-07-25 04:01:11 UTC
I renamed my profile to "user-old", then started LO, then used the "Help/Restart in Safe Mode" option to restart LO in safe mode. The Safe Mode dialog had the default setting of "Restore from backup" checked. I don't know if that takes a copy of my profile from wherever and installs it. If so, and there is a profile issue causing the problem, I would be experiencing the same problem. It does look like my toolbar is missing a few buttons that I added, so I guess the profile is back to stock settings.

I continued in safe mode and opened a new Write document. I experienced the same issues as originally described. 

Extension Manager: The following items are installed:

English spelling dictionary
French spelling dictionary
Solver for Nonlinear Programming 0.9
Spanish spelling dictionary
Wiki Publisher 1.2.0

Apparently these extensions are "Bundled with LibreOffice". I only need the English dictionary. There does not seem to be a way to delete the other dictionaries.

If there is something else I need to do, please let me know. Happy to help.

Thank you.
Comment 3 Telesto 2017-08-08 07:04:20 UTC
*** Bug 111347 has been marked as a duplicate of this bug. ***
Comment 4 Telesto 2017-08-08 07:05:36 UTC
Confirmed by the duplicate -> NEW
Comment 5 Telesto 2017-08-08 07:17:31 UTC
@Xisco
Can you still reproduce this? You did before: bug 106265 comment 53
Comment 6 JohnHardy 2017-08-08 08:18:06 UTC
I just installed LO 5.4.0.3, the latest "fresh" version, on a Windows XP system. Before installing it I removed a much earlier version of LO and I ran a couple of registry cleaners (CCleaner and Eusing) and rebooted a couple of times. I'm experiencing the same problem on the XP system.
Comment 7 Telesto 2017-08-08 10:44:45 UTC
The problem is most likely caused by an installed font. The Gotham font did make LibO crash to (bug 110459)
Comment 8 Xisco Faulí 2017-08-08 16:22:46 UTC
(In reply to Telesto from comment #5)
> @Xisco
> Can you still reproduce this? You did before: bug 106265 comment 53

Actually, I've been able to reproduce it quite easily in

Version: 6.0.0.0.alpha0+
Build ID: aa084cc1dcb518ffc1984e122abbf4401c4d0ce0
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-08_01:05:21
Locale: es-ES (es_ES); Calc: group

it crashes for me after a few seconds...
Comment 9 Telesto 2017-08-08 16:51:04 UTC
(In reply to Xisco Faulí from comment #8)
It probably related a specific font and/or operating system. I'm not able to reproduce it myself

Version: 6.0.0.0.alpha0+
Build ID: 386fcf9be786b302cd2c6f85ff6d8d97a6777926
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-06_01:57:50
Locale: nl-NL (nl_NL); Calc: CL
Comment 10 Xisco Faulí 2017-08-08 16:52:18 UTC
Just for the record: I could reproduce it very easily the first time but I can't reproduce it anymore...
Comment 11 Bryan Leech 2017-08-17 18:17:25 UTC
I am having exactly the same problem. Reading through the comments, I can find no solution and this issue is making Libreoffice unusable. I note that the crash has never caused a problem with Windows (7 Home Premium 64-bit).
I really hope this can be resolved. Thank you.
Comment 12 Telesto 2017-08-17 18:21:01 UTC
*** Bug 111885 has been marked as a duplicate of this bug. ***
Comment 13 Bryan Leech 2017-08-18 19:27:01 UTC
Problem disappeared with latest Windows Update installed (Win 7 Home Premium 64 bit)
Comment 14 JohnHardy 2017-08-18 20:24:04 UTC
Problem still exists with Windows 10 64-bit with an update that was installed last night.
Comment 15 Robert McClure 2017-08-18 20:30:33 UTC
Problem still exists with Windows 7 Ultimate with all updates as of 1 hour ago.
Comment 16 Bryan Leech 2017-08-18 21:55:19 UTC
The "cure" from Windows Update did not last. The problem has returned! Why it was OK for a short time is an even greater mystery.
Comment 17 Robert McClure 2017-09-02 15:32:16 UTC
Problem still exists with 5.4.1.2 release.
Comment 18 JohnHardy 2017-09-04 04:23:46 UTC
I just received the email regarding a similar bug where a specific font was causing the crash (Bug 112180). Then I slowly scrolled through my font list using the up/down arrows on the scroll bar. When it got to “Helvetica Narrow” LO crashed. I tried it again, same result. At the point when it was crashing, all other font names in the drop-down list disappeared, leaving just "Helvetica Narrow" visible for a brief period until the crash process completed. Perhaps a deliberate code feature ("This is the font!").

Then I used the Windows 10 font manager to look for that font. There was a “Helvetica” folder with lots of variations of Helvetica in it, but there was also an individual font icon next to the “Helvetica” folder with the name “Helvetica Narrow S Regular”. I deleted that font with Windows font manager. I restarted LO. Scrolling through the drop-down font list at any speed no longer causes a crash. So, my problem seems to be solved by finding a troublesome font and deleting it, as Telesto mentioned earlier. I did not see any correlation of a specific font until now. Apparently I never did a slow-scroll through the “Helvetica Narrow” part of the font list using the scroll-bar arrows until now.

However, there is still some strangeness going on with Helvetica fonts (the short story being, I need to clean up my Helvetica fonts). I still have 4 entries in the drop-down font list:

Helvetica
Helvetica Narrow
Helvetical-Narrow
Helvetica Narrow S

Opening the “Helvetica” font folder reveals 13 variations of Helvetica, including some duplicates. Here is each font name as described in the Helvetica folder, followed by the file name and it's source, assuming the data is accurate:

Helvetica Bold [helvetica-bold.otf File version 001.003 Lexmark]
Helvetica Bold Italic [helvetica-bolditalic.otf File version 001.003 Lexmark]
Helvetica Bold Narrow Oblique [helvetica-narrow-boldoblique.otf File version OTF1.0.PS 003.000;Core 1.0.22 Copyright (c) 1985, 1987, 1989, 1990, 1997, 1998 Adobe Systems Incorporated.]
Helvetica Bold Narrow Oblique [Duplicate of above item, same data, only one font file]
Helvetica Medium [helvetica.otf  File version 001.003 Lexmark]
Helvetica Medium Italic [helvetica-italic.otf File version 001.003 Lexmark]
Helvetica Narrow  [unicode.helvetin.ttf” File version 1.0]
Helvetica Narrow  [Duplicate of above item, same data, only one font file]
Helvetica Narrow Bold [helvetica-narrow-bold_0.otf File version 001.003 Lexmark]
Helvetica Narrow Bold Italic [helvetica-narrow-bolditalic_0.otf File version 001.003 Lexmark]
Helvetica Narrow Medium Italic [helvetica-narrow-italic_0.otf File version 001.003 Lexmark]
Helvetica Narrow Oblique [helvetica-narrow-oblique.otf File version OTF1.0.PS 003.000;Core 1.0.22 Copyright (c) 1985, 1987, 1989, 1990, 1997, 1998 Adobe Systems Incorporated.]
Helvetica Narrow Oblique [Duplicate of above, same data, only one file]

I had to look in the actual font file to get the “...Adobe Systems...” details from those 2 fonts. Each font is represented in the Helvetica folder by an icon with “Abg” displayed on it, with those 3 characters displayed in that font variation. However, the 2 icons representing the 2 versions of “Helvetica Narrow”, as well as the overall Helvetica folder, appear to have 2 (not 3) Chinese characters on them. Sorry, I don’t really know if it is Chinese or some other font, but it is not English. The “Properties” for those two “Helvetica Narrow” ttf fonts look sketchy, with the bare minimum of information.

Some fonts appear to be from Adobe, others from Lexmark, and two that are of unknown origin, if the detail information is correct.

Further oddities:

When I select “Helvetica Narrow” it appears as a light italic font when typed in a document. The font name as it appears in the font drop-down list looks like a condensed, bold, non-italic font. Also, the word “name” looks like “nam e” with much too large a space between the “m” and the “e”. So there are spacing issues.

“Helvetica Narrow S” appears as a light monospace font when typed in a document, and in the drop-down list. In fact, it looks absolutely IDENTICAL to “Courier New”. So something strange is going on there.

Helvetica-Narrow: Same results as “Helvetica Narrow”.

I removed the duplicate font Helvetica Narrow (“unicode.helvetin.ttf”) from the Helvetica folder. This caused the Helvetica folder to return to 3 English characters “Abg” displayed on the folder.

I still have “Helvetica”, “Helvetica-Narrow” and “Helvetica Narrow” in the drop-down font list.

There are other oddities, but it seems likely that I need to remove all of my Helvetica fonts and install known-good ones.
Comment 19 Bryan Leech 2017-09-04 06:23:51 UTC
Thank you - but I have no Helvetica fonts so that didn't work in my case. It does seem to be a font issue, but I am unable to isolate it to any font(s). I have tried removing the latest Libreoffice and installing 5,3.4 - still the same problem.
Comment 20 Telesto 2017-09-04 06:40:19 UTC
A patch has been commit (trying) to fix the issue (see bug 112180). It's - for now - only available in the daily builds. Download link:

http://dev-builds.libreoffice.org/daily/master/Win-x86@42/2017-09-04_00.07.35/libo-master~2017-09-04_00.07.35_LibreOfficeDev_6.0.0.0.alpha0_Win_x86.msi

More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds
Comment 21 JohnHardy 2017-09-04 07:22:28 UTC
Bryan: It may not be the specific Helvetica font that causes the crash, but rather a fault that could occur in any font, in my case it happened to be with a Helvetica font. I'm just speculating. The fonts may be OK and it is a LO problem.

If you haven't tried yet, you could remove all but a few fonts and test LO. Add a few fonts at a time and test again. See when the problem resurfaces. That assumes that there is a font problem. But it could be a LO problem.

I will try Telesto's link on my other computer where I have not yet found the cause of the crash.
Comment 22 Xisco Faulí 2017-09-04 08:30:01 UTC
Yes, better to try a daily build containing this commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=c3b7c4d3ec6edb5db774d5352222b77239175f96 in order to check whether it fixes this bug or not...
Comment 23 JohnHardy 2017-09-04 10:10:46 UTC
Created attachment 136000 [details]
TTF font file that crashes LibreOffice
Comment 24 JohnHardy 2017-09-04 10:14:31 UTC
I just re-installed the font "Helvetica Narrow S Regular.ttf", then reopened LO and scrolled through the drop-down font list. It crashed. I then deleted the font, reopened LO and it is working fine. So I have an easily repeatable test.

Note that the file name (quoted above) has spaces in it, if that makes a difference. So I renamed it by removing the spaces so it became "HelveticaNarrowSRegular.ttf". It still crashed LO.

Reinstalling the file "unicode.helvetin.ttf" caused two icons to appear again in the folder for Helvetica fonts. Again, Chinese characters on the front of those icons, as well as on the front of the Helvetica folder. After deleting one of the fonts, both font icons went away and the 3 characters on the Helvetica folder reverted to English. That font came from a folder on my hard drive that I named "LibFreeFonts", another folder with the same font in it was named "MyFontFree".

I still get italics when using the two "narrow" versions of Helvetica that are still available, so I will need to delete them and find narrow versions that work correctly and don't cause a crash.

I separately attached the font file that crashes LO ("Helvetica Narrow S Regular.ttf"). If anyone wants the "unicode.helvetin.ttf" file, let me know. Thank you.
Comment 25 Bryan Leech 2017-09-04 19:35:17 UTC
(In reply to JohnHardy from comment #21)
> Bryan: It may not be the specific Helvetica font that causes the crash, but
> rather a fault that could occur in any font, in my case it happened to be
> with a Helvetica font. I'm just speculating. The fonts may be OK and it is a
> LO problem.
> 
> If you haven't tried yet, you could remove all but a few fonts and test LO.
> Add a few fonts at a time and test again. See when the problem resurfaces.
> That assumes that there is a font problem. But it could be a LO problem.
> 
> I will try Telesto's link on my other computer where I have not yet found
> the cause of the crash.
Comment 26 Bryan Leech 2017-09-04 19:43:35 UTC
(In reply to Bryan Leech from comment #25)
> (In reply to JohnHardy from comment #21)
> > Bryan: It may not be the specific Helvetica font that causes the crash, but
> > rather a fault that could occur in any font, in my case it happened to be
> > with a Helvetica font. I'm just speculating. The fonts may be OK and it is a
> > LO problem.
> > 
> > If you haven't tried yet, you could remove all but a few fonts and test LO.
> > Add a few fonts at a time and test again. See when the problem resurfaces.
> > That assumes that there is a font problem. But it could be a LO problem.
> > 
> > I will try Telesto's link on my other computer where I have not yet found
> > the cause of the crash.

John - and others: Thank you. Starting with few fonts and increasing is an idea, but I just don't have the time, unfortunately - and that may not be the issue. I have neglected to mention that my other computer (desktop also running Win 7 Home Premium 64-bit), has no problems. Unfortunately, it's convenient for me to use this laptop much of the time.
The suggestions of the daily commit releases take me out of my depth - or appear to. I'm reasonably computer literate so could probaly sort out that approach, but exploring needs time Ilack.
Comment 27 Bryan Leech 2017-09-04 20:03:47 UTC
Back again. I was confused by this term "commit" - but have used Telesto's link (thank you Telesto) to install the version 6.0.0..... . It almost solves the problem. I can scoll through my fonts and not crash - unless I scroll VERY rapidly. This is just an initial response, so yet to be tested by time, but I can live with this if it proves to be consistent with what I have seen just now.
Comment 28 Robert McClure 2017-09-04 21:56:51 UTC
This is clearly NOT a font issue, but a memory allocation and de-allocation issue. No font file, however badly put together, should cause a crash. No software should rely on foreign files to be perfect and should always protect itself from bad input.  Of course, a lot of software does not do this.
Comment 29 V Stuart Foote 2017-09-15 16:01:21 UTC
Please retest with a current daily build of master [1][2], or a 5.4.2 build when released. Additional error catching applied with commit [3] should prevent corrupt/incomplete font attributes from causing crashes and instead result in font being replaced by a fall back.

This is a duplicate of bug 112180 

=-ref-=

[1] http://dev-builds.libreoffice.org/daily/master/
[2] https://wiki.documentfoundation.org/Installing_in_parallel/Windows

[3] https://cgit.freedesktop.org/libreoffice/core/commit/?id=f263692de96ac68e73eeb953b7e92a18d149f30e

*** This bug has been marked as a duplicate of bug 112180 ***