Issue 2143 - True Types make OpenOffice hangs
Summary: True Types make OpenOffice hangs
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hdu@apache.org
QA Contact: issues@installation
URL:
Keywords:
Depends on: 2423
Blocks:
  Show dependency tree
 
Reported: 2001-11-07 10:43 UTC by Unknown
Modified: 2002-05-16 10:21 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
get info about XRENDER on -display :0 (5.73 KB, application/octet-stream)
2001-12-18 17:40 UTC, hdu@apache.org
no flags Details
Screen shot with the new shared library (51.68 KB, image/png)
2001-12-21 10:21 UTC, Unknown
no flags Details
Screen shot with the original 641b shared library (62.90 KB, image/png)
2001-12-21 10:22 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2001-11-07 10:43:29 UTC
Ok I'm running mandrake 8.1 


this is a slice of XF86Config-4 conf file:

//----------------------------------------------------------------
Section "Files"

    RgbPath     "/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Mandrake 6.0 and later now use a font server independent of
# the X server to render fonts.

#   FontPath   "unix/:-1"
    FontPath "/usr/lib/X11/fonts/misc:unscaled"
    FontPath "/usr/lib/X11/fonts/100dpi"
    FontPath "/usr/lib/X11/fonts/75dpi"
    FontPath "/usr/lib/X11/fonts/misc"
    FontPath "/usr/lib/X11/fonts/100dpi:unscaled"
    FontPath "/usr/lib/X11/fonts/75dpi:unscaled"
    FontPath "/usr/lib/X11/fonts/misc:unscaled"
    FontPath "/usr/lib/X11/fonts/Type1"
    FontPath "/usr/lib/X11/fonts/Speedo"
    FontPath "/usr/lib/X11/fonts/freefont"
    FontPath "/usr/lib/X11/fonts/URW"
    FontPath "/usr/lib/X11/fonts/mdk"
    FontPath "/usr/X11R6/lib/X11/fonts/mozilla-fonts"
#    FontPath "/usr/share/fonts/default/Type1"
#    FontPath "/usr/share/fonts/ttf/big5"
#    FontPath "/usr/share/fonts/ttf/gb2312"
#    FontPath "/usr/share/fonts/ttf/decoratives"
#    FontPath "/usr/share/fonts/ttf/western"
    FontPath "/usr/share/fonts/ISO8859-2/Type1"
    FontPath "/usr/share/fonts/afms/adobe"

EndSection
//----------------------------------------------------------------

If I comment out big5, gb2312, etc. and I look for fonts in combo box
OpenOffice638c crashes
Comment 1 lsuarezpotts 2001-11-07 19:42:38 UTC
I'm redirecting this issue to the proper component. WWW is for broken links, stuff 

like that. ;)

Louis
Comment 2 lsuarezpotts 2001-11-28 00:25:43 UTC
redirecting to SW project lead
Comment 3 t8m 2001-12-10 12:23:27 UTC
I have simmilar problem when using TTF fonts in the build 641b (the
older 638c seems to not have the problem).
Also look at the Issue 2423 which is somewhat simmilar.
But I don't have to select any font it just hangs when I open the
combo box and try to scroll down through the list of the available fonts.
Comment 4 jp 2001-12-11 19:12:00 UTC
JP->HDU: I think it's your problem.
Comment 5 stx123 2001-12-11 19:23:27 UTC
change of QA contact according to component
Comment 6 hdu@apache.org 2001-12-11 19:30:16 UTC
Which version of OpenOffice are you using?

Please try to find out which font causes the crash.
You can do this e.g. by stracing OpenOffice. Go
into the OpenOffice/program folder and do

strace -f 2>&1 soffice | cat > strace.out

Then make recreate the crash. Now do
fgrep open strace.out | tail

and send me the result.
Comment 7 t8m 2001-12-12 11:23:23 UTC
On my machine the hang is caused by all fonts with microsoft-symbol
encoding -> Issue 2423.
I use OpenOffice 641b
Comment 8 Unknown 2001-12-14 08:20:51 UTC
Here is the result of the strace. I got this trace by simply scrolling the font list.

open("/usr/X11R6/lib/X11/fonts/truetype/cour.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/truetype/gara.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/truetype/georgia.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/truetype/impact.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/Type1/lcdxmr.pfa", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/Type1/lcdxsr.pfa", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/Type1/lcdxrr.pfa", O_RDONLY) = 25
open("/opt/OpenOffice.org641/share/fonts/truetype/opens___.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/truetype/pala.ttf", O_RDONLY) = 25
open("/usr/X11R6/lib/X11/fonts/truetype/symbol.ttf", O_RDONLY) = 25
Comment 9 hdu@apache.org 2001-12-14 12:52:32 UTC
Yes, symbol.ttf seems to cause the problem.

I'm wondering what happens after the
open("symbol.ttf",...)
Can you please provide a dozen or so lines of the
strace output after that?

With the versions of Office and symbol.ttf on my system
I cannot recreate the problem. Probably the fixes named
"#88364# handle bad fonts more gracefully" helped. They
got into SRC641C.
Comment 10 Unknown 2001-12-17 07:49:12 UTC
Here are the lines following symbol.ttf :
open("/usr/X11R6/lib/X11/fonts/truetype/symbol.ttf", O_RDONLY) = 25
fstat64(25, {st_mode=S_IFREG|0755, st_size=69464, ...}) = 0
old_mmap(NULL, 69464, PROT_READ, MAP_SHARED, 25, 0) = 0x466ec000
close(25)                               = 0
brk(0x8231000)                          = 0x8231000
brk(0x8232000)                          = 0x8232000
--- SIGTERM (Terminated) ---
_exit(255)                              = ?

I have tried to remove symbol.ttf but it just crashes with another ttf font.
Do you want a copy of my symbol.ttf ?
Anyway, it sometimes crashes with other ttf fonts : marlett, outloook, etc...

A very interesting point : if I use tff fonts from Windows 95, no crash happens. Even with symbol.ttf.
My usual fonts, those which crash, are delivered with Windows 2000.
Could this bug been caused only by W2K fonts ?
All worked fine with 638C build.
Comment 11 Unknown 2001-12-18 08:21:35 UTC
I used build 641. I have just tried with 641b : it crashes in the same way.
Comment 12 hdu@apache.org 2001-12-18 11:46:23 UTC
I cannot recreate the problem with OO641a or OO641b, though I have
a symbol.ttf of the same size 69464 bytes, which practically means
they are the same.

Do you get a "Office crashed" dialog?
If yes, this would be a good time to get a stack trace.
Do you know how to get the stack trace of a crash?
If not I can sent you some instructions.

By the way, what XServer are you using and what graphics card?
Comment 13 t8m 2001-12-18 12:10:59 UTC
I see the hang on XFree86-4.0.2-11 from Redhat
And I have the freetype-2.0.1-4.

The OpenOffice simply hangs and does nothing useful anymore (no screen
painting and so on) so it doesn't generate any crash.
Comment 14 hdu@apache.org 2001-12-18 12:23:36 UTC
> And I have the freetype-2.0.1-4.

Did you compile OO yourself and linked in the above mentioned
library or did you use the prebuilt libraries?

The OO hang is good enough to get a stack trace:
Please do
  ps | fgrep soffice.bin
Then note the first PID of soffice.bin => ###
Then go into the program/ directory and do
  gdb ./soffice.bin ###
and there please type
  bt
Please post the resulting stack trace here. Thanks.
Comment 15 Unknown 2001-12-18 13:36:17 UTC
Sorry... I made a mistake : it does reproduce with fonts coming from Windows 95.
I forgot to generate a fonts.dir so X doesn't use my font path...

I'am using Xfree86 4.1 with ATI driver. I have an ATI Mach64 chipset.
I replaced the original driver with one available at linux-video.org.
I'm using Freetype 2.0.5.

No dialog is displayed. When it happens my PC seems to hang : all I can do is move the mouse around.
I have to 'killall soffice.bin' using telnet from another PC. Then everything works again.
This does not reproduce with OpenOffice638.

The 'cksum symbol.ttf' returns : 2791708213 69464

New test :
. I remove /usr/X11/lib/X11/fonts/truetype from the list of font paths in XF86config
. All works fine : no crash ! I have tried many times.
. My fonts are linked in ~/OpenOffice641b/user/fonts to /usr/X11R6/lib/X11/fonts/truetype
. A strace shows that the TFF fonts are opened in ~/OpenOffice641b/user/fonts.
So this seems to be deeply linked with what Xfree does with Truetype.

Here is my gdb trace :

#0  0x4020a534 in _init () from /opt/OpenOffice.org641b/program/libvcl641li.so
#1  0x40367757 in X11GlyphPeer::GetGlyphId ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#2  0x403610cc in SalGraphicsData::DrawServerAAFontString ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#3  0x403620ab in SalGraphicsData::DispatchServerFontString ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#4  0x4036222c in SalGraphicsData::DrawServerFontString ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#5  0x40362de3 in SalGraphics::DrawTextArray ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#6  0x402902a8 in OutputDevice::ImplDrawTextDirect ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#7  0x40290aef in OutputDevice::ImplDrawText ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#8  0x40291f87 in OutputDevice::DrawText ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#9  0x42d5143f in FontNameBox::UserDraw ()
   from /opt/OpenOffice.org641b/program/libsvt641li.so
#10 0x403123ff in ComboBox::ImplUserDrawHdl ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#11 0x403123c6 in ComboBox::LinkStubImplUserDrawHdl ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#12 0x4032f60f in ImplListBoxWindow::ImplPaint ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#13 0x4032fa87 in ImplListBoxWindow::Paint ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#14 0x402f03b1 in Window::ImplCallPaint ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#15 0x402f8c69 in Window::Update ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#16 0x4032fd95 in ImplListBoxWindow::SetTopEntry ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#17 0x40330a5a in ImplListBox::ScrollBarHdl ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#18 0x40330a12 in ImplListBox::LinkStubScrollBarHdl ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#19 0x4033ad48 in ScrollBar::Scroll ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#20 0x4033a9ce in ScrollBar::Tracking ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#21 0x402ff9a1 in ImplHandleMouseEvent ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#22 0x40301687 in ImplWindowFrameProc ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#23 0x4035090e in SalFrameData::HandleMouseEvent ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#24 0x40352129 in SalFrameData::Dispatch ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#25 0x403720ef in SalDisplay::Dispatch ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#26 0x40371e81 in SalDisplay::Yield ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#27 0x4036dae2 in DisplayYield ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#28 0x4036ca94 in SalXLib::Yield ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#29 0x4037462c in SalInstance::Yield ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#30 0x402230ba in Application::Yield ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#31 0x40223005 in Application::Execute ()
   from /opt/OpenOffice.org641b/program/libvcl641li.so
#32 0x805e0ba in Desktop::Main ()
#33 0x40225809 in SVMain () from /opt/OpenOffice.org641b/program/libvcl641li.so
#34 0x4036b9f3 in main () from /opt/OpenOffice.org641b/program/libvcl641li.so
#35 0x40d66c6f in __libc_start_main () from /lib/libc.so.6
Comment 16 hdu@apache.org 2001-12-18 15:02:11 UTC
I tried to upload a libvcl with debug info but this failed.
I'll try again later. When it gets there please decompress
it with
bzip2 -d libvcl641li.so.bz2
and replace the libvcl641li.so in the program/ directory with it.
Then please redo the crash and the stacktrace.

