Closed Bug 86368 Opened 23 years ago Closed 23 years ago

nsFontMetricsGTK::PickASizeAndLoad Symbol font disable and MathML-enabled build crashes"

Categories

(Core :: MathML, defect)

Sun
Solaris
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: roland.mainz, Assigned: bstell)

References

()

Details

(Keywords: crash)

Attachments

(5 files)

2001-06-16-08-trunk build with "configure --with-xprint --enable-mathml
--enable-svg --enable-xsl --with-extensions --disable-ldap --enable-optimize
--enable-nspr-autoconf" using Sun Workshop 6 Update 2 EarlyAccess2 crashes on my
Solaris 7 UltraSPARC machine when I try to view a MathML page.

Same sources build with Xlib-toolkit (--enable-toolkit)xlib) work fine and
printing rocks (using Xprint, --with-xprint)...

dbx backtrace from coredump:
-- snip --
detected a multithreaded program
t@1 (l@1) terminated by signal BUS (invalid address alignment)
Current function is nsFontMetricsGTK::PickASizeAndLoad
 2365       if (FONT_HAS_GLYPH(font->mMap, aChar)) {
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: t@1
=>[1] nsFontMetricsGTK::PickASizeAndLoad(this = 0x724060, aStretch = 0x9d9d10,
aCharSet = 0xfd3f7c10, aChar = 770U, aName = 0x9da420
"adobe-symbol-adobe-fontspecific"), line 2365 in "nsFontMetricsGTK.cpp"
  [2] nsFontMetricsGTK::SearchNode(this = 0x724060, aNode = 0x9da408, aChar =
770U), line 2716 in "nsFontMetricsGTK.cpp"
  [3] nsFontMetricsGTK::FindAnyFont(this = 0x724060, aChar = 770U), line 3480 in
"nsFontMetricsGTK.cpp"
  [4] nsFontMetricsGTK::FindFont(this = 0x724060, aChar = 770U), line 3682 in
"nsFontMetricsGTK.cpp"
  [5] nsRenderingContextGTK::GetWidth(this = 0xa79db8, aString = 0xffbea284,
aLength = 1U, aWidth = -14290324, aFontID = (nil)), line 1316 in
"nsRenderingContextGTK.cpp"
  [6] nsTextFrame::MeasureText(this = ???, aPresContext = ???, aReflowState =
STRUCT, aTx = CLASS, aLb = ???, aTs = STRUCT, aTextData = STRUCT) (optimized),
at 0xfc1b5f64 (line ~4566) in "nsTextFrame.cpp"
  [7] nsTextFrame::Reflow(this = ???, aPresContext = ???, aMetrics = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc1b69bc (line ~5048) in
"nsTextFrame.cpp"
  [8] nsContainerFrame::ReflowChild(this = ???, aKidFrame = ???, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aX = ???, aY = ???, aFlags =
???, aStatus = ???) (optimized), at 0xfc12c538 (line ~723) in
"nsContainerFrame.cpp"
  [9] nsMathMLContainerFrame::ReflowChild(this = ???, aKidFrame = ???,
aPresContext = ???, aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???)
(optimized), at 0xfc37e874 (line ~190) in "nsMathMLContainerFrame.h"
  [10] nsMathMLContainerFrame::ReflowTokenFor(aFrame = ???, aPresContext = ???,
aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at
0xfc37d33c (line ~1122) in "nsMathMLContainerFrame.cpp"
  [11] nsMathMLmoFrame::Reflow(this = ???, aPresContext = ???, aDesiredSize =
STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc393d30 (line
~805) in "nsMathMLmoFrame.cpp"
  [12] nsContainerFrame::ReflowChild(this = ???, aKidFrame = ???, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aX = ???, aY = ???, aFlags =
???, aStatus = ???) (optimized), at 0xfc12c538 (line ~723) in
"nsContainerFrame.cpp"
  [13] nsMathMLContainerFrame::ReflowChild(this = ???, aKidFrame = ???,
aPresContext = ???, aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???)
(optimized), at 0xfc37e874 (line ~190) in "nsMathMLContainerFrame.h"
  [14] nsMathMLContainerFrame::Reflow(this = ???, aPresContext = ???,
aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at
0xfc37d754 (line ~1278) in "nsMathMLContainerFrame.cpp"
  [15] nsContainerFrame::ReflowChild(this = ???, aKidFrame = ???, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aX = ???, aY = ???, aFlags =
???, aStatus = ???) (optimized), at 0xfc12c538 (line ~723) in
"nsContainerFrame.cpp"
  [16] nsMathMLContainerFrame::ReflowChild(this = ???, aKidFrame = ???,
aPresContext = ???, aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???)
(optimized), at 0xfc37e874 (line ~190) in "nsMathMLContainerFrame.h"
  [17] nsMathMLContainerFrame::Reflow(this = ???, aPresContext = ???,
aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at
0xfc37d754 (line ~1278) in "nsMathMLContainerFrame.cpp"
  [18] nsLineLayout::ReflowFrame(this = ???, aFrame = ???, aNextRCFrame = ???,
aReflowStatus = ???, aMetrics = ???, aPushedFrame = ???) (optimized), at
0xfc16ed38 (line ~955) in "nsLineLayout.cpp"
  [19] nsInlineFrame::ReflowInlineFrame(this = ???, aPresContext = ???,
aReflowState = STRUCT, irs = STRUCT, aFrame = ???, aStatus = ???) (optimized),
at 0xfc1682b4 (line ~612) in "nsInlineFrame.cpp"
  [20] nsInlineFrame::ReflowFrames(this = ???, aPresContext = ???, aReflowState
= STRUCT, irs = STRUCT, aMetrics = STRUCT, aStatus = ???) (optimized), at
0xfc167dcc (line ~427) in "nsInlineFrame.cpp"
  [21] nsInlineFrame::Reflow(this = ???, aPresContext = ???, aMetrics = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc167b8c (line ~338) in
"nsInlineFrame.cpp"
  [22] nsLineLayout::ReflowFrame(this = ???, aFrame = ???, aNextRCFrame = ???,
aReflowStatus = ???, aMetrics = ???, aPushedFrame = ???) (optimized), at
0xfc16ed38 (line ~955) in "nsLineLayout.cpp"
  [23] nsBlockFrame::ReflowInlineFrame(this = ???, aState = CLASS, aLineLayout =
CLASS, aLine = ???, aFrame = ???, aLineReflowStatus = ???) (optimized), at
0xfc11b634 (line ~3611) in "nsBlockFrame.cpp"
  [24] nsBlockFrame::DoReflowInlineFrames(this = ???, aState = CLASS,
aLineLayout = CLASS, aLine = ???, aKeepReflowGoing = ???, aLineReflowStatus =
???, aUpdateMaximumWidth = ???, aDamageDirtyArea = ???) (optimized), at
0xfc11b384 (line ~3421) in "nsBlockFrame.cpp"
  [25] nsBlockFrame::DoReflowInlineFramesAuto(this = ???, aState = CLASS, aLine
= ???, aKeepReflowGoing = ???, aLineReflowStatus = ???, aUpdateMaximumWidth =
???, aDamageDirtyArea = ???) (optimized), at 0xfc11b178 (line ~3271) in
"nsBlockFrame.cpp"
  [26] nsBlockFrame::ReflowInlineFrames(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???, aDamageDirtyArea = ???, aUpdateMaximumWidth = ???)
(optimized), at 0xfc11afd8 (line ~3228) in "nsBlockFrame.cpp"
  [27] nsBlockFrame::ReflowLine(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???, aDamageDirtyArea = ???) (optimized), at 0xfc119970 (line
~2380) in "nsBlockFrame.cpp"
  [28] nsBlockFrame::ReflowDirtyLines(this = ???, aState = CLASS) (optimized),
at 0xfc119004 (line ~2174) in "nsBlockFrame.cpp"
  [29] nsBlockFrame::Reflow(this = ???, aPresContext = ???, aMetrics = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc116d70 (line ~1031) in
"nsBlockFrame.cpp"
  [30] nsBlockReflowContext::DoReflowBlock(this = ???, aReflowState = STRUCT,
aReason = ???, aFrame = ???, aSpace = STRUCT, aApplyTopMargin = ???,
aPrevBottomMargin = ???, aIsAdjacentWithTop = ???, aComputedOffsets = STRUCT,
aFrameReflowStatus = ???) (optimized), at 0xfc124414 (line ~571) in
"nsBlockReflowContext.cpp"
  [31] nsBlockReflowContext::ReflowBlock(this = ???, aFrame = ???, aSpace =
STRUCT, aApplyTopMargin = ???, aPrevBottomMargin = ???, aIsAdjacentWithTop =
???, aComputedOffsets = STRUCT, aFrameReflowStatus = ???) (optimized), at
0xfc123eb4 (line ~336) in "nsBlockReflowContext.cpp"
  [32] nsBlockFrame::ReflowBlockFrame(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???) (optimized), at 0xfc11a9ac (line ~3181) in
"nsBlockFrame.cpp"
  [33] nsBlockFrame::ReflowLine(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???, aDamageDirtyArea = ???) (optimized), at 0xfc1195c0 (line
~2380) in "nsBlockFrame.cpp"
  [34] nsBlockFrame::ReflowDirtyLines(this = ???, aState = CLASS) (optimized),
at 0xfc119004 (line ~2174) in "nsBlockFrame.cpp"
  [35] nsBlockFrame::Reflow(this = ???, aPresContext = ???, aMetrics = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc116d70 (line ~1031) in
"nsBlockFrame.cpp"
  [36] nsBlockReflowContext::DoReflowBlock(this = ???, aReflowState = STRUCT,
aReason = ???, aFrame = ???, aSpace = STRUCT, aApplyTopMargin = ???,
aPrevBottomMargin = ???, aIsAdjacentWithTop = ???, aComputedOffsets = STRUCT,
aFrameReflowStatus = ???) (optimized), at 0xfc124414 (line ~571) in
"nsBlockReflowContext.cpp"
  [37] nsBlockReflowContext::ReflowBlock(this = ???, aFrame = ???, aSpace =
STRUCT, aApplyTopMargin = ???, aPrevBottomMargin = ???, aIsAdjacentWithTop =
???, aComputedOffsets = STRUCT, aFrameReflowStatus = ???) (optimized), at
0xfc123eb4 (line ~336) in "nsBlockReflowContext.cpp"
  [38] nsBlockFrame::ReflowBlockFrame(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???) (optimized), at 0xfc11a9ac (line ~3181) in
"nsBlockFrame.cpp"
  [39] nsBlockFrame::ReflowLine(this = ???, aState = CLASS, aLine = ???,
aKeepReflowGoing = ???, aDamageDirtyArea = ???) (optimized), at 0xfc1195c0 (line
~2380) in "nsBlockFrame.cpp"
  [40] nsBlockFrame::ReflowDirtyLines(this = ???, aState = CLASS) (optimized),
at 0xfc119004 (line ~2174) in "nsBlockFrame.cpp"
  [41] nsBlockFrame::Reflow(this = ???, aPresContext = ???, aMetrics = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc116d70 (line ~1031) in
"nsBlockFrame.cpp"
  [42] nsContainerFrame::ReflowChild(this = ???, aKidFrame = ???, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aX = ???, aY = ???, aFlags =
???, aStatus = ???) (optimized), at 0xfc12c538 (line ~723) in
"nsContainerFrame.cpp"
  [43] CanvasFrame::Reflow(this = ???, aPresContext = ???, aDesiredSize =
STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc14e264 (line
~569) in "nsHTMLFrame.cpp"
  [44] nsBoxToBlockAdaptor::Reflow(this = ???, aState = CLASS, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aStatus = ???, aX = ???, aY =
???, aWidth = ???, aHeight = ???, aMoveFrame = ???) (optimized), at 0xfc2cc0a0
(line ~864) in "nsBoxToBlockAdaptor.cpp"
  [45] nsBoxToBlockAdaptor::DoLayout(this = ???, aState = CLASS) (optimized), at
0xfc2cb990 (line ~515) in "nsBoxToBlockAdaptor.cpp"
  [46] nsBox::Layout(this = ???, aState = CLASS) (optimized), at 0xfc2c6940
(line ~983) in "nsBox.cpp"
  [47] nsScrollBoxFrame::DoLayout(this = ???, aState = CLASS) (optimized), at
0xfc297a50 (line ~377) in "nsScrollBoxFrame.cpp"
  [48] nsBox::Layout(this = ???, aState = CLASS) (optimized), at 0xfc2c6940
(line ~983) in "nsBox.cpp"
  [49] nsContainerBox::LayoutChildAt(aState = CLASS, aBox = ???, aRect = STRUCT)
(optimized), at 0xfc2d0114 (line ~591) in "nsContainerBox.cpp"
  [50] nsGfxScrollFrameInner::LayoutBox(this = ???, aState = CLASS, aBox = ???,
aRect = STRUCT) (optimized), at 0xfc1c311c (line ~1038) in
"nsGfxScrollFrame.cpp"
  [51] nsGfxScrollFrameInner::Layout(this = ???, aState = CLASS) (optimized), at
0xfc1c338c (line ~1142) in "nsGfxScrollFrame.cpp"
  [52] nsGfxScrollFrame::DoLayout(this = ???, aState = CLASS) (optimized), at
0xfc1c3150 (line ~1046) in "nsGfxScrollFrame.cpp"
  [53] nsBox::Layout(this = ???, aState = CLASS) (optimized), at 0xfc2c6940
(line ~983) in "nsBox.cpp"
  [54] nsBoxFrame::Reflow(this = ???, aPresContext = ???, aDesiredSize = STRUCT,
aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc2e6614 (line ~778) in
"nsBoxFrame.cpp"
  [55] nsGfxScrollFrame::Reflow(this = ???, aPresContext = ???, aDesiredSize =
STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc1c24ec (line
~735) in "nsGfxScrollFrame.cpp"
  [56] nsContainerFrame::ReflowChild(this = ???, aKidFrame = ???, aPresContext =
???, aDesiredSize = STRUCT, aReflowState = STRUCT, aX = ???, aY = ???, aFlags =
???, aStatus = ???) (optimized), at 0xfc12c538 (line ~723) in
"nsContainerFrame.cpp"
  [57] ViewportFrame::Reflow(this = ???, aPresContext = ???, aDesiredSize =
STRUCT, aReflowState = STRUCT, aStatus = ???) (optimized), at 0xfc1c04a4 (line
~536) in "nsViewportFrame.cpp"
  [58] PresShell::InitialReflow(this = ???, aWidth = ???, aHeight = ???)
(optimized), at 0xfc18ba20 (line ~2664) in "nsPresShell.cpp"
  [59] nsXMLContentSink::StartLayout(this = ???) (optimized), at 0xfcb26348
(line ~1597) in "nsXMLContentSink.cpp"
  [60] nsXMLContentSink::DidBuildModel(this = ???, aQualityLevel = ???)
(optimized), at 0xfcb21a94 (line ~297) in "nsXMLContentSink.cpp"
  [61] CWellFormedDTD::DidBuildModel(this = ???, anErrorCode = ???, aNotifySink
= ???, aParser = ???, aSink = ???) (optimized), at 0xfd4ec3f0 (line ~296) in
"nsWellFormedDTD.cpp"
  [62] nsParser::DidBuildModel(this = ???, anErrorCode = ???) (optimized), at
0xfd4e0b24 (line ~1445) in "nsParser.cpp"
  [63] nsParser::ResumeParse(this = ???, allowIteration = ???, aIsFinalChunk =
???) (optimized), at 0xfd4e169c (line ~1958) in "nsParser.cpp"
  [64] nsParser::OnStopRequest(this = ???, request = ???, aContext = ???, status
= ???) (optimized), at 0xfd4e23b0 (line ~2383) in "nsParser.cpp"
  [65] nsDocumentOpenInfo::OnStopRequest(this = ???, request = ???, aCtxt = ???,
aStatus = ???) (optimized), at 0xfd56bd94 (line ~252) in "nsURILoader.cpp"
  [66] nsStreamListenerTee::OnStopRequest(this = ???, request = ???, context =
???, status = ???) (optimized), at 0xfd792460 (line ~24) in
"nsStreamListenerTee.cpp"
  [67] nsHttpChannel::OnStopRequest(this = ???, request = ???, ctxt = ???,
status = ???) (optimized), at 0xfd7d8458 (line ~2100) in "nsHttpChannel.cpp"
  [68] nsOnStopRequestEvent::HandleEvent(this = ???) (optimized), at 0xfd76aa88
(line ~161) in "nsRequestObserverProxy.cpp"
  [69] nsARequestObserverEvent::HandlePLEvent(plev = ???) (optimized), at
0xfd76921c (line ~63) in "nsRequestObserverProxy.cpp"
  [70] PL_HandleEvent(self = ???) (optimized), at 0xff243880 (line ~590) in
"plevent.c"
  [71] PL_ProcessPendingEvents(self = ???) (optimized), at 0xff2436c8 (line
~520) in "plevent.c"
  [72] nsEventQueueImpl::ProcessPendingEvents(this = ???) (optimized), at
0xff2459c0 (line ~374) in "nsEventQueue.cpp"
  [73] event_processor_callback(data = ???, source = ???, condition = ???)
(optimized), at 0xfda264f0 (line ~168) in "nsAppShell.cpp"
  [74] our_gdk_io_invoke(source = ???, condition = ???, data = ???) (optimized),
at 0xfda2607c (line ~60) in "nsAppShell.cpp"
dbx: warning: can't find file
"/home/gisburn/package-builds/glib/glib-1.2.8/objdir/giounix.lo"
dbx: warning: see `help finding-files'
  [75] g_io_unix_dispatch(0x23ad58, 0xffbef058, 0x23a150, 0x0, 0x0, 0xffbeefc0),
at 0xfea32dc8
dbx: warning: can't find file
"/home/gisburn/package-builds/glib/glib-1.2.8/objdir/gmain.lo"
  [76] g_main_dispatch(0xffbef058, 0x11e130, 0x1, 0x23a150, 0xff3df650, 0x378),
at 0xfea36dc8
  [77] g_main_iterate(0x1, 0x1, 0xfe531f28, 0xfda26b48, 0xff3df650, 0x19), at
0xfea37bcc
  [78] g_main_run(0x23a198, 0x23a198, 0xff245c44, 0x5, 0xf2d20, 0x0), at
0xfea37f64
dbx: warning: can't find file
"/home/gisburn/package-builds/gtk+/gtk+-1.2.8/objdir/gtk/gtkmain.lo"
  [79] gtk_main(0xf2d20, 0xff248198, 0x0, 0x80004000, 0x0, 0xfda9cc50), at
0xfed560a0
  [80] nsAppShell::Run(this = ???) (optimized), at 0xfda26b48 (line ~365) in
"nsAppShell.cpp"
  [81] nsAppShellService::Run(this = ???) (optimized), at 0xfe487298 (line ~417)
in "nsAppShellService.cpp"
  [82] main1(argc = ???, argv = ???, nativeApp = ???) (optimized), at 0x177cc
(line ~1149) in "nsAppRunner.cpp"
  [83] main(argc = ???, argv = ???) (optimized), at 0x18204 (line ~1449) in
"nsAppRunner.cpp"
-- snip --

console output:
-- snip --
Enabling Quirk StyleSheet
Note: verifyreflow is disabled
Note: styleverifytree is disabled
Note: frameverifytree is disabled
Disabling Quirk StyleSheet
Start reading in bookmarks.html
Finished reading in bookmarks.html  (33127 microseconds)
WEBSHELL+ = 3
Enabling Quirk StyleSheet
Enabling Quirk StyleSheet
Opening file cookperm.txt failed
blank
Document http://www.mozilla.org/ loaded successfully
WEBSHELL+ = 4
Disabling Quirk StyleSheet
Enabling Quirk StyleSheet
/
Document http://www.mozilla.org/projects/mathml/ loaded successfully
Loading resource:/res/fonts/mathfontSymbol.properties ... Done
Bus Error - core dumped
-- snip --
Summary: MathML-enabled build crashes in nsFontMetricsGTK::PickASizeAndLoad(this → MathML-enabled build crashes in nsFontMetricsGTK::PickASizeAndLoad()
Strange that it works on one platform and not the other. Did you try to disable 
'--enable-optimize' just to see what happens?
rbs:
I removed the "-O" option from config/autoconf.mk and cleaned/rebuild the whole
mozilla/gfx/src/ dir.

I am pretty sure that this is not a compiler bug... Sun Workshop 6 Update 2 EA
is _very_ good. The h*ll knows why Sun calls this release "EarlyAccess"... :-))

BTW: gcc implements a "hack" to force the SPARC-mandatory address alignment for
data, Sun Workshop does not implemenent such a hack (because this hack eats a
_large_ amount of CPU time in some cases).

But I don't think that this is the cause of the problem. Xlib-toolkit simply
uses a completely different code (mozilla/gfx/src/xlib/) than GTK+-toolkit
(mozilla/gfx/src/gtk/)...
what is the value of font->mMap at the crash ?
-- snip --
Opening file cookperm.txt failed
blank
Document http://www.mozilla.org/ loaded successfully
WEBSHELL+ = 4
Disabling Quirk StyleSheet
Loading resource:/res/fonts/mathfontSymbol.properties ... Done
t@1 (l@1) signal BUS (invalid address alignment) in
nsFontMetricsGTK::PickASizeAndLoad at line 2365 in file "nsFontMetricsGTK.cpp"
 2365       if (FONT_HAS_GLYPH(font->mMap, aChar)) {
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print font->mMap 
font->mMap = 0xfd3e4b13
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print font      
font = 0x97ba58
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print aChar
aChar = 770U
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print this
this = 0xa43408
-- snip --
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.3
re-assigning to bstell as this may probably be caused be some recent changes
that were not reflected in the MathML code.
Assignee: rbs → bstell
Status: ASSIGNED → NEW
I'll rebuild with --enable-mathml and take a look
Status: NEW → ASSIGNED
For the font scaling info I need the nsFontCharSetMap* instead of the
nsFontCharSetMap.mInfo.

I missed changin this spot when I checked in the patch for bug 74889.
Whiteboard: need r=, sr=, a=
For the font scaling info I need the nsFontCharSetMap* instead of the
nsFontCharSetMap.mInfo*.

I missed changing this spot when I checked in the patch for bug 74889.
Works for me (except that I am missing MathML fonts, but that's another issue.
At least GTK+-toolkit now produces the same output as Xlib-toolkit... :-)

r=roland.mainz@informatik.med.uni-giessen.de

----

pocemit:
Wanna pull-over patch in bug 74889 and this "add-on" to Xlib-toolkit, please ?
Whiteboard: need r=, sr=, a= → need sr=, a=
this crash only happens if you have mathml fonts.

see: http://www.mozilla.org/projects/mathml/fonts/

(http://support.wolfram.com/Systems/Unix/FE/Fonts/Type1.html)
(http://www.ibiblio.org/Linux/HOWTO/Font-HOWTO-4.html#ss4.2)
(Redhat users can just use chkfontpath. the format is chkfontpath --add 
directory)
I am on Solaris, and yes... I have the wolfram fonts in my fontpath:
% xset q | fgrep "fonts/misc"
-- snip --
/usr/openwin/lib/X11/fonts/F3/,/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/,/usr/openwin/lib/X11/fonts/TrueType,/opt/SUNWdtpcv/fonts,/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/,/usr/openwin/lib/locale/sun_eu_greek/X11/fonts/TrueType/,/usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_8/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/,/usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/,/usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType/,/usr/openwin/lib/locale/iso_8859_13/X11/fonts/Type1/,/usr/openwin/lib/locale/ar/X11/fonts/TrueType/,/usr/openwin/lib/locale/KOI8-R/X11/fonts/TrueType/,/usr/j2se/jre/lib/fonts/,/home/gisburn/mathml_fonts/wolfram,/home/gisburn/mathml_fonts/tex/cmpsfont/pfb
-- snip --

But the output still looks weired. That's discussed in bug 87285 ("MathML
"torture test" looks weired in Xlib-toolkit and Xprint")...
this will also crash for symbol fonts

see http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#516

518 static nsFontCharSetMap gSpecialCharSetMap[] =
519 {
520   { "symbol-adobe-fontspecific", &FLG_NONE, &AdobeSymbol  },
521 
522 #ifdef MOZ_MATHML
523   { "cmex10-adobe-fontspecific", &FLG_NONE, &CMCMEX  },
524   { "cmsy10-adobe-fontspecific", &FLG_NONE, &CMCMSY  },
Summary: MathML-enabled build crashes in nsFontMetricsGTK::PickASizeAndLoad() → crash when using symbol or MathML fonts
Brian Stell:
Wanna post a screenshot (viewing
http://www.mozilla.org/projects/mathml/demo/texvsmml.xml - the middle part
(10/11/12/13/14/15/16) of the table is the interesting one...) of your build,
please ? I'd like to compare your and my box...
Summary: crash when using symbol or MathML fonts → MathML-enabled build crashes in nsFontMetricsGTK::PickASizeAndLoad()
It looks like symbol font is busted by the same bug. See my new attachement. 
Viewing without the patch will show a question mark. view with the patch will 
show a hebrew alef.  There are other symbol glyph missing without this fix. Some 
of the symble glyph could be displayed by CJK font thought. (for example 
α)
Attached image mathml image
Without the patch http://bugzilla.mozilla.org/showattachment.cgi?attach_id=40219
causes moz to crash.
Brian, thanks for the image.
Seems my problem was to get rid of all other crap extra fonts from my
/home/gisburn/mathml_fonts dir, pull the Wolfram fonts again and _only_ add
those one - no other fonts... :-)
*** Bug 87076 has been marked as a duplicate of this bug. ***
I want to point out this bug is not ONLY affect mathml. The same bug also impact 
non MathML build while loading a Symbol. The behavior is random, could crash or 
make symbol font disable. use the 2nd attachement to verify that. 
Change the subject from "MathML-enabled build crashes in 
nsFontMetricsGTK::PickASizeAndLoad()" to 
"nsFontMetricsGTK::PickASizeAndLoad cause Symbol font disable and MathML-enabled 
build crashes"
Keywords: crash
Summary: MathML-enabled build crashes in nsFontMetricsGTK::PickASizeAndLoad() → nsFontMetricsGTK::PickASizeAndLoad Symbol font disable and MathML-enabled build crashes"
Since this can crash non-MathML browsers too, and we since have a fix in hand,
can I make a desparate plea to get this into 0.9.2?

Thanks
Use NS_STATIC_CAST() and you will have an sr=blizzard.
Whiteboard: need sr=, a= → r=rolan, sr=blizzard, need a=
s/rolan/roland/ or use my nickname if you like it short... :-)
Whiteboard: r=rolan, sr=blizzard, need a= → r=gisburn, sr=blizzard, need a=
we should land this into trunk. I think we should also check in to branch. 
Keywords: nsBranch
check into trunk now.
mark fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
This also cause a crash on HP build- see bug 90758
there is a bug in the patch:

3718       if (western_font) {
3719         NS_ASSERTION(western_font->SupportsChar(aChar), "font supposed to 
support this char");
3720         return font;
3721       }

this should return western_font not font
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Target Milestone: mozilla0.9.3 → ---
Filed patch for GTK+-port and Xlib-port.

Requesting r=/sr= and a= ...
Whiteboard: r=gisburn, sr=blizzard, need a=
sr=blizzard
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: