Closed Bug 91760 Opened 23 years ago Closed 23 years ago

[xlib] Crash at shutdown in widget clipboard code...

Categories

(Core :: XUL, defect, P2)

All
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.3

People

(Reporter: roland.mainz, Assigned: roland.mainz)

References

Details

(Keywords: crash)

Attachments

(2 files)

[this bug exists since eternity and only affects _optimized_ Sun Workshop
builds; follow-up to bug 68472]
Xlib-toolkit Zilla build with Sun Workshop crashes in widget clipboard code at
shutdown with SIGBUS (Bus error).

Stack trace from dbx looks like this:
-- snip --
Shut down app shell component {7cb5b7a0-07d7-11d3-bde2-000064657374},
rv=0x00000000
nsPluginHostImpl::Observe "xpcom-shutdown"
### nsCacheProfilePrefObserver::Observe [topic=xpcom-shutdown data=]
t@1 (l@6) signal BUS (invalid address alignment) in nsClipboard::Callback at
line 179 in file "nsClipboard.cpp"
  179   }
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: t@1
=>[1] nsClipboard::Callback(event = ???) (optimized), at 0xfdba50f0 (line ~179)
in "nsClipboard.cpp"
  [2] nsWidget::DispatchEvent(this = ???, aEvent = ???, aStatus = ???)
(optimized), at 0xfdbb2df0 (line ~1226) in "nsWidget.cpp"
  [3] nsWidget::DispatchWindowEvent(this = ???, aEvent = STRUCT) (optimized), at
0xfdbb2d3c (line ~1124) in "nsWidget.cpp"
  [4] nsWidget::DispatchDestroyEvent(this = ???) (optimized), at 0xfdbb2b1c
(line ~1059) in "nsWidget.cpp"
  [5] nsWidget::OnDestroy(this = ???) (optimized), at 0xfdbb2a68 (line ~1034) in
"nsWidget.cpp"
  [6] nsWidget::Destroy(this = ???) (optimized), at 0xfdbb141c (line ~374) in
"nsWidget.cpp"
  [7] nsWidget::~nsWidget(this = ???) (optimized), at 0xfdbb0e3c (line ~160) in
"nsWidget.cpp"
  [8] __SLIP.DELETER__C(0x767bb0, 0x1, 0xfdbdcce1, 0x3b140, 0xfeeac9ac, 0x0)
(optimized), at 0xfdbb47f0
  [9] nsBaseWidget::Release(this = ???) (optimized), at 0xfdbb8dec (line
~4194259) in "nsBaseWidget.cpp"
  [10] nsWidget::Release(this = ???) (optimized), at 0xfdbb2028 (line ~683) in
"nsWidget.cpp"
  [11] nsClipboard::~nsClipboard(this = ???) (optimized), at 0xfdba4e84 (line
~82) in "nsClipboard.cpp"
  [12] __SLIP.DELETER__A(0x767968, 0x1, 0xfdbd821a, 0x4f34c, 0x0, 0x0)
(optimized), at 0xfdba661c
  [13] nsClipboard::Release(this = ???) (optimized), at 0xfdba4be0 (line
~4194233) in "nsClipboard.cpp"
  [14] DeleteEntry(aKey = ???, aData = ???, closure = ???) (optimized), at
0xff0c0e18 (line ~258) in "nsServiceManager.cpp"
  [15] _hashEnumerateRemove(he = ???, i = ???, arg = ???) (optimized), at
0xff06bc00 (line ~368) in "nsHashtable.cpp"
  [16] PL_HashTableEnumerateEntries(0xffffffe8, 0xff06bbe0, 0xffbef0a0, 0x8,
0x1, 0x0), at 0xff1e1a94
  [17] nsHashtable::Reset(this = ???, destroyFunc = ???, closure = ???)
(optimized), at 0xff06bc88 (line ~386) in "nsHashtable.cpp"
  [18] nsObjectHashtable::Reset(this = ???) (optimized), at 0xff06cbc0 (line
~656) in "nsHashtable.cpp"
  [19] nsObjectHashtable::~nsObjectHashtable(this = ???) (optimized), at
0xff06caa0 (line ~622) in "nsHashtable.cpp"
  [20] __SLIP.DELETER__C(this = ???, delete = ???) (optimized), at 0xff06d1f8
(line ~0) in "$qiMNCyWW7SaL."
  [21] nsServiceManagerImpl::~nsServiceManagerImpl(this = ???) (optimized), at
0xff0c1004 (line ~283) in "nsServiceManager.cpp"
  [22] __SLIP.DELETER__C(0x3e630, 0x1, 0xff15e54f, 0xcb7cc, 0xff3df650, 0xc00)
(optimized), at 0xff0c1fe4
  [23] nsServiceManagerImpl::Release(this = ???) (optimized), at 0xff0c1164
(line ~4194012) in "nsServiceManager.cpp"
  [24] nsServiceManager::ShutdownGlobalServiceManager(result = ???) (optimized),
at 0xff0c19d8 (line ~544) in "nsServiceManager.cpp"
  [25] NS_ShutdownXPCOM(servMgr = ???) (optimized), at 0xff060968 (line ~476) in
"nsXPComInit.cpp"
  [26] main(argc = ???, argv = ???) (optimized), at 0x1854c (line ~1490) in
"nsAppRunner.cpp"
-- snip --

Unoptimized Zilla runns fine.
Accepting bug.
Fix is easy... :-)

Patch in a few mins...
Blocks: 79119
Severity: normal → critical
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.3
Filed patch, requesting r=/sr=, please...
Severity: critical → blocker
Keywords: crash, patch
Whiteboard: seeking r=/sr=
Patchs fixes crash on exit, r=Tomi.Leppikangas@oulu.fi
Why don't you just set

  event.nativeMsg = nsnull;

which is all you really need to change here?  A memset isn't guaranteed to work
in the future.  What if nsEvent had a virtual function added?
Good point. Best solution would be that nsEvent avoids this issue itself.

Anyway... I'd like to get this patch in as the current solution and find a
"smarter" solution later. This issue annoys Xlib-port users since eternity.
Just let this patch "in", please...
Whiteboard: seeking r=/sr= → seeking sr=
Blocks: 91773
Filed better patch per dbaron's comment.

Unfortunatly now the whole review cycle starts again... I'll hope this will be
"in" before 0.9.3 branches... ;-(

Requesting r=/sr= ...
Keywords: review
Whiteboard: seeking sr= → seeking r=/sr=
sr=tor
tor:
Thanks!!

----

CC:'ing mkaply@us.ibm.com for checkin, please...
Keywords: review
Whiteboard: seeking r=/sr=
Fix checked in.
Checking in nsClipboard.cpp;
/cvsroot/mozilla/widget/src/xlib/nsClipboard.cpp,v  <--  
nsClipboard.cp
new revision: 1.14; previous revision: 1.13
done
Checking in nsWidget.cpp;
/cvsroot/mozilla/widget/src/xlib/nsWidget.cpp,v  <--  nsWidget.cpp
new revision: 1.76; previous revision: 1.75
done
Mark fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
May God have mercy on us all. The 212 bug spam-o-rama is Now!
QA Contact: aegis → jrgm
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: