Redux: App launched in Xcode can't gain key and order front
Redux: App launched in Xcode can't gain key and order front
- Subject: Redux: App launched in Xcode can't gain key and order front
- From: Ben Lachman <email@hidden>
- Date: Thu, 22 Mar 2007 00:47:00 -0400
A couple months ago I posted the attached message. After a few posts
I thought I had this issue beat... but its back.
However, I do have some more info. To sum things up, when launched
within XCode my app never gains focus/order/foreground/selection. If
I run it through the debugger, I noticed the app (its Cocoa) never
posts the applicationDidFinishLaunching notification. However if you
pause the debugger the app is just sitting there polling for events
(of which it will never receive any since the app does not have any
keyboard/mouse input). The backtrace is as follows:
#0 0x9000b4c8 in mach_msg_trap ()
#1 0x9000b41c in mach_msg ()
#2 0x907deba8 in __CFRunLoopRun ()
#3 0x907de4ac in CFRunLoopRunSpecific ()
#4 0x9329bb20 in RunCurrentEventLoopInMode ()
#5 0x9329b1b4 in ReceiveNextEventCommon ()
#6 0x9329b020 in BlockUntilNextEventMatchingListInMode ()
#7 0x937a1ae4 in _DPSNextEvent ()
#8 0x937a17a8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#9 0x9379dcec in -[NSApplication run] ()
#10 0x9388e87c in NSApplicationMain ()
#11 0x00002e7c in main (argc=3, argv=0xbffff9c0) at /Users/ben/
Desktop/BoxApp/Source/main.m:13
Things I can do that *always* make it run normally:
- Delete the CoreData store file in ~/Library/ApplicationSupport
- Launch the App from the finder (or by double clicking the product
in Xcode which does the same thing)
Things I can do that *sometimes* make it launch normally within Xcode
- change the arguments the application is launched with
(NSZombieEnabled is the one I often use)
- launch it in the debugger instead of just run it
I don't know exactly where to go next since there is nothing to debug
and no errors anywhere (checked system logs, crash reports, etc.),
and nothing is crashing.
Anyone have any ideas?
Thanks,
->Ben
On Jan 22, 2007, at 3:31 AM, Ben Lachman wrote:
Hi all. I have an app I just came back to after taking about a
month off programming for my first daughter's birth. However when
I launch the app from within Xcode, it no longer gains key or order
front no matter what you do. The app is seemingly hung, although
if you attach the debugger to it (or launch it in the debugger), it
looks as if you paused it while doing nothing except polling for
events. Nothing I've tried (sampling, spin control, switching
apps, clean and rebuild, update Xcode, reinstall Xcode, etc.) has
had any effect. I tried reverting to a revision that had worked
fine (as of 11/1) and it now hangs on launch as well. The most
frustrating thing is that every once in a while it will launch the
app just fine, but the next time I launch it it will hang. If I
launch it from the finder it runs normally.
Any ideas? This is driving me up the wall.
Thanks,
->Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden