Closed
Bug 616426
Opened 15 years ago
Closed 14 years ago
crash [@ nsThebesFontMetrics::GetMetrics ] because we hard code our font search path to /system/fonts instead of $ANDROID_ROOT/fonts
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0+ | --- |
People
(Reporter: scoobidiver, Assigned: azakai)
References
Details
(Keywords: crash)
Crash Data
Attachments
(2 files, 4 obsolete files)
3.73 KB,
patch
|
blassey
:
review+
pavlov
:
review+
|
Details | Diff | Splinter Review |
2.51 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
It is #12 top crasher in Fennec 4.0b3pre for the last week.
It happens at startup (uptime=0).
Signature nsThebesFontMetrics::GetMetrics
UUID 42aa125a-f07f-4d37-a53f-351352101201
Time 2010-12-01 17:51:22.830736
Uptime 0
Install Age 19586 seconds (5.4 hours) since version was first installed.
Product Fennec
Version 4.0b3pre
Build ID 20101201041953
Branch 2.0
OS Linux
OS Version 0.0.0 Linux 2.6.35.9-wildmonks #315 PREEMPT Fri Nov 26 16:47:39 PST 2010 armv7l
CPU arm
CPU Info
Crash Reason SIGSEGV
Crash Address 0xffffffff
Frame Module Signature [Expand] Source
0 libxul.so nsThebesFontMetrics::GetMetrics gfx/src/thebes/nsThebesFontMetrics.cpp:112
1 libxul.so nsThebesFontMetrics::GetExternalLeading gfx/src/thebes/nsThebesFontMetrics.cpp:190
2 libxul.so nsHTMLReflowState::CalcLineHeight layout/generic/nsHTMLReflowState.cpp:2100
3 libxul.so nsHTMLReflowState::CalcLineHeight layout/generic/nsHTMLReflowState.cpp:2160
4 libxul.so nsBlockReflowState::nsBlockReflowState layout/generic/nsBlockReflowState.cpp:146
5 libxul.so nsBlockFrame::Reflow layout/generic/nsIFrame.h:1267
6 libxul.so nsContainerFrame::ReflowChild layout/generic/nsContainerFrame.cpp:743
7 libxul.so nsCanvasFrame::Reflow layout/generic/nsCanvasFrame.cpp:498
8 libxul.so nsContainerFrame::ReflowChild layout/generic/nsContainerFrame.cpp:743
9 libxul.so nsHTMLScrollFrame::ReflowScrolledFrame layout/generic/nsGfxScrollFrame.cpp:518
10 libxul.so nsHTMLScrollFrame::ReflowContents layout/generic/nsGfxScrollFrame.cpp:609
11 libxul.so nsHTMLScrollFrame::Reflow layout/generic/nsGfxScrollFrame.cpp:817
12 libxul.so nsContainerFrame::ReflowChild layout/generic/nsContainerFrame.cpp:743
13 libxul.so ViewportFrame::Reflow layout/generic/nsViewportFrame.cpp:294
14 libxul.so PresShell::DoReflow layout/base/nsPresShell.cpp:7787
15 libxul.so PresShell::ProcessReflowCommands layout/base/nsPresShell.cpp:7891
16 libxul.so PresShell::FlushPendingNotifications layout/base/nsPresShell.cpp:4884
17 libxul.so nsDocument::FlushPendingNotifications nsCOMPtr.h:492
18 libxul.so nsDocument::FlushPendingNotifications nsIDocument.h:463
19 libxul.so nsDocLoader::DocLoaderIsEmpty uriloader/base/nsDocLoader.cpp:773
20 libxul.so nsDocLoader::OnStopRequest uriloader/base/nsDocLoader.cpp:706
21 libxul.so nsLoadGroup::RemoveRequest netwerk/base/src/nsLoadGroup.cpp:680
22 libxul.so nsDocument::DoUnblockOnload nsCOMPtr.h:492
23 libxul.so nsDocument::UnblockOnload content/base/src/nsDocument.cpp:7201
24 libxul.so nsBindingManager::DoProcessAttachedQueue nsCOMPtr.h:492
25 libxul.so nsRunnableMethodImpl<void , true>::Run nsThreadUtils.h:347
26 libxul.so nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:626
27 libxul.so NS_ProcessNextEvent_P nsThreadUtils.cpp:250
28 libxul.so mozilla::ipc::MessagePump::Run ipc/glue/MessagePump.cpp:111
29 libxul.so mozilla::ipc::MessagePumpForChildProcess::Run ipc/glue/MessagePump.cpp:230
30 libxul.so MessageLoop::RunInternal ipc/chromium/src/base/message_loop.cc:220
31 libxul.so MessageLoop::Run ipc/chromium/src/base/message_loop.cc:512
32 libxul.so nsBaseAppShell::Run widget/src/xpwidgets/nsBaseAppShell.cpp:198
33 libxul.so XRE_RunAppShell toolkit/xre/nsEmbedFunctions.cpp:631
34 libxul.so mozilla::ipc::MessagePumpForChildProcess::Run ipc/glue/MessagePump.cpp:222
35 libxul.so MessageLoop::RunInternal ipc/chromium/src/base/message_loop.cc:220
36 libxul.so MessageLoop::Run ipc/chromium/src/base/message_loop.cc:512
37 libxul.so XRE_InitChildProcess toolkit/xre/nsEmbedFunctions.cpp:510
38 libmozutils.so ChildProcessInit other-licenses/android/APKOpen.cpp:691
39 plugin-container main ipc/app/MozillaRuntimeMainAndroid.cpp:69
40 libc.so libc.so@0xd60a
More reports at:
http://crash-stats.mozilla.com/report/list?range_value=4&range_unit=weeks&signature=nsThebesFontMetrics%3A%3AGetMetrics&version=Fennec%3A4.0b3pre
Updated•15 years ago
|
tracking-fennec: --- → ?
Comment 2•15 years ago
|
||
How are we determining that this is a startup crash?
Comment 3•15 years ago
|
||
Not a startup crash; content processes don't report uptime currently.
Updated•15 years ago
|
Summary: startup crash [@ nsThebesFontMetrics::GetMetrics ] → crash [@ nsThebesFontMetrics::GetMetrics ]
Reporter | ||
Comment 4•15 years ago
|
||
It is #9 top crasher in Fennec 4.0b3 for the last week.
Keywords: topcrash
Reporter | ||
Comment 5•15 years ago
|
||
It is #3 top crasher and #1 unresolved top crasher in Fennec 4.0b3 over the last week.
Reporter | ||
Comment 6•14 years ago
|
||
It is #1 top crasher in 4.0b5 (see bug 636430 comment 4).
tracking-fennec: 2.0- → ?
Updated•14 years ago
|
Assignee: nobody → doug.turner
Comment 7•14 years ago
|
||
this rang some bells, so I went searching through my bugmail. The original implementation of the freetype backend for WinMo hit this, as you can see in bug 462908 comment 15. In that bug stuart said we shouldn't ever return null here so we shouldn't need a null check.
Assignee: doug.turner → nobody
Updated•14 years ago
|
tracking-fennec: ? → 2.0+
Updated•14 years ago
|
Assignee: nobody → blassey.bugs
Comment 8•14 years ago
|
||
Could some systems have no fonts of the type searched?
Or have the fonts in a different location, perhaps.
Comment 9•14 years ago
|
||
my current working theory is that some devices don't have Droid Sans
Comment 10•14 years ago
|
||
bug 633109 implies there are some fonts we're not finding
Comment 11•14 years ago
|
||
looking through the android font code, this implies to me that "Droid Sans" will always be there:
https://www.google.com/codesearch/p?hl=en#nScvmqlsOdU/Development/Depends/skia/src/ports/SkFontHost_android.cpp&q=FileTypeface&d=5&l=409
however, if ANDROID_ROOT isn't "/system" we may be looking in the wrong place for it:
https://www.google.com/codesearch/p?hl=en#nScvmqlsOdU/Development/Depends/skia/src/ports/SkFontHost_android.cpp&q=FileTypeface&d=5&l=36
Assignee | ||
Comment 12•14 years ago
|
||
As mentioned in bug 633109 comment 2, at least on my galaxy s ANDROID_ROOT is /system, as expected. But perhaps elsewhere it isn't. Would be easy to check both /system and ANDROID_ROOT I guess.
Assignee | ||
Updated•14 years ago
|
Assignee: blassey.bugs → azakai
Assignee | ||
Comment 13•14 years ago
|
||
Patch to look in $ANDROID_ROOT, if it differs from /system.
Attachment #518470 -
Flags: review?(blassey.bugs)
Assignee | ||
Comment 14•14 years ago
|
||
For convenience here is a version of that patch without whitespace (the patch adds indentation so more looks changed that actually is).
Updated•14 years ago
|
Attachment #518470 -
Flags: review?(blassey.bugs) → review+
Assignee | ||
Comment 15•14 years ago
|
||
Attachment #518470 -
Attachment is obsolete: true
Attachment #518472 -
Attachment is obsolete: true
Attachment #518508 -
Flags: review?(pavlov)
Attachment #518508 -
Flags: review?(blassey.bugs)
Updated•14 years ago
|
Attachment #518508 -
Flags: review?(blassey.bugs) → review+
Updated•14 years ago
|
Attachment #518508 -
Flags: review?(pavlov) → review+
Assignee | ||
Comment 16•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 17•14 years ago
|
||
I think it might make sense to annotate the crashdump if there's a situation where zero fonts are found. Seems like we're guessing at the root cause here. If the root cause really was no fonts in the directory it would be pretty easy to figure that out. Other scenarios are possible here, all the fonts failed to load, none of the files had extensions '.ttf', yadda, yadda.
I would suggest tracking the data below. If the total fonts loaded is 0, then annotate the crashdump with that info:
- whether the $root/system dir was found
- how many files were found
- how many .ttf files were found
- how many fonts failed to load
This way, if the crash still does occur at least we'll have a better idea as to which scenario is causing the crash. Kinda sucky that manufacturers can hack the Skia code to load fonts from random places.
Assignee | ||
Comment 18•14 years ago
|
||
Logging that data sounds good to me.
Would we want this for 4.0?
Comment 19•14 years ago
|
||
I am seeing this crash in the content process in todays nightly build (from m-c 3570861040e9) when loading this URL on Samsusng Galaxy Tab (100% reproducible):
https://support.mozilla.com/en-US/questions?tagged=mobile
Crash report:
https://crash-stats.mozilla.com/report/index/bp-00defcb3-4a26-4dac-a5a2-5d5972110311
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Updated•14 years ago
|
Keywords: reproducible
Reporter | ||
Updated•14 years ago
|
Comment 20•14 years ago
|
||
Alon's patch has us looking /system rather than /system/fonts, which means we're not finding any fonts.
Attachment #518782 -
Flags: review?(pavlov)
Comment 21•14 years ago
|
||
this adds the closedir() as jdn suggested on irc
Attachment #518782 -
Attachment is obsolete: true
Attachment #518785 -
Flags: review?(pavlov)
Attachment #518782 -
Flags: review?(pavlov)
Assignee | ||
Comment 22•14 years ago
|
||
Good catch!
Comment 23•14 years ago
|
||
Comment on attachment 518785 [details] [diff] [review]
follow up patch
Looks sane to me, go for it!
Though actually, the name "FindFontsInDirectory" is a bit confusing, as it's not actually the fonts dir that's being passed in... maybe the method should really be called "FindFontFilesInFontsSubdirOfDirectory". Awfully verbose, though.
Attachment #518785 -
Flags: review?(pavlov) → review+
Comment 24•14 years ago
|
||
Attachment #518785 -
Attachment is obsolete: true
Attachment #518808 -
Flags: review?
Updated•14 years ago
|
Attachment #518808 -
Flags: review? → review?(jfkthame)
Updated•14 years ago
|
Whiteboard: [has patch][needs review]
Comment 25•14 years ago
|
||
Comment on attachment 518808 [details] [diff] [review]
follow up v2
Stealing review. seriously regression -- we could either push this fix or back out the other one. I think we should just land this follow up. jfkthame, feel free to review post landing.
PR_GetEnv("ANDROID_ROOT");
please put a comment in the code (similar to comment #11).
Attachment #518808 -
Flags: review?(jfkthame) → review+
Comment 26•14 years ago
|
||
(In reply to comment #25)
> Comment on attachment 518808 [details] [diff] [review]
> follow up v2
>
> Stealing review. seriously regression -- we could either push this fix or back
> out the other one. I think we should just land this follow up. jfkthame, feel
> free to review post landing.
Thanks for taking this - looks good to me. Let's get it landed asap!
Comment 27•14 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Comment 28•14 years ago
|
||
(In reply to comment #17)
> I think it might make sense to annotate the crashdump if there's a situation
> where zero fonts are found. Seems like we're guessing at the root cause here.
> If the root cause really was no fonts in the directory it would be pretty easy
> to figure that out. Other scenarios are possible here, all the fonts failed to
> load, none of the files had extensions '.ttf', yadda, yadda.
>
> I would suggest tracking the data below. If the total fonts loaded is 0, then
> annotate the crashdump with that info:
>
> - whether the $root/system dir was found
> - how many files were found
> - how many .ttf files were found
> - how many fonts failed to load
>
> This way, if the crash still does occur at least we'll have a better idea as to
> which scenario is causing the crash. Kinda sucky that manufacturers can hack
> the Skia code to load fonts from random places.
Filed bug 641601.
Reporter | ||
Comment 29•14 years ago
|
||
There have been one crash after the fix in 4.0b6pre/20110315:
bp-ae1f4c28-4266-48b0-9c9e-ef84f2110316
Updated•14 years ago
|
Status: RESOLVED → REOPENED
tracking-fennec: 2.0+ → ?
Resolution: FIXED → ---
Assignee | ||
Comment 30•14 years ago
|
||
I guess there are multiple causes of this crash, we fixed part but not all so far.
Keywords: reproducible,
topcrash
Whiteboard: [has patch][needs review]
Comment 31•14 years ago
|
||
let's update this bug's summary to reflect what it actually fixed and track any other crashes in another bug
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Summary: crash [@ nsThebesFontMetrics::GetMetrics ] → crash [@ nsThebesFontMetrics::GetMetrics ] because we hard code our font search path to /system/fonts instead of $ANDROID_ROOT/fonts
Updated•14 years ago
|
tracking-fennec: ? → 2.0+
Updated•14 years ago
|
Crash Signature: [@ nsThebesFontMetrics::GetMetrics ]
You need to log in
before you can comment on or make changes to this bug.
Description
•