ios,memory,crash,instruments,profilerRelated issues-Collection of common programming errors


  • Brad Larson
    ios core-graphics cgbitmapcontext
    if I’ll test a function of my app in the ios-simulator the simullator crashes. This is the error: Apr 12 22:18:57 Pattis-MacBook-Pro.local CameraAPP[12374] : CGBitmapContextCreateImage: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.Hope

  • Amar
    ios xcode5
    My application is properly working on iPad and simulator. It doesn’t show any error and builds successfully.Problem: When I am archiving my project it’s giving me this error./Users/synapse/Desktop/myProject/myProject_Prefix.pch:15:13: fatal error: ‘BoxSDK/BoxSDK.h’ file not found #import <BoxSDK/BoxSDK.h>^ 1 error generated. Command /Applications/Xcode5-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1How can I resolve this issue?

  • user3344322
    ios objective-c
    I’m using this code for hide focus on UITextField:-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{[CampoDeTexto resignFirstResponder]; }When I click on the screen, the code hide the virtual keyboard, but when I click in the UITextField I receive this messange:UITextField[1260] : CGContextSetBlendMode: invalid context 0x0.This is a serious error. This application, or a library it uses, isusing an invalid context and is thereby contributing to an overalldegradation of system stabi

  • neilco
    ios objective-c
    I have been working on this project for the last week and everything has been running fine in the simulator. Just this evening when I went to run it, I got this whole raft of brand new errors, and the only code that I have added since the last smooth build / simulation was the following to add a dictionary from a file that I just created. I am definitely in the steep part of the learning curve on Objective-C and Xcode, and these errors do not ring a bell at all because I haven’t used any of the

  • shaik riyaz
    ios objective-c xcode core-data
    The Xcode compiler keeps on telling me that I am missing a bracket before the F in FATAL (error commented out), but I can’t make sense of this. Can you tell me what’s missing or needs to change?-(void)viewDidLoad {// 1NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];// 2NSEntityDescription *entity = [NSEntityDescriptionentityForName:@”Location”inManagedObjectContext:self.managedObjectContext];[fetchRequest setEntity:entity];// 3NSSortDescriptor *sortDescriptor = [NSSortDescriptor so

  • user1134797
    iphone ios gcc monotouch
    I have developed a MonoTouch iPhone application. Currently it works by parsing a large amount of xml data that generates all of my objects. I tried to improve the start speed by serialising these objects and storing in an sql lite database. But this was actually slower. What I have done instead is to write a program that pre-parses this xml and in turn writes out class files that can simply be compiled and the objects instantiated at runtime.This works and is a huge speed increase, but I can on

  • connor
    ios xcode facebook cordova sdk
    everyone!So… I just made an app using cordova to compile an xcode project. Ok.The app works fine, when the facebookSDK.framework isn’t in the project. The pages does not load just because the user has to be logged into facebook. Whatever… But when I insert the facebookSDK.framework (downloaded from developers.facebook.com), I got a Build Fail and the following error:ld: 475 duplicate symbols for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)I

  • iOS
    iphone ios xcode
    i am working on iphone app, at once it started showing me error, with no exception, i am really afraid of this error, can any one tell me why this is happening?<Error>: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming up

  • Jules
    ios objective-c cocoa-touch
    I’m getting the following error from the code below and I’m not sure why.Fatal Exception NSRangeException -[__NSCFString replaceOccurrencesOfString:withString:options:range:]: Range {0, 7} out of bounds; string length 6I wondered if someone could explain ?Is it just that I need to new NSRange variable to cater for the different string length ?+(double)removeFormatPrice:(NSString *)strPrice {NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init];[currencyFormatter setNumberStyle:

  • Juan David Saab
    ios cordova xcode5 phonegap-build command-line-tool
    I installed NodeJS and phonegap to start working on version 3.0. The first time I tried, I successfully run the sample app on the iOS simulator. Later I try to replace the contents of the /www directory on the Xcode project and it never runs again. Since that I have tried to build the sample “Hello World” a lot of times but I always got this error:In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Libra

  • Iason
    database wordpress memory
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /public_html/wp-includes/functions.php on line 3559Has anybody any idea what this could be and why it appears when I hit the login button on the WordPress admin panel? Also the website doesn’t behave like before, it seams like the database is corrupted or something is terribly broken. It shows only the front page correct moste other pages are broken?I found some more error’s no idea what the error is ab

  • Noam
    php memory
    This question already has an answer here:PHP: Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)11 answersI’m getting this error Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes)How come he tried to allocate 4194304 (which is smaller than the limit he specifies 134217728) and is exhausted?

  • Torrrd
    php memory amazon-s3
    Ok, I know how this question has been asked and all. But, heres the thing.I’m already using ini_set(‘memory_limit’, ‘400M’); The file I’m trying to transfer (to Amazon S3) is 245MB The error msg is weird, says allowed mem of 400MB exhausted when it was trying to allocate 239MB.. isnt that the other way round?The script I’m using is a library out there, to communicate with the Amazon S3Help please!EDIT Ok heres the code, as you can see I’m not doing much, its all about the script I’m using.. That

  • Eugene Shmorgun
    memory joomla
    I have site on Joomla, which was installed from another server : I copied all files, transfered their to var/www and discovered. After this I add MySQL-dump from another server to new MySQL database. That’s OK – I can enter to admin-panel and even see the my materials that I need.But when I try to see the site – I found 500 Error, that was misundstanding for me. Then I added ini_set(‘display_errors’,’On’); error_reporting(E_ALL); to index.php to check what’s happenng with my site and was shocke

  • Ocramius
    apache memory heap fatal-error
    Since today all websites that are running on our Linux VPS are randomly showing an error like:Fatal error: Out of memory (allocated 12345) (tried to allocate 123456789 bytes) in /home/path/file.ext on line 123When refreshing the page it disappears and everything seems to work fine again. But after a while it shows up again.The error log of Apache:[Fri Feb 15 16:21:07 2013] [error] (12)Cannot allocate memory: fork: Unable to fork new process[Fri Feb 15 16:21:17 2013] [error] (12)Cannot allocate m

  • Burhan Ali
    php memory csv memory-management phpexcel
    Im trying to implement Converting single sheet in an XLS file to CSV with PHPExcel – Memory exhausted but im still running into memory problems.Think @BT643 code – which I used – includes most of the golden rules explained by @Mark Baker in various posts compiled in his answer (phpexcel Allowed memory size of 134217728 bytes exhausted).My excel file has 61 columns and about 8000 lines, so some half a million cells. Size 5561KB. I would not expect it require reading “chunks”.What am I missing?Her

  • PeeHaa
    image wordpress memory php
    Please can you help me. I’ve got this fatal error in WordPress. My site has been on for years and worked until a few days ago, This happened when I updated the network and my wordpress multi user install? It only does it on the main site, as it works fine on the sub sites.Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4890018 bytes) in /home/artygirl/public_html/wp-includes/media.php on line 258It can’t be the memory limit as I fixed that ages ago.

  • Kenny
    php memory ini sqlanywhere
    At first, I’ve already looked at this, this and this.I’ve received the following error:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 220 bytes)I’m working with php 5.4and sql Anywhere 11.The solution to this is according to this is putting ini_set(‘memory_set’,-1); in my php-file, but after doing this I get another error:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes)EDIT: my code is<?phpini_set(‘memory_set’,-1);$con

  • animuson
    php memory
    Possible Duplicate:Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php Hi,In my php page, I got the error as follows,Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) I tried to set memory limit using ini_set(‘memory_limit’, ‘128M’);But still I got the error.Any help would be really appreciated.

  • Adham
    php algorithm memory
    I am using Dijkstra algorithm in PHP. But I got this error Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 35 bytes) in C:\AppServ\www\direction\dijkstra.php on line 100how can I optimize this algorithm to reduce memory consumption <?php ini_set(‘memory_limit’, ‘1M’); //Raise to 512 MB ini_set(‘max_execution_time’, ’60’); //Raise to 512 MB class Dijkstra { var $visited = array(); var $distance = array(); var $previousNode = array(); var $startnode =null; var $

  • kaichi
    crash catalyst xserver vga floating-point-exceptions
    I’m not really sure, but i think the problem is in VGA driver (AMD Catalyst). Everytime i drag something like, i try to change positions of docky application launcher to left or right or to erased the application launcher, and when i want to create buttons or other things (make an application) with drag the widget list on palette (in this case with Eclipse)http://i.imgur.com/eJQoqb2.pngJust for Docky and Eclipse that caused my screen will be logout suddenly (X server crashes) when i dragged (lik

  • user1344545
    java android crash deserialization kryo
    I used normal serializing and deserializing so far, which worked fine in my Android Project. I now like to use kryo serializing/deserializing to have better performance. I simply changed my code to use kryo. Following code I use and seems to works and my object (ThemeCache) is properly deserialized. I can see the data in debugmode. but after some miliseconds during a Log.v(“DEBUG”,”deserialized”) statement I get a 04-17 07:24:28.609: A/libc(12577): Fatal signal 7 (SIGBUS) at 0x00000000 (code=12

  • Joris Weimar
    android crash drawing samsung-mobile android-4.3-jelly-bean
    I get a Fatal signal 11 (SIGSEGV) code=1 whenever I draw a filled polygon that crosses the screen bounds. This happens on OS 4.3 on a Samsung Note 10.1. What could cause this? I assume the OS should be able to clip polygons.The offending code:public SplashStarShape(Context context, int x, int y, int size) {super(context);paint = new Paint();star = new Path();star.setFillType(Path.FillType.WINDING);paint.setAntiAlias(true);paint.setStrokeWidth(DS.scale(10));paint.setColor(EslColors.WHITE);int k =

  • SoapBox
    iphone objective-c crash
    I’m writing an iPhone App with a webserver in it. To handle a web request, I take the web request and write() to it the data that I want to send back.When I try to download a moderately sized file (3-6MB) it works fine, but if I cancel the download halfway through, the app crashes and leaves no trace of an error. I’m thinking that the file descriptor becomes invalid halfway through the write, and causes the crash. I really don’t know if this is what causes the crash, i’m just assuming.I’m basing

  • user2812829
    android c memory crash android-ndk
    I am using this project to code a music streaming-application on android devices: https://github.com/spotify/psyonspotifyUnfortunately, my app crashes randomly. I have tried to debug the c-code with ndk-stack. According to the output the problem lies in the following line:assert(SL_RESULT_SUCCESS != result);(l.92 in sounddriver.cpp). I have tried to change and/or comment this line out, but the error still remains…It seems to be some kind of problem related to incorrect memory allocation but it

  • Bryce Thomas
    kernel-panic crash
    I’m running an Ubuntu 12.04 machine with an Intel i7 CPU. Every now and then, it freezes up completely — the machine and display stay on for a minute or so, the audio that was playing (if any happened to be playing) starts looping and then it reboots. While this typically happens under moderate to high load, it also happens occasionally when nothing is running. The crash occurs regardless of whether the Intel XMP 1333 MHz boosted to 1600 MHz memory setting is turned on in the BIOS. I haven’

  • pranay
    java memory-leaks crash stack-trace jre
    I am using an open source JAVA based crawler which juggles millions of URI objects between the memory and disk. Basically the program is memory intensive. The crash occurs once in a blue moon, I haven’t been able to find the reason.Pasting a part of the error-log, any pointers what possibly is causing this?# A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002b97ee1a07df, pid=1445, tid=1102055744 # # JRE version: 6.0_18-b07 # Java VM: Java HotSpot(TM)

  • magicandre1981
    windows-7 memory crash
    Just bought this PC used from a guy, it has the following config:AMD FX-8120 HD 7850 2GB Core Edition (4x) OCZ Gold Edition 2GB DDR3 1066Mhz Asus M5A78L LEThis PC should run games like GTA IV and Skyrim without lag, according to benchmarks. But it lags. It’s playable, but there’s a LOT of FPS drops everytime. Temperatures are low. This is my first issue. The second is the random crashes.Ran MemTest for 10 hours, results:THE BSOD that pops up from time to time:MEMORY_MANAGEMENT (most frequent) IR

  • Jan Hudec
    windows crash
    I have a windows service (CI server) that runs some programs. They have console output (captured by the service), but some are console or gui depending on options and most display the standard system “fatal application error” dialog if they crash.Now when running from the service, something occasionally hangs. Is there:A way to find whether it crashed and is hanged in the “fatal application error” dialog? A way to prevent those dialogs and have the application instead simply return with non-zero

  • DGDD
    lion macbook-pro crash
    Out of nowhere, my MacBook Pro 2011 unibody running 10.7.5 began to crash. After the crashes, in the boot sequence you could see very thin horizontal red lines. The red lines were so thin that I can’t take a picture as the lines won’t show up in photos. While you could see the red lines across the screen, the computer will not boot up, not even to recovery. After leaving the computer off for a few hours, it will boot-up like nothing happened.After diagnosis of the whole comp, it turned out I had

  • user2713004
    ios testing air automation instruments
    I have an AIR application, that I can package and install and run on the iPhone simulator via the ADT’s.I want the use the xcode instruments automation, however, when I target the MyApp.app file that was packaged for the simulator, it will not work. ANY HELP WILL BE GREAT.Here is some info on what happens when the instruments trys to run:info: [INST STDERR] 2013-10-10 13:11:00.320 instruments[4735:707] * Assertion failure in -[UIAInstrument _startAgentForApp:withPID:], /SourceCache/AutomationIn

  • 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

  • GeeKay
    java multithreading profiler jconsole jstack
    I am trying to profile my java application running on eclipse using ‘jconsole’. But i am unable to do so and i get the following exception Exception in thread “VMPanel.connect” java.lang.InternalError: Remote thread failed for unknown reasonat sun.tools.attach.WindowsVirtualMachine.enqueue(Native Method)at sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.java:96)at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:217)at sun.tools.attach.HotSpot

  • Peter Mortensen
    c++ visual-studio-2008 profiler
    Are there any good, free (or at least reasonably cheap) profilers for at least native C++ that can integrate with Visual Studio 2008 Professional?I looked at DevPartner community edition but they seem to only support Visual Studio 2003 and Visual Studio 2005.Failing that are there any good free/cheap profilers in general that I can get working with VS with relativly little friction?

  • djechlin
    java profiler
    I run:~/dan/java/hello $ java -javaagent:shiftone-jrat.jar -cp ‘..’ hello.helloand get (within longer trace output):Exception in thread “main” java.lang.VerifyError: Expecting a stackmap frame at branch target 35 in method hello.hello.main([Ljava/lang/String;)V at offset 14at java.lang.Class.getDeclaredMethods0(Native Method)at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)at java.lang.Class.getMethod0(Class.java:2685)at java.lang.Class.getMethod(Class.java:1620)at sun.launcher.Launc

  • Alex Glazunov
    java profiler
    I’m just curious really, there doesn’t seem to be any counter arguments. So should a profiler be used for everything? I’d imagine the performance gain would require make it beneficial every time.

  • Maxim Veksler
    java profiler ctags dynamic-invoke
    Today’s world of dynamic invoke, reflection and runtime injection just doesn’t play well with traditional tools such as ctags, doxygen and CDOC.I am searching for a method call hierarchy visualization tool that can display both static and dynamic method invocations. It should be easy to use, light during execution and provide helpful detailed information about the recorded runtime session.Now I guess Callgrind could be considered a valid solution for the family C.What tool / technique could you

  • unwind
    profiler
    I need a tool to measure a program’s running time, like gprof. But the resolution of gprof is not good enough (about 0.01 second). oprofile seems can do it, I will try to learn how to get the data about the time info, but I can’t.So, who can tell me the steps how to do it, or anyone knows other tool can do the same thing?

  • thkala
    java profiler hprof
    I am trying to selectively monitor/profile a Java application when certain runtime conditions are met. I am already able to dump the heap on-the-fly using the HotSpotDiagnosticMXBean, which has been quite useful.I am now trying to do something similar with CPU profiling, hoping to more effectively target specific code paths. I have some experience with the command-line HPROF interface and the NetBeans profiler, but both need to be started beforehand.Is there a way to activate the HPROF profiler

  • László Citrus Nagy
    c profiler
    can you tell me please, what is wrong with this code http://pastebin.com/A2upK4Lx? Cause it gives me Runtime: 0.00000, and that is weird, because I didnt spot an error there. Is it possible, that the code is fine, but the code executes so fast, that even C cant print it out (but I think that is highly unlikely)?thank you guys for answer.

  • Jimbo
    sql sql-server-2008 profiler sqlprofiler
    I have to debug a long running SQL Server stored procedure which dynamically builds and executes queries at runtime. I want to run a trace so I can see all of the individual pieces of SQL that are executed.Which events will provide that level of detail?I’ve been advised to use Stored Proc: RPC Completed; Batch Completed and Batch Started. But that’s only bringing back the initial execution statement. ie. literally “exec MyStoredProcName”.Any ideas?Thanks In Advance.

  • Joel Coehoorn
    c++ .net profiler
    I run Windows XP SP3 on my virtual machine. There I use Visual C++ Express a CLR profiler for .net 2.0 I run x86 profiler(choosing between x86 and x64), choose simple Visual C++ application which outputs 1000 times “Hello world” string.What the profiler does is shows the message “Waiting for application to start command language runtime” and nothing more.So, what’s the problem?

Web site is in building