xcode-instruments

A new session could not be created. (Original error: Instruments crashed on startup)

家住魔仙堡 提交于 2019-12-08 08:15:52
问题 Facing this issue while working on appium. couldnt able to launch the app in the simulator as appium server is throwing the above error. 回答1: In my case I had installed appium from a different user and the owner of the Appium.app was other user than the user I was trying to run from. Changing the owner to the current user resolved the issue. 回答2: I resolved this error by running ps aux | grep appium from command line, kill all appium and node processes and then restart appium. 来源: https:/

Accessing iOS user preference through UIA script for UI automation

拈花ヽ惹草 提交于 2019-12-07 19:03:12
问题 I've been trying to implement UI test script for my iOS application. In test cases I come over an issue of setting user's preference in setting. So far I could not find a way to change or read these user preference values. These are what I have learn so far: setPreferencesValueForKey and preferencesValueForKey doesn't work by using identifier in Root.plist as a search key. It will return null. However, I can add these value via UIA script and the simulator seems to remember them but the

A new session could not be created. (Original error: Instruments crashed on startup)

笑着哭i 提交于 2019-12-06 23:47:34
Facing this issue while working on appium. couldnt able to launch the app in the simulator as appium server is throwing the above error. In my case I had installed appium from a different user and the owner of the Appium.app was other user than the user I was trying to run from. Changing the owner to the current user resolved the issue. I resolved this error by running ps aux | grep appium from command line, kill all appium and node processes and then restart appium. 来源: https://stackoverflow.com/questions/22248328/a-new-session-could-not-be-created-original-error-instruments-crashed-on-star

iOS CPU Profile: Why might this thread be sucking up 99.9% CPU?

和自甴很熟 提交于 2019-12-06 20:43:18
问题 Sometimes when I load a table view, and I'm performing no activity intentionally except letting the table view show, I'll wait a few seconds and then my CPU usage shoots up. How can I find the cause? 回答1: Why might this thread be sucking up 99.9% CPU? I don't know. But here are some thoughts: The responsible library is UIKit . So it seems that some user interface code is broken. A function named FreeContextStack is running for a long time. pthread_once and pthread_getspecific take a

Unable to track memory issue

江枫思渺然 提交于 2019-12-06 11:26:59
I am having problem on memory leak tracking, i did try profiling but the instrument shows firapb_decode_repeated_user_attribute as as responsible object. And while i try to track code it takes me to assembly code which is more painful. Do anybody have similar issue or have some clue to track this issue, It will be a lot for me. Leaked Object # Address Size Responsible Library Responsible Frame Malloc 32 Bytes 1 0x600000231ba0 32 Bytes appName firapb_decode_repeated_user_attribute The Assembly code Yes as Larme said it was the Firebase leaking the memory. I am still not knowing the exact cause

UIAutomation Nested Accessibilty Elements Disappear from Hierarchy

99封情书 提交于 2019-12-05 13:55:42
问题 I have a view with two subviews a button and an Image, I turn on accessibility and set the label on the subviews and I can see the hierarchy by calling UIATarget.localTarget().frontMostApp().mainWindow().logElementTree(); I get the following for example: 1 Window 2 My View 3 My Button 3 My Image If I then turn on accessibility and set the label for my parent view I can no longer see my button and image anywhere in the hierarchy. I just get: 1 Window 2 My View Why have my views disappeared?

Observing property crashes Instruments (Leaks profile) Xcode 9.3 (Swift 4.1)

≯℡__Kan透↙ 提交于 2019-12-05 09:45:48
When I run the following code (a simplified example, created to demonstrate the crash), it executes as expected when I choose Run (both os_log messages print in Console). However, when I open it in Instruments from the Memory Debug Navigator - by pressing Restart - it crashes (only the first os_log message prints in Console). The crash occurs at observe(...). import os import UIKit class ObserverCrashingExample: NSObject { @objc private var animation: UIViewPropertyAnimator? private var observer: NSKeyValueObservation? override init() { super.init() animation = UIViewPropertyAnimator( duration

Xcode Memory Graph - showing increasing memory use - what exactly does it show?

戏子无情 提交于 2019-12-05 02:48:53
问题 When watching the debug graph in xcode 6 (and probably 5 too), when running my application the memory use continues to rise as I place more of a certain object on the screen and animate it's movement. It does not seem to decrease when I remove it. Once removed I believe there are no more references to them. See screenshot: http://i.stack.imgur.com/SnhbK.png However when I use Instruments to try to identify what's going on, there's only around 12mb persisting, and Total Bytes continues to rise

iOS CPU Profile: Why might this thread be sucking up 99.9% CPU?

℡╲_俬逩灬. 提交于 2019-12-05 01:31:02
Sometimes when I load a table view, and I'm performing no activity intentionally except letting the table view show, I'll wait a few seconds and then my CPU usage shoots up. How can I find the cause? Why might this thread be sucking up 99.9% CPU? I don't know. But here are some thoughts: The responsible library is UIKit . So it seems that some user interface code is broken. A function named FreeContextStack is running for a long time. pthread_once and pthread_getspecific take a considerable amount of time. These functions are fast, so they have to run very often. They are part of

Xcode Instruments unable to take snapshots of leaks when running on device

自闭症网瘾萝莉.ら 提交于 2019-12-05 00:12:46
Recently I have not been able to test for leaks with Instruments when running apps on a device. Instruments will attempt to take a snapshot but the status will freeze at "Analyzing Process". At first I thought it was just taking it's time but I have waited over 20 minutes for it and had no luck. It does still work fine on the simulator though. So far I have tried: - Using other devices with different ios versions - Restarting all devices - Updating Xcode to latest version - Running a number of different apps - Turning automatic snapshots off and trying manually Unfortunately none of the above