IOS app crashes, xcode says "Lost connection to X iPhone" when debugging

My application crashes and I need advice to find and fix the problem. This is not a device or cable problem, because it happens with all devices, not just when debugging. Xcode does not stop at the exception checkpoint, the application simply stops working without error information. When debugging, xcode only says "Lost connection to X iPhone". I have the following log from the device, see MY_CRASHING_APP:

Incident Identifier: 85730E97-BA21-4C72-8AD1-02075A8FD9A7 CrashReporter Key: d9e9eb14ac1801fea11e662a394244d7caf29154 Hardware Model: iPhone4,1 OS Version: iPhone OS 8.0 (12A365) Kernel Version: Darwin Kernel Version 14.0.0: Tue Aug 19 15:08:02 PDT 2014; root:xnu-2783.1.72~8/RELEASE_ARM_S5L8940X Date: 2014-09-24 15:02:41 +0200 Time since snapshot: 325 ms Free pages: 20793 Active pages: 20412 Inactive pages: 10678 Speculative pages: 1757 Throttled pages: 55906 Purgeable pages: 699 Wired pages: 21196 File-backed pages: 30263 Anonymous pages: 2584 Compressions: 76385 Decompressions: 3948 Compressor Size: 81 Uncompressed Pages in Compressor: 61 Page Size: 4096 Largest process: MY_CRASHING_APP Processes Name | <UUID> | CPU Time| rpages| purgeable| recent_max| lifetime_max| fds | [reason] | (state) coreduetd <675ac3d39b193f9bba42896818431859> 0.049 124 0 - 391 50 [vnode-limit] (daemon) (idle) homed <77bcbc47e2723e269b0ff9d115658259> 0.052 146 0 - 458 50 [vnode-limit] (daemon) (idle) gamed <a51b1ad16b693a75aeaaf2166e7b1b0b> 0.049 38 0 - 74 50 [vnode-limit] (daemon) (idle) lsd <72b4494834d3357bb8aa32fd5b5c8e83> 0.068 161 0 - 368 50 [vnode-limit] (daemon) InCallService <88e149874b1c35f2b8adbeee958d7258> 18.461 1289 0 - 3238 50 [vnode-limit] (resume) (continuous) MY_CRASHING_APP <1542054cd5393df29827ca1a6bd34e04> 59.116 24504 600 - 29490 1600 [vnode-limit] (frontmost) (resume) ptpd <c0bc1e573edb3bcebea0f3140a139421> 3.442 878 0 - 1634 50 (daemon) BTServer <1b7372b3ae393847b1c3ccaa720e991e> 3.057 393 0 - 1437 50 (daemon) lockdownd <bb602fb4b5ac3b51af2d22c4fdce9778> 11.306 271 0 - 761 50 (daemon) imagent <01ebc2c08d7f36059714967efaa86e78> 19.892 585 0 - 1286 50 (daemon) locationd <9727e24fbe4f357cb27d7bc8cf882c93> 489.694 1665 0 - 3586 50 (daemon) identityservices <13c2b979d6433252a011087be05e1aa5> 22.999 696 0 +2 1585 50 (daemon) discoveryd <dff5d0d2edf43b45b0c7fbd4a3e1b677> 93.758 589 0 - 1077 100 (daemon) wifid <5fb79228aa653a9bb725217b9cb891e6> 63.420 571 0 - 1098 50 (daemon) iaptransportd <ae70565455de38f3aab8993e9d109207> 7.713 306 0 - 579 50 (daemon) mediaserverd <b5ba58774a853d43a17559ae76a6f918> 649.476 1025 64 - 6134 50 (daemon) syslogd <a5a138dc01cd34d19bbe336c03099ce7> 40.100 201 0 - 384 50 (daemon) powerd <b3163caaebd53f7aa42634836472ea04> 43.199 231 0 - 474 50 (daemon) apsd <17af2320ccfb3e668b6455b95b4612ce> 37.461 631 0 - 1445 50 (daemon) networkd <a657abe0ce803333b886876a8f7a36e0> 77.271 596 0 - 1297 50 (daemon) dataaccessd <db655c44d5c830dc9e5f34f7edcb17a4> 243.259 1777 0 - 3097 100 (daemon) vmd <88cebb23d0f1344db23e1896b1787f2d> 0.505 204 0 - 617 50 (daemon) iapd <e84bb9b7cf7530babc36c6ca37b7f345> 11.963 453 0 - 1673 50 (daemon) syslog_relay <9e18dbcbcc07374e9d14c732b8dabad2> 1.424 98 0 - 189 50 (daemon) voiced <2d24fa3e32533f2f8298743eaf348d63> 0.179 210 0 - 581 50 (daemon) itunesstored <d50d5b1c3f693694a2eee878aae8facf> 0.573 908 0 - 1759 50 (daemon) SpringBoard <3e0aacaca7103aa09a71e5c9fee3e012> 841.081 7088 29 - 16912 50 backboardd <117d65aca8ce3ba68c7fd87d9ab81da6> 3424.058 6678 625 - 4409 50 (daemon) UserEventAgent <2f6c74a697943aed899faebac621e4c3> 316.816 848 0 - 2101 200 (daemon) configd <64e4db8bced23463b446c4b7c868fcfa> 31.906 416 0 - 933 50 (daemon) fseventsd <a393d343a7533860b5c1eddb922a33f1> 20.088 405 0 - 805 50 (daemon) fairplayd.H1 <c3856f0573fb3f9887721a239507f28b> 30.647 159 0 - 1096 50 (daemon) assertiond <032107d4db2b36ddac986060d8c62f73> 26.282 289 0 - 702 50 (daemon) wirelessproxd <ba82fe3b38f63f2b8b8807a2bf97aadd> 1.071 179 0 - 643 50 (daemon) distnoted <e8f9e76e751838a880dad2d4a953f814> 4.457 193 0 - 254 50 (daemon) discoveryd_helpe <84abc0c6dd5b37a8b2c8323881e16da7> 0.493 123 0 - 466 50 (daemon) ubd <5f4f0054821e3b41b543a4d9f4176291> 9.040 730 0 - 1540 50 (daemon) filecoordination <68a3848887853629adae42f5828a5443> 2.731 251 0 - 649 100 (daemon) aggregated <ab0d307a392f36cc827709d24c4b8696> 1335.558 1081 0 - 1688 50 (daemon) DTMobileIS <086152f142ac30a686a172b148d38fbc> 109.156 474 0 - 1724 50 (daemon) touchsetupd <d8aabe65f2d23f6ab7704bbccc6c2ba1> 0.388 158 0 - 464 50 (daemon) cfprefsd <6e5dcfe209183c719091d07edad590da> 0.150 166 0 - 320 50 (daemon) accountsd <9eb0309b021033c6b24ce65da48fa228> 0.665 595 0 - 1909 50 (daemon) CommCenter <0e1ced0eddce346ba27e9f54886ef025> 669.306 1543 0 - 4623 50 (daemon) notifyd <7beaf472572334d4989a40473776f635> 61.698 272 0 - 309 50 (daemon) ReportCrash <b36d5780860a3dfcbb146b2cc6bca339> 0.062 146 0 - 443 50 (daemon) **End** 

