iphone,console,leak,instruments,xcode-instrumentsRelated issues-Collection of common programming errors


  • user198725878
    iphone ios sencha sencha-2
    Mac-mini-2:sink eit$ sencha app build native[INFO] Deploying your application to /path/to/www/sink/build/package [INFO] Copied sdk/sencha-touch.js [INFO] Copied app.js [INFO] Copied resources/css/app.css [INFO] Copied resources/images [INFO] Copied resources/icons [INFO] Copied resources/loading [INFO] Resolving your application dependencies… [INFO] Found 139 dependencies. Concatenating all into app.js… [INFO] Processed sdk/sencha-touch.js [INFO] Minifying sdk/sencha-touch.js [INFO] Processe

  • Abhijeet Vaikar
    automated-testing selenium iphone
    Is there any similar function/ command in MonkeyTalk, like WaitForPageToLoad which is in Selenium, that lets me specify the script to wait for a screen to render before moving ahead? I checked MonkeyTalk’s language reference but could not find a way. Also searched for this issue on Google but it didn’t help me much.The iOS native app i’m testing takes some time to load and open up the home screen after login. After recording the event flow using MonkeyTalk, and running the test script, the scrip

  • Diggory
    iphone icloud iphoto photo-stream
    I’m rather confused about the ‘proper’ way to use Photo Stream and an iPhone and iPhoto.Here’s how I use iPhoto and my iPhone: (This workflow was as far as I can tell the correct way to operate before iCloud)Getting photos into iPhoto:Take photos on iPhone. Every so often connect the phone to my mac and in iPhoto import any photos and videos from the phone’s camera roll into iPhoto (deleting those photos from the camera roll once they are imported.) This means that iPhoto is the canonical stor

  • bneely
    iphone ios youtube
    Whenever I try and log into the native Youtube app on my iPhone, it reports ‘Authentication Failed” even though the details are 100% correct. Here’s what I’ve done so far:Youtube.com accepts my username and password on both the desktop and iPhone web app. I’ve reset my Youtube password I get the same results over 3G or wifi (tried multiple networks, incl. Apple Store), so it is not my carrier or ISP blocking Youtube. A friend logged in with his account and the iPhone accepted it, so it isn’t sp

  • John
    iphone json http post
    Hi I need help in making a HTTP POST connection to a web service. I am totally clueless on how to do it. I only had experienced in making a NSURLConnection whereby I pass the required input parameters as part of the URL. Now it seems different as I am only provided a website and the request JSON body.{ “lastmodified”:”String content”, “passengerId”:9223372036854775807, “password”:”String content”, “userId”:”String content” }Could anyone shed some light on this? Say the website is www.myURL/opera

  • Guy
    iphone objective-c ios image-processing
    I’m trying to combine two photos into one image (think a body with a hole in the face on top of a picture of a different person’s face). The top image has some semi-transparent pixels and some fully transparent pixels and I want to overlay it on top of a solid image.Here’s what I’m doing: I have a Context with the right size and I draw the bottom image on it, without any alpha (faceImage). On top of that I draw an image that has a transparent hole in it, with various levels of transparencies (co

  • Peter Hosey
    iphone cocoa-touch mode silent
    I would like to stop my application playing a sound if the user has switched the iPhone to silent mode. Where can I read that the phone is in silent mode? Is there some flag I can query? I noticed that some applications ignore the silent mode and some not, while I would have expected all apps to respect that silent is silent !! Any hints or input would be greatly appreciated. Thanks Al

  • SaamJB
    iphone objective-c ios
    I have a UITableViewController that when a cell is pressed, I want the controller to pop itself, and then have the controller it pop’s to, push another view controller onto the stack.I am invoking this method because the popped-to viewController is the delegate of the tableViewControllerI am currently invoking this method with a delay on it, because otherwise, everything gets screwed up waiting for the animation to end. Doing it this way seems a bit hacky and seems to me like it would fail if so

  • magma
    iphone ipad uitableview nested uitouch
    When you’re working with an atypical nested UITableViews setup – where you have an outer vertical UITableView that hosts 90° rotated UITableViews (see: Looking for a UI library to present Data horizontaly in iOS ): is there a way to make iOS process vertical and horizontal touches at the same time?I found that iOS is very clever in processing touches: horizontal touches make the relevant horizontal UITableView scroll, while a vertical swipe makes the outer UITableView scroll. Perfect.Only, I’d l

  • Rob Keniger
    iphone cocoa-touch keyboard decimal nsdecimalnumber
    iPhone/Objective-C/Cocoa newbie here. Based on a number of posts on stackoverflow, I have cobbled together an IBAction that I’m using in a basic iPhone calculator app that I’m building. The IBAction works with the numeric keypad to allow entry of decimal numbers without having to enter a decimal point. I am trying very hard to adhere to the “use NSDecimal when dealing with currency” adage although I am finding it difficult to do so like so many others who have posted questions. I am making stead

  • Steve Fallows
    c++ visual-studio-2008 console x64
    I have a VS2008 solution with several libraries and 4 console apps. All build and run correctly in 32 bit mode. The libraries all build and run in x64 mode in another solution with a C# app and a C++/CLI interface layer.Now I need to build an x64 flavor of the 4 console apps (functional and unit tests for the libraries).On the Configuration Manager dialog, the Platform dropdown for these 4 projects offers only Win32 as an option. (x64 is also there for the libraries). The Edit and New options ar

  • mkluwe
    c++ visual-studio-2008 utf-8 windows-xp console
    The following code shows unexpected behaviour on my machine (I’m using Visual C++ 2008 SP1 on Windows XP here):int main() {SetConsoleOutputCP( CP_UTF8 );std::cout << “\xc3\xbc”;int fail = std::cout.fail() ? ‘1’: ‘0’;fputc( fail, stdout );fputs( “\xc3\xbc”, stdout ); }I simply compiled with cl /EHsc test.cpp. Output in a console window is ü0ü (translated to Codepage 1252, originally shows some line drawing charachters in the default Codepage, perhaps 437). When I change the settings of th

  • richsage
    symfony2 console cli shared-hosting
    I signed up for a shared hosting package at Hostgator. So far so good, but I run into trouble when executing Symfony 2.1 console commands via ssh.By default, Hostgator provides php v5.2. After some googling, I found that adding the following lines to the document root .htaccess file will turn on php v5.3, as required by Symfony:Action application/x-hg-php53 /cgi-sys/php53 AddType application/x-httpd-php53 .php suPHP_ConfigPath /opt/php53/libGreat! The Symfony pages are rendered without errors. O

  • mfaerevaag
    ruby-on-rails console
    Working through Michael Hartl’s Ruby on Rails Tutorial and hit a snag on section 2.3.3 “We first invoke the console with rails console at the command line, and then retrieve the first user from the database using User.first (putting the results in the variable first_user):7″Any help would be much apprecaited$ rails console Loading development environment (Rails 3.2.13) 1.9.3-p429 :001 > >> first_user = User.first SyntaxError: (irb):1: syntax error, unexpected tRSHFT >> first_user

  • niroyb
    console autohotkey autoit keystroke sendinput
    I am trying to understand this bug and I am looking for a workaroud.Using this script:#NoEnv #SingleInstance force SendMode Input ;Alt+t to send keystrokes !t::Send, /[]It send the correct keystrokes /[] to all windows but the windows console (cmd)Additional Info:Using autohotkey v1.1.09.02 With an english US keyboard layout, it sends: ’90 With a french canadian multilingual keyboard layout, it sends: é^çAny idea of what can fix it?

  • Alex
    symfony2 console
    We have a symfony 2 console command app. Inside a command (extending \Symfony\Component\Console\Command\Command) we call another command.Code:$this->getApplication()->run(new StringInput(‘cache:flush’), new NullOutput());This was working fine until the update to the recent Symfony versionBut now I hit the exception in the following Symfony function (\Symfony\Component\Console\Input\ArgvInput::parseArgument())private function parseArgument($token) {$c = count($this->arguments); ## $c is

  • Tomasz Nurkiewicz
    java multithreading console pipe gnu-screen
    I have a single-threaded program doing some long-running computing job. The main thread is using the console for some output. I’m considering adding another thread to interact with user to query something like the job progress or process internal state. Assuming synchronization is properly handled and the user interact with the second thread through something like a command line console (no GUI needed). What is a good way to implement this function? I guess I can make the second thread wait for

  • Bill the Lizard
    android android-emulator console
    The Console and LogCat printouts stopped working in Eclipse with the Android Emulator.I’m getting the following Exception in the Console[2011-11-10 11:04:58 – Unexpected error while launching logcat. Try reselecting the device.]device not foundcom.android.ddmlib.AdbCommandRejectedException: device not foundat com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)at com.android.ddmlib.Device.executeShellCommand(Device.jav

  • Sebastian Kranz
    r parsing console eval
    I would like to have a R function that allows me to emulate the R console with the difference that expressions are evaluated in a different environment than the global environment. (I want to use it for an alternative debugging approach in R that allows to restore the local parameters with which a function was called and then to debug by simply pasting step by step the function code into the emulated R console). Here is a function that uses parse and eval and does the job halfway (the emulated c

  • GOTO 0
    windows winapi console io-redirection
    I know I can call the AttachConsole and GetStdHandle kernel32 functions to access the console screen buffers of a different console process, but if this process has its input/output/error redirected to a file or device, how can I get handles to those redirected locations instead?To put it clear: I don’t have control on the application I’m trying to attach to, which is provided by a third party, so my chances with IPC are little.

  • Lazaros Tsochatzidis
    java memory leak
    While the JDBM3 database promises (to my understanding) very small memory use when accessing and writing data I have the following problem: Even when iterating inside the keyset of a TreeMap it seems that ALL the data are loaded on memory. So the following code:db=DBMaker.openFile(“Myfile”).make(); SortedMap<Integer, double[]> MyMap=db.getTreeMap(“MyMap”);int i=0;final Set<Integer> keySet = MyMap.keySet();for (Object key : keySet) {System.out.println(i++);}leads in loading all the

  • Simon Ottenhaus
    c# detect leak
    I ran into this exception yesterday:Win32Exception: Fehler beim Erstellen des Fensterhandlesmight translate:Win32Exception: Error while creating the windowhandleI know how to solve this (even wrote a short blog post on the topic – in german)But I don’t know where my application might be ‘leaking’ not disposed Controls, that still have window-handles.Is there any way of detecting / finding instances thatimplement IDisposable have Parent == nullObjects matching this constraints seem to be good can

  • Stan Sieler
    iphone console leak instruments xcode-instruments
    I’m running the Mac OS “Instruments” app, using the “Leaks Instrument” to monitor an iPhone app. The major pane is titled “Leaked Blocks”, but if you click on that you get a choice of three: “Leaked Blocks”, “Call Tree”, and “Console”. Click on “Console”.You now have a blank pane … click in it and hit . In my case, I get:foo (4259) >which is my app name and, presumably, the PID it’s running as.I can enter commands/text (e.g., ls, help, exit) … they get echoed after awhile but nothing else

  • anishsane
    c osx memory-leaks valgrind leak
    Valgrind installed using brew.#include <stdio.h> #include <stdlib.h> int main() {return 0; }gcc -g -o hello hello.cvalgrind –tool=memcheck –leak-check=yes ./hello

  • Dave
    windows memory workflow runtime leak
    Here’s a overview of my workflow implementation:GUI thread starts worker thread worker thread analyzes some data worker thread starts several other worker threads to work on subsets of data each of these last worker threads creates a workflow runtime and executes a sequential workflowUp until now, I’ve been creating a new WorkflowRuntime object in each thread like this:using( WorkflowRuntime workflow_runtime = new WorkflowRuntime()) {AutoResetEvent waitHandle = new AutoResetEvent(false);workflow

  • Dan
    c++ memory cpu leak usage
    I have a C++ program that has a pretty terrible memory leak, about 4MB / second. I know where it’s coming from and can fix it, but that’s not my main problem. My program is taking up a very large amount of CPU usage and it isn’t running as fast as I want it to. I have two different threads in the program. One by itself takes ~50% CPU, which is fine, and the other by itself takes ~15% CPU, which is fine. Together however CPU usage is 100% and the program cannot run as fast as it needs to. Can a m

  • edorian
    iphone ios memory cocos2d-iphone leak
    I’m having the absolute worst time with running out of memory in my game with cocos2d.I have 4 scenes. two vanish from memory when I switch scenes using [[CCDirector sharedDirector]replaceScene:sceneWithTransition]I’ve tried push/pop and it makes the problem about 10x worse. 2 of the scenes however are like a virus. The conditions under which I can remove them from memory do not exist. I am using the ARC alterations. I was hoping they would help, they did not.I’ve overridden the cleanup method

  • Dave Branton
    python leak wx
    I’m some way into building a fairly complex wxPython app using ode for physical modelling, openGL for rendering, and wx for UI. Everything was going swimmingly until the application started to crash. After a few days of making no progress I finally noticed that my application was leaking memory. I was able to distill into a smallish example script something that leaks at a quite extraordinary rate:#——————————————————————————- #—————–

  • alex
    android sqlite memory cursor leak
    I have a routine that runs different queries against an SQLite database many times per second. After a while I would get the error “android.database.CursorWindowAllocationException: – Cursor window allocation of 2048 kb failed. # Open Cursors = ” appear in LogCat.I had the app log memory usage, and indeed when usage reaches a certain limit the I get this error, implying it runs out. My intuition tells me that the database engine is creating a NEW buffer (CursorWindow) every time I run a query, a

  • Ayush
    ios objective-c memory leak
    I have a simple function to create an UIImage with special size :- (UIImage*)imageWithSize:(CGSize) imSize {UIGraphicsBeginImageContext( imSize );float r = 0.5f;float g = 0.5f;float b = 0.5f;CGContextRef cxt = UIGraphicsGetCurrentContext();CGContextSetRGBStrokeColor(cxt, r, g, b, 1.0);CGContextSetRGBFillColor(cxt, r,g,b, 1.0);CGContextFillRect(cxt, CGRectMake(0.0, 0.0, imSize.width, imSize.height));UIImage* retImg = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();return r

  • Mark Bernstein
    xcode cocoa debugging instruments
    From time to time, one of my apps experiences a delay of 2-10sec whilst dragging an object in a complex view. In some cases, the delay is sufficient to cause the wait cursor (spinning pizza of death) to appear.Time Profiler reveals nothing very remarkable — just the expected drawing calls to update the view as the object is dragged. (This is a lot of computation, but I see no obvious difference in the profile during pauses and between pauses.)Memory profiler reveals nothing special about the pa

  • nschum
    iphone ios4 instruments ios-ui-automation
    I am currently using IOS SDK 4.0.2 and learning how to do UIAutomation. Unfortunately I found that in the Simulator, when I try running a simple Java script test (that just assigns variables) I get the following error.Unexpected error in -[UIATarget_0x5d04f60 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Framework/UIATargetElements.m line 437,Here is the “Script” I was trying to runfunction iDontDoAnything() {var target = UIATarget.localTarget();var app = target.frontMostApp();var

  • benwad
    iphone objective-c memory-management memory-leaks instruments
    From using the Allocations instrument to track my app’s memory usage I’ve noticed that throughout the runtime of the app the memory usage keeps going up. Looking through the heapshots I can see that the largest chunks of memory are being allocated by a method called CJPEGCreateImageDataWithData in the library GMM. I can’t find anything online about this happening, but it certainly looks like this is responsible for my app’s memory-hogging. Here’s a screenshot of the pertinent part of the Allocat

  • qnoid
    linker clang instruments
    clang –versionApple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)Target: x86_64-apple-darwin13.0.0Thread model: posixI’m looking to compile a file linking it against a “plugin” under /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/Running file /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/MemoryPlugin.bundle/Contents/MacOS/MemoryPluginReturns /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/

  • Stan Sieler
    iphone console leak instruments xcode-instruments
    I’m running the Mac OS “Instruments” app, using the “Leaks Instrument” to monitor an iPhone app. The major pane is titled “Leaked Blocks”, but if you click on that you get a choice of three: “Leaked Blocks”, “Call Tree”, and “Console”. Click on “Console”.You now have a blank pane … click in it and hit . In my case, I get:foo (4259) >which is my app name and, presumably, the PID it’s running as.I can enter commands/text (e.g., ls, help, exit) … they get echoed after awhile but nothing else

  • Dan Abramov
    monotouch instruments xamarin dsym
    I want to profile a MonoTouch application in Instruments without an iPad. I am able to profile an app compiled for Simulator but it’s no fun without the symbols:There is no option to generate IPA with dSYM in project build settings-looks like they’re only available when compiling for the device.All I want is a MonoTouch-aware dSYM for Simulator. Is this possible?

  • middaparka
    iphone xcode profiling instruments
    I’ve been experimenting with Instruments off and on for a while and and I still can’t do the following (with any sensible results): determine or estimate the average runtime of a function that’s called many times.For example if I’m driving my gameLoop at 60 Hz with a CADisplayLink I’d like to see how long the loop takes to run on average… 10 ms? 30 ms etc. I’ve come close with the “CPU activity” instrument but the results are inconsistent or don’t make sense. The time profiler seems promisi

  • Jojas
    objective-c ios xcode testing instruments
    I wonder how the professional application that provided to customer is such elegant , smooth and less or no application crash. because I always see the problem is mostly about memory leaking, NSZombie or not good enough performance.I see it’s great to fix some problem with Instruments Tool. But I just be familiar with memory leaks and zombie template. Of course, I think there are other interesting tool to trace and fix our application better. (System usage, Automation Testing, etc.. Any ideas?)M

  • dommer
    iphone profiling monotouch instruments
    I’m trying to use Instruments to look at resource usage in my Monotouch app. However, I can’t get the app to launch through Instruments.When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it’s a debug build), then crashes – and Instruments reports:Target failed to run: Remote exception encountered : ‘Failed to get task for pid 384’The app runs fine when I launch it directly on the phone.I’ve tried it with debug builds and ad hoc builds (using the parame

  • Josh Brown
    objective-c xcode ios instruments
    I watched Apple’s WWDC 2010 video on Advanced Memory Analysis with Instruments and from that, I was able to find a lot of resident dirty memory. I realize that having so much resident dirty memory is a bad thing (and probably the explanation for my app crashing so much…), but I’m not sure how to fix it. Where should I look?Instruments shows me a lot of potentially useful information that looks like gibberish to me, such as:% of Res Type Resident Size 18% VM_ALLOCATE

  • Stan Sieler
    iphone console leak instruments xcode-instruments
    I’m running the Mac OS “Instruments” app, using the “Leaks Instrument” to monitor an iPhone app. The major pane is titled “Leaked Blocks”, but if you click on that you get a choice of three: “Leaked Blocks”, “Call Tree”, and “Console”. Click on “Console”.You now have a blank pane … click in it and hit . In my case, I get:foo (4259) >which is my app name and, presumably, the PID it’s running as.I can enter commands/text (e.g., ls, help, exit) … they get echoed after awhile but nothing else

  • Debugger

  • Tom Dignan
    ios profiling instruments xcode-instruments
    I really like developing for iOS more than Android. However, android SDK has a great tool for profiling, called Traceview:It can not only help to find bottlenecks, but can also show which method was running in specific moment in each thread. This can be very helpful in profiling and debugging. For example, if my app crush at some moment, I can easily see what was happening before the crash in each thread.Is there are any tool for iOS that can do similar things? I tried TimeProfiler and Sampler i

  • Toro
    iphone xcode4 xcode-instruments
    When I used Instruments tool to monitor my memory usage, I found a process named DTMobileIS use about 40% of real memory, and then there were not enough memory for my app so it crashed. I am curious about this DTMobileIS means for. Does anyone know about it?Edit: It seems like DT is the prefix of Debug Tool. And according to this link, IS sounds like the abbreviation of Instruments.

  • Avner Barr
    ios objective-c uicollectionview uicollectionviewcell xcode-instruments
    I have a gallery in my app utilizing a UICollectionView. The cells are approximately 70,70 size. I am using ALAssets from the ALAssetLibrary in the gallery which I have stored in a list. I am using the usual pattern for populating the cells:-(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {mycell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];mycell.imageView.image = [[UIImag

  • Brad Larson
    ios instruments ios-ui-automation xcode-instruments
    When I try to run a UI Automation script on iOS 5 devices I am getting the following error:”An error occurred while trying to run the script.”The same script is running perfectly in the simulator or on an iOS 4.3.3 device.How can I solve this problem?

  • satheeshwaran
    uitableview scroll segmentation-fault xcode-instruments
    I use a UITableview to load array of images in a UIImageView embedded in the tableview cell and also load text to UILabel at each row in iPhone.The array size is around 40+. when I scroll UITableView in simulator/device and click each row manually everything is fine.The problem is when i check the same via XCode-Instruments the app crashes(after scoll and selection of any row).The error thrown is generally “Segmentation fault 11”.What could be the possible reason for this???PS:comparing to simu

  • LampShade
    c# ios monotouch monodevelop xcode-instruments
    I’m making an iOS game in Monotouch with C# and MonoDevelop. I’m having a very strange crash. Background Information: Making a 2D war game. I’ve implemented Dijkstra’s algorithm to calculate the shortest path from source to destination with objects in-between (example: go from here to there but go around the cars/trees/buildings/or anything in the way automatically). My crash seems to be related to the 2D array of bytes that I created for this implementation of Dijkstra’s algorithm. See th

  • David Ben Ari
    ios objective-c memory-management asihttprequest xcode-instruments
    I submited an app to the app store and it was rejected due to:”We found that your app crashed on iPhone 5 running iOS 6.1.2, which is not in compliance with the App Store Review Guidelines.Your app crashed when we:when the user taps to sign into the app, a crash is produced.This occurred when your app was used: On Wi-Fi On cellular networkYour app may encounter this issue if it is using too much memory. To learn more about iOS memory usage and how to track memory usage and leaks, please see the

  • akrant_iOSDeveloper
    iphone ipad ios4 xcode-instruments
    Hi Everyone , My application is running fine in iPad. but when i am running app using instruments time profiler, its getting crash . What may be the reason? I saw some help like App crashes on certain actions when using instruments, how to find reason?But didn’t get much help .

Web site is in building