14 Replies
      Latest reply on May 31, 2019 10:08 AM by destryST
      Henning_DEV Level 1 Level 1 (0 points)

        Hi,

         

        I have the problem that my app crashes after a short time without me seeing anything in the debugger. I only get the message "Lost Connection to "iPod"..." as I had removed the cable.

        Furthermore, the crash only occurs on iOS 9.3.5 devices. The error occurs in the debugger but also in the release via Testflight. Higher versions 10 to 12 do not have this problem even with prolonged use.

        I use Xcode 10.1.

        Can this be a problem with the memory? Can I somehow analyze this more exactly?

         

        Kind regards,

        Henning

        • Re: App crashes without any info on iOS 9.3.5
          KMT Level 9 Level 9 (14,505 points)

          Is the app installed to the device?

           

          What happens if you try to run it there without being connected to Xcode?

           

          Did you option-clean the build, then delete all versions off the device, then go again?

           

          Are you using a paid Developer Program account or working w/Xcode's free provisioning?

            • Re: App crashes without any info on iOS 9.3.5
              Henning_DEV Level 1 Level 1 (0 points)

              Hi,

              I installed the app by Debugger and by Testflight with the same result.

              It doesn't matter if I am connected or not.

              I also cleaned the build an deinstalled all versions of the app off the device. I get the same problem.

              It's a normal paid Developer Program account.

                • Re: App crashes without any info on iOS 9.3.5
                  KMT Level 9 Level 9 (14,505 points)

                  Not 'cleaned'...option-clean, using the Product menu w/the option key pressed, choosing to 'clean build folder'.

                   

                  What happens if you build a new app, using Xcode's iOS Single View template, making no changes, then try to build to your device...works ok?

                   

                  One thing you might do w/your app is to try an ad-hoc build instead.

                    • Re: App crashes without any info on iOS 9.3.5
                      Henning_DEV Level 1 Level 1 (0 points)

                      I tried the 'clean build folder' and restarts of the system without any change in the result.

                      A new app is ok. It shows only the white screen, but my app cause the problem after using it for a short time, not directly after the start.

                      I have the problem by using the debugger, without the debugger and from the installtion from Testflight.

                • Re: App crashes without any info on iOS 9.3.5
                  eskimo Apple Staff Apple Staff (11,625 points)

                  Does this generate a crash report?

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"

                    • Re: App crashes without any info on iOS 9.3.5
                      Henning_DEV Level 1 Level 1 (0 points)

                      Do you mean the crash logs in the Xcode-Organizer from Testflight? So far nothing is displayed there. The first occurrence was two days ago.

                        • Re: App crashes without any info on iOS 9.3.5
                          eskimo Apple Staff Apple Staff (11,625 points)

                          That’s the type of crash report I’m looking for, but not the right source of those crash reports.  Such reports take a while to filter through.  If you’re seeing crashes on a specific device, you should be able to get the crash report off the device.  There are tips for doing this in Technote 2151 Understanding and Analyzing iOS Application Crash Reports, but I usually get them from Settings > Privacy > Analytics > Analytics Data.  Once you’ve found the right report you can use AirDrop to get it to your Mac.

                          Oh, blat, you’re on iOS 9.  [Dusts off an iOS 9 test device, and I’m not talking metaphorically here (-: ]  On iOS 9 the location is Settings > Privacy > Diagnostics & Usage > Diagnostics & Usage Data, and there’s no AirDrop support )-:  You can, however, select the text of the crash report and share that via the selection menu.  Honestly though, it’s probably easier to use the technique from TN2151.

                          Share and Enjoy

                          Quinn “The Eskimo!”
                          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                          let myEmail = "eskimo" + "1" + "@apple.com"

                            • Re: App crashes without any info on iOS 9.3.5
                              Henning_DEV Level 1 Level 1 (0 points)

                              I found the reports and logs as you described in Diagnostics & Usage Data, but the only report from my app is nearly one year old. The only logs from the last days are JetsamEvents and log-session. In this logs I can't find anything helpfull in combination with my app.

                                • Re: App crashes without any info on iOS 9.3.5
                                  eskimo Apple Staff Apple Staff (11,625 points)

                                  Are you sure your app wasn’t jetsammed?  Old OS releases and old devices, with limited memory, are often correlated.

                                  Share and Enjoy

                                  Quinn “The Eskimo!”
                                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                  let myEmail = "eskimo" + "1" + "@apple.com"

                                    • Re: App crashes without any info on iOS 9.3.5
                                      Henning_DEV Level 1 Level 1 (0 points)

                                      Yes you are right. I find a jetsam event to my app-process:

                                       

                                      "largestProcess" : "myApp",

                                      "timeDelta" : 37840,

                                      "processes" : [

                                      {

                                         "pid" : 84,

                                         "reason" : "vm-pageshortage",

                                         "name" : "pfd",

                                         "fds" : 50,

                                         "lifetimeMax" : 261,

                                         "rpages" : 87,

                                         "cpuTime" : 0.038544,

                                         "states" : [

                                           "daemon",

                                           "idle"

                                         ],

                                         "purgeable" : 0,

                                         "uuid" : "0be13fe8-87ef-3df2-aaf4-335fc2a0cd80"

                                      },

                                        • Re: App crashes without any info on iOS 9.3.5
                                          Henning_DEV Level 1 Level 1 (0 points)

                                          The high memory consumption is caused by showing a number of images as an animation in an UIImageView. (see example coding)

                                          I have some animation in the app that gradually increase memory usage.

                                           

                                                  for (int i = 0; i < ni_animationMaxCounter; i++)
                                                  {
                                                      UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"%@%d%@", ns_animationImagePrefix, i, @".png"]];
                                                      
                                                      [animationArray addObject:img];
                                                  }
                                                                
                                          self.imageView.image = [animationArray lastObject];
                                                  self.imageView.animationImages=animationArray;
                                                  self.imageView.animationDuration= 1.3;
                                                  self.imageView.animationRepeatCount=1;
                                                  
                                                  [self.imageView startAnimating];

                                           

                                          Is there another way that uses less memory?

                                            • Re: App crashes without any info on iOS 9.3.5
                                              eskimo Apple Staff Apple Staff (11,625 points)

                                              I find a jetsam event to my app-process:

                                              Cool.  Well, uncool, but at least that explains the crash.

                                              Is there another way that uses less memory?

                                              I don’tt have any good suggestions, alas.  I generally focus on low-level stuff (like crashes :-), so I don’t have a lot of experience with UI stuff.

                                              Share and Enjoy

                                              Quinn “The Eskimo!”
                                              Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                              let myEmail = "eskimo" + "1" + "@apple.com"