Solving random crashes

Try Valgrind (it’s free, open-source): The Valgrind distribution currently includes six production-quality tools: a memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache profiler, and a heap profiler. It also includes two experimental tools: a heap/stack/global array overrun detector, and a SimPoint basic block vector generator. It runs … Read more

How to handle or avoid a stack overflow in C++

Handling a stack overflow is not the right solution, instead, you must ensure that your program does not overflow the stack. Do not allocate large variables on the stack (where what is “large” depends on the program). Ensure that any recursive algorithm terminates after a known maximum depth. If a recursive algorithm may recurse an … Read more

Google Maps Android API v2 – Sample Code crashes

Follow the crib sheet very, very carefully: https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw In particular, I think you need to: Import the actual source for the “google-play-services_lib” project and link it as an Android library. Do this through Project -> Properties -> Android -> Library, Add -> google-play-services_lib (you can right click on your project and choose Properties, then select … Read more

Eclipse continue crashing

Check bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=404776 . I suggest you to upgrade to the newest Eclipse 4.3 (Kepler). Alternativelly you can try workaround suggested in comment #6: For a workaround add the following to the end of your eclipse.ini -Dorg.eclipse.swt.browser.DefaultType=mozilla

In App Purchase Crashes on [[SKPaymentQueue defaultQueue] addPayment:payment]

The error message indicates a message is being sent to a deallocated instance of InAppPurchaseManager, which is your class. And it’s happening after you open the view (creating an instance), close the view (releasing an instance), then opening the view again (creating a second instance). And the problem is happening within the addPayment: call. This … Read more