Comment 17 hdu@apache.org 2001-12-18 15:17:53 UTC
I tried to upload a libvcl with debug info but this failed.
It is too big. Can I sent you the 1.6MB file per email?
Comment 18 Unknown 2001-12-18 15:26:13 UTC
It should work.
Please send it to rui.correia@oracle.com
Comment 19 Unknown 2001-12-18 16:03:50 UTC
I have tried with this new debug shared library : the crash doesn't occur anymore.
But the antialiasing is disabled ("Screen font antialising" is checked in the Options).
On startup soffice now displays many lines like :
-monotype-arial-medium-r-normal--0-0-0-0-p-0-<many character sets>
Comment 20 hdu@apache.org 2001-12-18 17:40:06 UTC
Created attachment 833 [details]
get info about XRENDER on -display :0
Comment 21 hdu@apache.org 2001-12-18 17:41:45 UTC
AA should work as before.
Can you please try the attachment xrinfo.e and send the result?
Comment 22 Unknown 2001-12-19 07:59:44 UTC
Render version 0.1
PFmt[1] t=1, d=8, r=0 0x00, g=0 0x00, b=0 0x00, a=0 0xFF
PFmt[2] t=1, d=24, r=16 0xFF, g=8 0xFF, b=0 0xFF, a=0 0x00
PFmt[3] t=1, d=16, r=11 0x1F, g=5 0x3F, b=0 0x1F, a=0 0x00
PFmt[4] t=1, d=15, r=10 0x1F, g=5 0x1F, b=0 0x1F, a=0 0x00
PFmt[5] t=1, d=16, r=10 0x1F, g=5 0x1F, b=0 0x1F, a=15 0x01
PFmt[6] t=1, d=1, r=0 0x00, g=0 0x00, b=0 0x00, a=0 0x01
Renderinfo done

I have tried this :
. with original shared library : I do see antialiasing, in menus IE.
. I replace with the debug shared lib.
. no more aliasing, even in menus.
I haven't reboot or restart anything in between.
Comment 23 hdu@apache.org 2001-12-19 13:35:14 UTC
> PFmt[1] t=1, d=8, r=0 0x00, g=0 0x00, b=0 0x00, a=0 0xFF

The render extension should be used. I don't understand yet why it
works here but not on your display. Investigating...

By the way, you wrote:
> If I comment out big5, gb2312, etc. and I look for fonts in
> combo box OpenOffice638c crashes

Does this mean, when you remove the comment mark # it crashes?
Comment 24 Unknown 2001-12-19 13:58:41 UTC
>If I comment out big5, gb2312, etc. and I look for fonts in
> combo box OpenOffice638c crashes

This was written by the guy who created this issue.
Not by me ;-)

I will try this afternoon with the genuine Xfree 4.1 ATI modules.
Currently I'm using those from project GATOS (linuxvideo.org).
Comment 25 Unknown 2001-12-19 15:14:40 UTC
I've got the same behavior with the native Xfree86 4.1 ATI drivers.
Comment 26 hdu@apache.org 2001-12-19 18:40:27 UTC
Do you have XINERAMA enabled on the X server? Do
 xdpyinfo | fgrep XINERAMA
to find out

What is the bit depth of the display?
 xdpyinfo | fgrep depth
tells the story.
Comment 27 Unknown 2001-12-20 08:04:00 UTC
> xdpyinfo | fgrep XINERAMA
No, this displays nothing.

> What is the bit depth of the display?
I'm using a 16 bits depth.

I have also tried with a new created user : no aliasing.
Comment 28 hdu@apache.org 2001-12-20 13:37:12 UTC
Moving to GSL bugs
Comment 29 hdu@apache.org 2001-12-20 15:47:49 UTC
I hope you don't mind me sending you another libvcl which
contains the fixes for the probably related issue 2423.
Comment 30 t8m 2001-12-20 16:09:01 UTC
Please send it to me too (tomas.mraz@pvt.cz), thanks.
I'll try to test it tomorrow.
Comment 31 Unknown 2001-12-21 07:13:24 UTC
Yes !
I have tested the new shared library : no crash and the antialiasing 
works fine to.
What is funny is that the fonts shown in the font list are antialiased 
as before.
But the fonts used in the menu are antialiased in much thiner way.
May be there are not antialiased at all. Doesn't matter anyway.

I think you can close this bug as the original problem is fixed.
Thanks for that quick and good job !
Comment 32 hdu@apache.org 2001-12-21 08:57:52 UTC
Great!

Tomas, did that fix your problems too?
Comment 33 t8m 2001-12-21 09:27:26 UTC
The program doesn't hang anymore BUT:

