Disabling "Restore Windows" message in Lion - osx-lion

We have a process that scans 3rd party plug-ins in the background.
It seems that Lion is popping this "The Application X unexpectedly quit while.."
every time the process crashes.
How can we suppress this messages?
Thanks

Related

failed to send the qLaunchSuccess packet

I am using XCode 4.3.2 and trying to open an already existing project based on the Facebook SDK sample Project for XCODE and run it on a target IPhone with IOS 4.2.
Although it runs on the simulator it crashes on the IPhone printing this error on the console:
failed to send the qLaunchSuccess packet
I really do not know what could be the problem
This happened to me when I accidentally tried to do a device debug using a distribution profile. As soon as I noticed and switched it to a dev profile, the issue went away.
You might have some broken privileges or a hung debugger process (one that didn't quite exit fast enough). Restart Xcode or restart your phone, either way, it's not as bad as it's more annoying cousin, Processes That Can't Be Registered To The BootStrap Server
If all else fails, restore it from a backup.
In Xcode 4.3.3, this is caused by re-running the app (command+R) or stopping it (command+.) while halted on a breakpoint. To fix the error once you've gotten it, it usually works to stop the app, (command+.), unplug the device, plug it back in, and run the app again.
To avoid the issue in the future, remember to continue (command+control+y or hit the play button near the debugger output) before stopping. If you have many breakpoints or are in a loop, you can deactivate one breakpoint by going to that line and hitting command + \ or you can deactivate all breakpoints by hitting command + y.
If you eventually get the error ending in "This generally means that another instance of this process was already running or is hung in the debugger," you need to reboot the device.
I submitted a bug report to Apple. I suggest you all do the same so that this gets the attention it deserves.
Edit: the "qLaunchSuccess packet" bug doesn't happen in Xcode 4.4 or 4.5 as it did in 4.3. However, 4.4 and 4.5 experience "Timed out waiting for app to launch" instead--possibly the same issue with a new message. See this question for some possible solutions. Nothing works for met yet. The behavior seems different than 4.3.3 because the error doesn't come up every time I stop while halted on a breakpoint. I will experiment and see if my workaround for 4.3 also fixes the 4.4/4.5 issue.
I get this every time my app crashes, and I restart it by doing a Run. If I hit the Stop button before doing a run then I don't get this.
After some time, if I keep hitting Run instead of Stop first, the iPhone will only show the above error message and the only solution is to restart the iPhone. Quitting and restarting Xcode does not help.
This may be an Xcode bug.
A slightly quicker way to resolve this issue without restarting the device is to change the language.
Settings - > General - > International (4th from bottom) - > Language (top)
Alternatively If you have a bugged News stand app (in a folder) just tap it to restart springboard.
I had this error when I was trying to install over a bad version of the app that had been crashing on launch. Restarting Xcode and the device did not make the error go away, but deleting the app fixed the problem.

failed to send the qLaunchSuccess packet, can't debug in the device

When I run the application, it is installed in the device, but will crash immediately. I want to debug in the device, below is the information:
error: failed to launch
'/Users/wujinjin/Library/Developer/Xcode/DerivedData/化龙巷-gyktkapynghuobbqslisrornfrut/Build/Products/Debug-iphoneos/化龙巷.app/化龙巷'
-- failed to send the qLaunchSuccess packet
information from device:
Exception Type: 00000020 Exception Codes: 0x8badf00d Highlighted
Thread: 0
Application Specific Information: 化龙巷 failed to launch in time
Elapsed total CPU time (seconds): 20.030 (user 17.830, system 2.200),
100% CPU Elapsed application CPU time (seconds): 0.000, 0% CPU
Backtrace not available
Unknown thread crashed with unknown flavor: 5, state_count: 1
Binary Images: 0x2fe00000 - 0x2fe25fff dyld armv7
/usr/lib/dyld
I was having the same error "-- failed to send the qLaunchSuccess packet"
I was able to fix by setting the Code Signing Entitlements to "iPhone Developer"
(I was using distribution by mistake)
Restart the device. Worked for me.
By accident I found a real simple and always working solution for this issue that happens constantly.
First thing to know is that it happens when I run the code on the real device while in debugging mode, then make some changes to the code in XCode while still running the app with some breakpoints, stop the running application and immediatly(!) start debugging the edited code on the iOS device. Don't do that! Instead give XCode some time (a few seconds) to quit the app properly.
If it is has been occurred already stop the debbuger from running. Wait for the app to quit properly on the device, this may take some seconds. On the device double-press the home button and quit the app in the task bar by tapping the red (-). Then run the debugger, stop it immediatly without finishing the compilation and wait for XCode to stop all tasks (you may omit this step). Then everything should be fine and you can start debbuging on the device without the need for a restart. It seems that it is essential for XCode to cleanup everything after it has been stopped while debugging with breakpoints so always give it a few seconds to finish properly. Maybe it sounds like some sort of magic trick but until now it always works for me without the need for a restart.
Go to your Target's info, and at the bottom, remove the checkmark for "Entitlement". Worked for me.
I see this error all the time IF I was stopped due to a breakpoint and I just hit the run button (not the debugger's resume button). If I remember to hit stop before rerunning, I don't get the error. I can't turn off entitlement as the app I'm developing is one that will be using iCloud. Also, I can prevent the problem by resuming the app so that whatever Run does to stop an executing program handles it cleanly.
I solved it by
remove derived data,
quit Xcode,
kill app on device,
start Xcode again.
However this problem continues to happen for me, 0-4 times per week. A permanent solution to this problem would be nice.
my application was not getting launched on iPad but working normally on iPhone. I enabled entitlements and specified code signing entitlements as "iPhone Developer", then cleaned, restarted iPad and installed thru Xcode/cable directly on iPad and now its working as expected.

Xcode GDB Cannot Connect to Device. Really annoying and fidgety

Background: As I'm developing an app that needs to be run on a device, I often get weird errors with Xcode. They are really annoying and to get the builds to run on the device , its almost like I have to do an offering to Xcode to get it to work. Normally, I would just reboot the device, reboot the mac, clean all targets, disconnect device, reposition USB cable, and turn the device off. But the development device I'm using has a broken sleep button. I can't turn it off.
What do I do?
Here are the errors I've faced
Broken Pipes
The Service is Invalid Please check your setup and try again.
(0xE8000022).
and the most annoying one, after the Build Works, I get this in the console and no other message. The first line is fine, but then the next line seems to be the issue.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001
target remote-mobile (null)
warning: Couldn't connect to unix service: "(null)", error: "No such file or directory".
Settings>General>Reset and then choose one (network settings apparently causes a reboot, but content and settings definitely will if you don't mind) will allow you to reboot the device. You can also wait for the battery to run down, restore via iTunes or jailbreak and run reboot, but you obviously shouldn't test on a jailbroken device.

Validate iPhone application in in XCode 3.2.3

I have built my application using "Build and Archive" and the version shows up in XCode Organizer. However; when I click the application and then "Validate Application..." nothing happens. When I check the console, the following entry is logged every time i click "Validate Application..."
Has anyone succeeded with this or experienced the same problem?
Validate Application only works if you have a product on iTunes Connect that is in a 'waiting for binary upload' state. If you already have this in place (it should prompt you to select the application when you choose to validate) then I'm not sure - I know I lost a day to iTunes Connect last week where it wasn't processing things correctly (I assume they were doing some back-end maintenance or something) so it might just be a case of the tried and tested xCoder's 'Clean all Targets, Clean, rebuild' :(
I had the same symptom -- nothing happened when clicking Validate Application -- after reinstalling my OS due to an unrelated problem. Apparently some components of Xcode are stored in the system folder, so I had to reinstall Xcode before I could validate and submit my app.

How does XCode signal an app to stop while running in the simulator

In the typical build and run sequence of XCode, you often have your app still running in the iPhone simulator from the last time. XCode helpfully asks if you would like to stop the executable before it installs and runs the newest build.
But how does XCode signal the iPhone simulator to stop the application?
And could I write a step into my build sequence to do the same to save having to dismiss this dialog?
Applications in the simulator are full fledged processes. Anything that will kill a process can kill a simulated app. If you are debugging the process then gdb will trap the signal instead of letting the app die, so you have to kill gdb too. Something like this should do it:
killall gdb-i386-apple-darwin
killall $(PRODUCT_NAME)
well, you can write a script to kill the GBD process which is running your app. I don't know if that's what you had in mind, but that'll kill the process!