Closed Bug 13756 Opened 25 years ago Closed 25 years ago

startup crash in PresShell::Init

Categories

(Core :: Layout, defect, P3)

Sun
Solaris
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: tor, Assigned: chofmann)

Details

9/14 CVS pull on solaris/native crashes when starting up with no component.reg
and no $(HOME)/.mozilla.  It crashes before it can paint the contents of
the profile manager window.

t@1 (l@1) signal SEGV (no mapping at the fault address) in PresShell::Init at
line 517 in file "nsPresShell.cpp"
  517     mViewManager->SetViewObserver((nsIViewObserver *)this);
(dbx) where
current thread: t@1
=>[1] PresShell::Init(this = 0x1d79c8, aDocument = 0x8dde8, aPresContext =
0x156190, aViewManager = 0x15a208, aStyleSet = 0x1d4888), line 517 in
"nsPresShell.cpp"
  [2] XULDocumentImpl::CreateShell(this = 0x8dde8, aContext = 0x156190,
aViewManager = 0x15a208, aStyleSet = 0x1d4888, aInstancePtrResult = 0x154928),
line 1669 in "nsXULDocument.cpp"
  [3] DocumentViewerImpl::Init(this = 0x154900, aNativeParent = 0xc0ad0,
aDeviceContext = 0x87090, aPrefs = 0x58a68, aBounds = STRUCT, aScrolling =
nsScrollPreference_kAuto), line 397 in "nsDocumentViewer.cpp"
  [4] nsWebShell::Embed(this = 0xa7cb8, aContentViewer = 0x154900, aCommand =
0xc0bc0 "view", aExtraInfo = (nil)), line 973 in "nsWebShell.cpp"
  [5] nsDocumentBindInfo::OnStartRequest(this = 0xc4510, channel = 0x12aee0,
ctxt = (nil)), line 1896 in "nsDocLoader.cpp"
  [6] nsChannelListener::OnStartRequest(this = 0x12df38, aChannel = 0x12aee0,
aContext = (nil)), line 2234 in "nsDocLoader.cpp"
  [7] nsFileChannel::OnStartRequest(this = 0x12aee0, channel = 0x12aee0, context
= (nil)), line 821 in "nsFileChannel.cpp"
  [8] nsOnStartRequestEvent::HandleEvent(this = 0xc2260), line 206 in
"nsAsyncStreamListener.cpp"
  [9] nsStreamListenerEvent::HandlePLEvent(aEvent = 0xc2260), line 144 in
"nsAsyncStreamListener.cpp"
  [10] PL_HandleEvent(0xc2260, 0xff3dd150, 0xff3dd140, 0xff3dd128, 0xfed6c524,
0xff3c0060), at 0xff063d98
  [11] PL_ProcessPendingEvents(0x4ceb0, 0xfdb40480, 0xfe3b1ef4, 0xff3dd2c8,
0xff3dc9d0, 0xb1), at 0xff063b5c
  [12] nsEventQueueImpl::ProcessPendingEvents(this = 0x4fd68), line 118 in
"nsEventQueue.cpp"
  [13] event_processor_callback(data = 0x4fd68, source = 5, condition =
GDK_INPUT_READ), line 153 in "nsAppShell.cpp"
  [14] gdk_io_invoke(0x94358, 0x1, 0x141328, 0x1, 0xfd8d1930, 0xffbef070), at
0xfdb6fb20
  [15] g_main_dispatch(0xffbef0e0, 0xfd8d3d70, 0x0, 0xfd8d3cb0, 0xfd8d1930,
0x3), at 0xfd8aa7b4
  [16] g_main_iterate(0xffffffff, 0x1, 0xfd8a86c4, 0xfd8d3d78, 0xfd8d3ce0,
0xfd8d3d6c), at 0xfd8aaee4
  [17] g_main_run(0xc0b90, 0xc0b90, 0xfd8d1930, 0xfd8d3d70, 0x56e00,
0xfdb6faa4), at 0xfd8ab0d8
  [18] gtk_main(0xfdba40a8, 0xfdafd5e0, 0xfdae5b1c, 0xc0b90, 0x0, 0xfdba105c),
at 0xfd9fbaa8
  [19] nsAppShell::Run(this = 0x4eea0), line 379 in "nsAppShell.cpp"
  [20] nsAppShellService::Run(this = 0x4f4d8), line 453 in
"nsAppShellService.cpp"
  [21] nsProfile::LoadDefaultProfileDir(this = 0xa84e0, profstr = 0xfc7e738c
"resource:/res/profile/cpw.xul"), line 393 in "nsProfile.cpp"
  [22] nsProfile::StartupWithArgs(this = 0xa84e0, cmdLineArgs = 0x4d938), line
308 in "nsProfile.cpp"
  [23] main1(argc = 1, argv = 0xffbef64c), line 517 in "nsAppRunner.cpp"
  [24] main(argc = 1, argv = 0xffbef64c), line 578 in "nsAppRunner.cpp"
Assignee: troy → hyatt
Who gets XUL bugs?
Assignee: hyatt → waterson
reassigning to waterson
tor: you are using the _native_ Solaris compiler? if so, could you please
verify that this is a problem with egcs?
I see this crash with the SUNWspro 4.2 compilers.  Using egcs-1.1 results
in the startup crash described in #13650.
I think troy fixed 13560 (or a dup of it, which I filed earlier today).
Just tried a new pull with egcs, and it still crashes like 13650.
The workshop build still dies in PresShell::Init
Assignee: waterson → chofmann
chofmann: this is a [PP] bug on an unsupported compiler. reassign as you feel
appropriate.
Ok, I think I've tracked down the problem.  mViewManager is defined as
a nsIViewManager (note the "I") in class nsPresShell.  Thus when SetViewObserver
is called on it, it attempts to run the pure virtual implementation instead of
the one probably intended in nsViewManager (no "I").  Not sure what fix would
be appropriate.

(dbx) p mViewManager->SetViewObserver
mViewManager->SetViewObserver = &nsIViewManager::SetViewObserver() at 0x0

Why the compiler didn't catch this and why it works on any platform is still
a mystery to me.
Never mind the previous comment... my brain wasn't in C++ mode.  The problem
is that it's calling the pure virtual function, but not for the reason I said.
Another data point: the same problem happens with the SUNWspro 5.0 compilers.
Severity: normal → critical
tor,

If the patch end up landing in nsPresShell troy might be the
guy to review and checkin..   Is that where we think the bug is?

http://cvs-mirror.mozilla.org/webtools/bonsai/cvsblame.cgi?file=mozilla/layout/h
tml/base/src/nsPresShell.cpp
tor,

If the patch end up landing in nsPresShell troy might be the
guy to review and checkin..   Is that where we think the bug is?

http://cvs-mirror.mozilla.org/webtools/bonsai/cvsblame.cgi?file=mozilla/layout/h
tml/base/src/nsPresShell.cpp
tor,

If the patch end up landing in nsPresShell troy might be the
guy to review and checkin..   Is that where we think the bug is?

http://cvs-mirror.mozilla.org/webtools/bonsai/cvsblame.cgi?file=mozilla/layout/h
tml/base/src/nsPresShell.cpp
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Haven't seen this bug for a couple months now.

BTW: Why was your comment appended three times?
he got wonky finger... ;-)
Status: RESOLVED → VERIFIED
Based on the reporter's last comments, marking as verified works for me in the
Dec 01 build.
You need to log in before you can comment on or make changes to this bug.