Production version iphone application crashes with "putpkt: write failed: Broken pipe"? - iphone

My app runs successfully in a simulator, but crashes when run on device with the following error:
putpkt: write failed: Broken pipe
putpkt: write failed: Broken pipe
The program being debugged is not being run.
The program being debugged is not being run."
Are there known issues that can lead to this?
How can I debug this?

Did you try to restart your device? This usually happens if you are at a breakpoint and you push the app to the background on the device by pressing the home button.

Related

Lost connection to the debugger on iPhone simulator running Big sur11.4

I have face the issue while running my app on Big sur 11.4.While run the app I got "Build succeeded" message but after app is automatically stops then showing a popup message like
Lost connection to the debugger on “iPhone 12”.
Domain: IDEDebugSessionErrorDomain
Code: 4
Recovery Suggestion: Restore the connection to “iPhone 12” and run “APP_TARGET_NAME” again, or if “APP_TARGET_NAME” is still running, you can attach to it by selecting Debug > Attach to Process > APP_TARGET_NAME.
--
System Information
macOS Version 11.4
Xcode 12.1 (17222)
Please help me how to resolve the issue.
This usually happens with apps with lots of dependencies so they take too long to launch, making the debugger to abort and time out.
A temporary solution would be:
Create (or edit in case you already have) a .lldbinit file in your home directory. vim ~/.lldbinit.
Add this to the end of file: settings set plugin.process.gdb-remote.packet-timeout 300.
Restart Xcode and try again.
I have tried this way and it is working like uncheck debug executable option.
Choose Edit Schema->Info->uncheck Debug executable

Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger

My project was running with out any problems. But suddenly it began to show crash with an error "Couldn't register com.yourcompany.iconnector with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger" in debug mode
I tried restarting system, simulator and xcode but still the issue exist. Any one please help
Thanks
I know your specific problem was with the simulator, but sometimes I get the same error when using a real device. It usually occurs when the debugger is attached and I build and run again.
To avoid the debugger hanging - when you set a breakpoint and the debugger pauses execution, make sure you continue execution before building and running again.
To solve the debugger hanging error, just restart the device and build and run again.
See this question and answer thread, it has a lot of info on the matter.
Also, try a 'Reset Content and Settings' for the Simulator.
Whenever you have a problem like unknown error code or "Couldn't register com.yourcompany.iconnector with the bootstrap server.
Restart your system it will be resolved.

My app freezes at first launch

Every time I run my app on my iPhone through XCode it freezes, it doesn't respond, to make it work I hit stop button and then launch it from my iPhone and it works only I'm having problem with launching it from XCode using build&run, here's what happen in the debugger when the app freezes:
-------
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib (file not found).
unable to read unknown load command 0x25
unable to read unknown load command 0x26
Program received signal: “SIGUSR1”.
-------
Any idea how to sort this out?
Uninstall mobilesubstrate or the plugin causing that, libstatusvar.dylib... Check Cydia.

Error while running the apps llvm-g++-4.2 failed with exit code 1

when i run my app it gives the error like this.
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
This happened to me because I had a device chosen instead of a simulator. Try picking a specific device or specific simulator. If that doesn't work, try editing your scheme to make sure that the build configuration scheme (like, say, simulator) matches up the chosen device or simulator.

iPhone Application crashes in "AdHoc" mode

i got a little application which is working very well with my "debug" configuration on my phone and in simulator.
i created a adhoc provisioning profile, and added a "beta" configuration to it.
trying to launch the application with the ad-hoc configuration crashes my application immediatelly.
the console output is:
Running…
Error launching remote program: failed to get the task for process 2434.
Error launching remote program: failed to get the task for process 2434.
The program being debugged is not being run.
The program being debugged is not being run.
i also created a dist.plsit, unchecked the get-tast-allow and setted this file in my built settings under code signing.
does anyone have an idea?
thanks!
Sometimes when you change lots of things, especially build configs, xcodebuild doesn't seem to figure out which files are stale and links in old stuff that needs to be rebuilt. Try doing a Clean All or just delete your build directory from the project dir. That seems to solve most of these bizarre-ass unexplainable problems for me.
simple thing. i clicked "built and run" instead of "built".
an ad-hoc version cannot be debugged :D