1. The antialiasing is much much worse
2. The bad webdings font appears as empty line in the font selection
combo box
3. It has some BAD sideeffects as for example when I make selection
and change the font family from Times New Roman to Arial then the text
in the selection becomes violet and there appears vertical line to the
left of the text.

Definitely not improvement over the previous version of the library :-(
Comment 34 t8m 2001-12-21 09:33:53 UTC
Oh, sorry for the mistake.
the problem 3. is there with the old library too and it's probably
some MS WORD import error.
So I'm sorry again.
But the worse antialiasing is enough to make it 'don't use' for me.
Comment 35 hdu@apache.org 2001-12-21 09:39:04 UTC
Can you attach a small excerpt of a screen shot showing the
AA problem, preferably in a lossless format like PNG or GIF?
Comment 36 t8m 2001-12-21 10:06:34 UTC
I would like to but it's impossible to make a screenshot of the window:
p38mraz:/home/mraz$ xwd
X Error of failed request:  BadValue (integer parameter out of range
for operation)
  Major opcode of failed request:  91 (X_QueryColors)
  Value in failed request:  0x22007dc
  Serial number of failed request:  865
  Current serial number in output stream:  865
On any other window it's no problem.

I'm completely confused.

I'll try the 24 bpp.

Comment 37 t8m 2001-12-21 10:18:41 UTC
Weird!
If I use the 24bpp display then the antialiasing is just fine as was
with the previous library version and the screenshot is fine too.

I use XFree86 4.0.2 with NVIDIA binary driver.

Here is the xrinfo.e output for the 24bpp display:
Render version 0.1
PFmt[1] t=1, d=8, r=0 0x00, g=0 0x00, b=0 0x00, a=0 0xFF
PFmt[2] t=1, d=24, r=16 0xFF, g=8 0xFF, b=0 0xFF, a=0 0x00
PFmt[3] t=1, d=16, r=11 0x1F, g=5 0x3F, b=0 0x1F, a=0 0x00
PFmt[4] t=1, d=15, r=10 0x1F, g=5 0x1F, b=0 0x1F, a=0 0x00
PFmt[5] t=1, d=16, r=10 0x1F, g=5 0x1F, b=0 0x1F, a=15 0x01
PFmt[6] t=1, d=1, r=0 0x00, g=0 0x00, b=0 0x00, a=0 0x01
Renderinfo done
On the 16bpp display it's the same.
Comment 38 Unknown 2001-12-21 10:21:26 UTC
Created attachment 844 [details]
Screen shot with the new shared library
Comment 39 Unknown 2001-12-21 10:22:01 UTC
Created attachment 845 [details]
Screen shot with the original 641b shared library
Comment 40 Unknown 2001-12-21 10:22:51 UTC
> 1. The antialiasing is much much worse
It's true for the menu and in some other places : ruler, default font 
displayed, size of font.
But the body of the document as well as the fonts displayed on the 
list (other than thondale) appear as do before : well antialiased

>2. The bad webdings font appears as empty line in the font selection
>   combo box
Not for me : with the new shared library : the webdings font appear 
fine in the combo box

I have attached two png files :
. original_so.png : with the original shared library from 641b
. new_so.png : with the new one
Comment 41 hdu@apache.org 2001-12-21 10:35:41 UTC
Rui, were the screenshots done on the 16bit deep display, too?

Tomas, can you try another tool like e.g. gimp to mak the screenshot?
Comment 42 t8m 2001-12-21 11:48:05 UTC
It isn't possible either but it generally looks the same as the Rui's
new_so.png attachment except the webdings font doesn't appear. Strange
is that in 24bpp it appears just fine and the antialiasing is fine
too. But I don't understand why it couldn't look the same as the
original_so.png in 16bpp.
Comment 43 hdu@apache.org 2001-12-21 12:02:13 UTC
It is very strange that a screenshot would be impossible.
Nevertheless since the bug in the title is fixed I suggest
to close this one and maybe open a new issue for bad AA on 16bit.
Comment 44 t8m 2001-12-21 12:19:53 UTC
Ok, created followup issue 2613.
Comment 45 hdu@apache.org 2002-05-16 10:21:07 UTC
closing.