Closed Bug 245974 Opened 21 years ago Closed 19 years ago

plevent should not use GetCurrentProcess on macosx (e.g. for _md_CreateEventQueue) because it doesn't work for non console users

Categories

(Core :: XPCOM, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 file)

doppler:~/obj-powerpc-apple-darwin7.4.0-camino/dist/bin timeless$ ./run- mozilla.sh ./xpcshell kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only INIT_Processeses(), could not establish the default connection to the WindowServer../run-mozilla.sh: line 423: 3519 Abort trap "$prog" ${1+"$@"} A user (admin) is logged onto the console. timeless is ssh'd into the box. The message clearly explains its complaint. #0 0x900429ac in kill () #1 0x9009eb1c in abort () #2 0x92d43ae8 in RegisterProcess () #3 0x92d3fee4 in INIT_Processes () #4 0x92d349e8 in GetCurrentProcess () #5 0x01c2278c in _md_CreateEventQueue (eventQueue=0x0) at /Users/timeless/mozilla/xpcom/threads/plevent.c:1629 #6 0x01c21d64 in _pl_CreateEventQueue (name=0x0, handlerThread=0x1101600, qtype=2731736624) at /Users/timeless/mozilla/xpcom/threads/plevent.c:271 #7 0x01c231d4 in nsEventQueueImpl::InitFromPRThread(PRThread*, int) (this=0x0, thread=0x1101600, aNative=-1563230672) at /Users/timeless/mozilla/xpcom/threads/nsEventQueue.cpp:176 #8 0x01c247ec in nsEventQueueServiceImpl::MakeNewQueue(PRThread*, int, nsIEventQueue**) (this=0x0, thread=0x1101600, aNative=1, aQueue=0xbfffeb60) at ../../dist/include/xpcom/nsCOMPtr.h:710 #9 0x01c248a8 in nsEventQueueServiceImpl::CreateEventQueue(PRThread*, int) (this=0x1122c40, aThread=0x1101600, aNative=1) at ../../dist/include/xpcom/nsCOMPtr.h:1148 #10 0x01c244a0 in nsEventQueueServiceImpl::Init() (this=0x1122c40) at /Users/timeless/mozilla/xpcom/threads/nsEventQueueService.cpp:125 #11 0x01be11e0 in nsEventQueueServiceImplConstructor(nsISupports*, nsID const&, void**) (aOuter=0x0, aIID=@0x8733440, aResult=0xbfffed20) at /Users/timeless/mozilla/xpcom/build/nsXPComInit.cpp:132 #12 0x01c1afd0 in nsComponentManagerImpl::CreateInstanceByContractID(char const*, nsISupports*, nsID const&, void**) (this=0x1102a00, aContractID=0x0, aDelegate=0x0, aIID=@0x8733440, aResult=0xbfffed20) at /Users/timeless/mozilla/xpcom/components/nsComponentManager.cpp:1958 #13 0x01c1bb88 in nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) (this=0x1102a00, aContractID=0x871e684 "@mozilla.org/event- queue-service;1", aIID=@0x8733440, result=0xbfffee10) at ../../dist/include/xpcom/nsCOMPtr.h:1182 #14 0x01c47378 in nsGetServiceByContractID::operator()(nsID const&, void**) const (this=0x1c6cb4c, aIID=@0x1102a48, aInstancePtr=0xbfffed20) at /Users/timeless/mozilla/xpcom/glue/nsCOMPtr.h:710 #15 0x01c46fec in nsCOMPtr_base::assign_from_helper(nsCOMPtr_helper const&, nsID const&) (this=0x1122ac4, helper=@0x7238621d, iid=@0xa00020a8) at /Users/timeless/mozilla/xpcom/glue/nsCOMPtr.cpp:114 #16 0x086904f8 in nsIOService::Init() (this=0x1122aa0) at ../../../dist/include/xpcom/nsISupportsUtils.h:202 ilister#darwinports@irc.freenode.net suggested the code sample in http://developer.apple.com/qa/qa2001/qa1133.html
Attached patch working patchSplinter Review
Attachment #150330 - Flags: superreview?(sfraser)
Attachment #150330 - Flags: review?(ccarlen)
Er, why is MAC_USE_WAKEUPPROCESS ever defined? That's a holdover from the Mac classic days. I see it does get used in the cocoa build (I have no idea why). Was this a cocoa build?
yes camino likes cocoa so that's what i used (comment 0 lists the camino bit...)
Camino doesn't use MAC_USE_CARBON_EVENT because it handles PLEvents via a timer task, for supposed better performance. But, for that, it should not define MAC_USE_WAKEUPPROCESS or MAC_USE_CARBON_EVENT. I think there may be something screwy with either the #ifdefs or what's defined in the Cocoa build. Check that before we know this patch is needed.
Comment on attachment 150330 [details] [diff] [review] working patch You can't run any app that has UI remotely, so I don't see any point in this patch.
Attachment #150330 - Flags: superreview?(sfraser_bugs)
Attachment #150330 - Flags: superreview-
Attachment #150330 - Flags: review?(ccarlen)
Comment on attachment 150330 [details] [diff] [review] working patch You can't run any app that has UI remotely, so I don't see any point in this patch.
What if it doesn't have UI? XPCOM console/command-line apps are appearing on occasion, and the xulrunner will make them easier to write.
The patch in bug 271050 will get rid of this code anyway.
The code in question no longer exists. See bug 326273.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: