Simple UIScrollview with UIImageView with zooming - ios

I have an application that loads images into a UITableViewController, (Wine Labels), then you can navigate to the Item Details. On this page you can see a larger image of the Wine Label...IOS 6.1...
The app works for a short amount of time, then just CRASHES, not on ANY given line. The app just shuts down and I don't see ANY error message anywhere. I am having difficulties finding documentation on the correct way to troubleshoot this type of shutdown. Usually, if I crash, it fails on a line and I can usually find the problem, but in this case, Xcode is just pulling out of Debug mode(but NOT shuttind down). I don't see ANY errors in the console...Where else can I look? Xcode version is 4.6.
Any advice would be great. Thanks.

Related

Xcode unresponsive because of IBDesignablesAgentCocoaTouch when exiting Storyboard

For quite some time now, the Xcode project for our iOS App has been making problems when viewing the "Main" storyboard.
Whenever we enter the "Main" storyboard, it builds the views like it should and lets us work on the layout. However when we then try to exit that storyboard and try to display any other file in Xcode (no matter the file type), Xcode becomes unresponsive. Looking into the "Activity Monitor" app on our Mac, it displays the following process:
Manually stopping that process makes Xcode responsive again. Now the following is displayed in the Issue Navigator:
The ViewControllers it mentions are completely white, but the project becomes usable again and building and running our app results in the correct interface being displayed.
I've looked into similar questions but can't seem to find someone with this exact problem. This IB Designable Error question doesn't seem to apply, since our project stops responding upon exiting the storyboard and doesn't just automatically throw a non-blocking error.
The accepted answer for this question also doesn't help us, since there are no actual crash logs left behind - the process doesn't crash, it hangs and needs to be manually stopped. There are no crash reports generated in the mentioned folder.
Our app currently has three storyboards, but this only happens with the "Main" storyboard, so the error might relate to a certain element in that file. We are using several IBDesignable Elements, however all of them import either none or both init statements, as described in this question.
Is there any way to look into what makes the IBDesignablesAgentCocoaTouch process use this much CPU and ultimately makes Xcode unresponsive?

iOS debugging with instruments - lag in real device

I am using Instruments (for the first time) as I am trying to debug a lag time arising on a real device but not on the simulator. I have collected some data but I am stuck now since I don't know very well how to interpret them.
Briefly, when I try to present a presentationController in my app I am faced with a lag time (about 5 sec) before the UIView appears on screen. I want to display a UITextView with attributed text. I registered the process with Instruments and here is what I can see (4 figures):
All I have understood so far is that there is maybe a problem with Core Graphics and Font. Could anyone help me to figure out what is going wrong and how I could get rid of this problem? I can give more code if needed.
EDIT:
This is what I obtained when applying the advice given, but I can still not figure out how I can refer those lines to my code.
You want to click these check boxes at the bottom of the time profiler:
from:
http://imgur.com/j0anIdf
to:
http://imgur.com/8PFU5VX
Now you should see your calls rather than all calls

App Crashes , but no device log

I swipe the tableview, and it would crashes, I try to find device console under windows, devices in Xcode, but there's no log.
If I use XCode to run the app. It crash without telling me why. But just lost the connection with my phone.
One cause for those searcing on the question in the title:
This problem can occur if you have a bad iOS cable connected. The cable could work perfectly normal but in some angles when twisted and turned , could fail and lose connection.
Second cause (Your cause):
I swipe the tableview
Something in your tableView is not set up correctly. Probably as mentioned in the comment section below your question, memory issues. Add code to your question for us to be able to check even further in detail.
It's a memory issue. The system kills the app while it's going to load to many images. I commented the code "decodedImageWithImage" in SDWebImage, And the problem got fixed.

wondering how to know symbol in Time Profiler of Instruments with only address displayed in Xcode

I am very new to Instruments and have been trying to resolve an issue with my app that causes my collectionView to scroll very slowly. I have run the Time Profiler and repeated the scroll function many times. Below is the screen shot from Instruments. I am wondering how I can find out what are the symbols or methods associated with the lines that just show a memory address. Of particular concern for me is the highlighted initial line. If anybody can help me understand this or point me in the right direction I would appreciate it. Thanks.
In Insturments.app, select “Symbols…” in the “File” menu.
Select the binary that is missing symbols in the left panel
Push the “Locate”-button next to the text “dSYM Path:”
Browse to the location of the dSYM-file and select it.
Push the “Done”-button
To find the dSYM for your binary, you can right-click on your app in the ”Products”-folder in Xcode.
It was described in the Instruments documentation at
Restoring Symbols When an Instruments Trace Shows Only Addresses.

iOS Swift 2.0 UITextView freezes app depending on text

I'm experiencing a weird issue with my Swift 2.0 app.
I have a (editable) UITextView defined in my storyboard.
If I leave the text property empty in the storyboard everything is working as expected. But when I enter the text Kaasje (in the storyboard and recompiling), the app freezes when loading the nib (navigating through segue) and the CPU jumps to 100% (the app remains stuck).
The app will never reach viewDidLoad at this point.
It makes no difference when changing between fonts or fontsizes, behavior remains.
Pausing in Xcode does not leave me with anything useful, the main thread is busy without specifying any function. Nothing is logged to output nor any logs are created.
I'm running iOS9 on a iPad Air, the app has a built target of iOS8 and runs landscape-only.
Has anyone ever experienced anything like this before, and might have an explanation for this behaviour?
As far as my assumptions: Something goes wrong when calculating the text-size which results in a infinite loop while either calculating the size or adjusting the frame.
P.S. It happens with other texts too, but "Kaasje" always fails. It seems to fail when the the text is only 1 line. Longer texts tend to succeed aswel as leaving it empty.
As suggested in the comments there seems to be a bug in Xcode 7 in combination with iOS9.
I ended up recreating the entire view, the problem did not occur again.

Resources