UPDATE:

This turned out to be a memory problem. The application quickly allocated a lot of memory, and the OS terminated the application. It is strange that Xcode did not record a warning about saving memory, while in "Tools" it was shown that the application received a lot of warnings. Other applications that used the same amount of memory left without memory warnings. I assume that they did not allocate memory at such a high speed.

The application ran on the iPhone 4S, and it was killed using about 90 MB of memory.

What confused me was the other memory problems that all had Purgeable pages: 0 . So, I guess this is not entirely out of memory, but too much memory usage in a short time?

+57
ios iphone xcode crash
Sep 24 '14 at 15:27
source share
8 answers

I had the same problem when loading a large number of images (5000px x 5000px) in UIImage s. Fortunately, the images did not have to be next to this big one, and I just needed to change them.

+16
May 07 '15 at 11:27
source share

Just chipping for anyone struggling with it.

For me, the solution was to reboot my device.

+16
Jul 23 '17 at 10:22
source share

This error appears often since I turned on the beta version of iOS 11. Sometimes rebooting the device works, sometimes my computer ...

+16
Aug 21 '17 at 16:05
source share

Yes, this is a memory problem, or you have opened too many threads. I used to meet this problem. The problem I met as follows:

When I delete a photo that can cost about 0.2 s, I would like to show the user a toast ( MBProgressHUD ) and GCD to hide the toast after deletion.
When I tried to delete 100 photos, everything is in order. However, when I tried to delete 200 photos, the application may be broken. When I tried to delete 300 photos, the iPhone will restart again.

+12
May 05 '15 at 8:29 am
source share

As Andy Darwin suggested, this is a memory problem.

I had this problem on older devices when adding a UIImageView with animationImages .

+3
Jun 18 '15 at 8:31
source share

Posting for posterity, as I recently experienced this β€œcrash”, and this was not due to memory problems, like others who suggested:

In rare cases, this can be a problem for the cord used to connect the iPhone to the computer. I had a malfunctioning lightning rod that would sporadically lose touch with my poppy. The decision was new!

+2
Nov 09 '16 at 23:50
source share

In my case, I use UICollectionView to show a bunch of photos, and when I want to reloadData in the view, it crashes, while the memory usage is not so great (less than 100 M). Besides the memory issue, I think reloadData UICollectionView or UITableView can do this too.

+1
Dec 09 '15 at 13:50
source share

Just add that I had the same problem with running my application on both old and old Ipad 3 and Iphone 6. As a result, the problem was that I accidentally saved 2 project images as a version of 40 MB and 20 MB . So this is a memory problem. I reduced them to 1 mb each, and the problem is solved.

0
Nov 12 '16 at 17:10
source share



All Articles