Cocos2d App is Freezing - cocos2d-iphone

I'm creating a game app using cocos2d Chipmunk. The app is working normally but after 30 to 40 seconds the app becomes unresponsive(app freezes) without any error log.
Can any tell me why this is happening and how to overcome this problem.
Please tell me the code also.
Thanks in advance..

i got the solution. i was using timers but was not unscheduling them that's why app was freezing. now it is working fine after unscheduling that timers.

Related

GStreamer Tutorial 1 - hear sound but no video

I'm continuing my journey through GStreamer and am stuck once again. I'm running the first tutorial and can hear sound but no video.
The error that I'm seeing is:
gldisplay gstgldisplay_cocoa.m:175:gst_gl_display_cocoa_setup_nsapp: Custom NSApp initialization failed
Am I missing a plugin or some required library here? I'm on an M1 Mac.
I should note, that via the command line everything works just fine.
gst-launch-1.0 playbin uri="file:///Users/vukasin/Downloads/sintel_trailer-480p.webm"
Maybe this is OpenGL related? I'm guessing its trying, and failing to open the video.
I just figured out what was going on with this error after spending hours thinking my system was not setup correctly. This issue is that a GMainLoop must be ran for the windowing to work correctly from the main thread. Interesting enough the tutorial 12 does it correctly and does the same exact thing. https://gstreamer.freedesktop.org/documentation/tutorials/basic/streaming.html?gi-language=c

cocos2d-x crashes during visit() calls

I have cocos2d-x app crashing time after time. Crash happens in random cases, even in idle state — I can leave app in simulator and after 2-5 minutes it may crash with no user interaction.
The sad thing — it crashed in production, too. I use Crittercism crash reporting SDK and it shows the same stack.
More, I tried cocos2d-x samples bundled with cocos SDK, they crash the same way.
Here I included some screenshots to show up the stacks:
https://dl.dropbox.com/u/5480488/cocos2dxcrash1.png
https://dl.dropbox.com/u/5480488/cocos2dxcrash2.png
+cocos2dxcrash3.png
And yes, it affects (almost?) all available versions of Cocos and iOS. Currently it crashes in latest cocos2d-x and iOS 6.1.3.
SOS, please!
I bet you are running your app on a simulator.
Running on a device will solve it. :P
Thought I don't know the exact reason. I have met the same problem before.

Traking / Debugging issues on a LIVE web site

We work for a website and regularly we face some issues in LIVE. Hence we need to come up with an concept of easily being notified of issues occurring in LIVE rather after it gets escalated to sever level.
Say, we want to get notify / alerted of any failures that happens in LIVE for a flow - so how do we track these? Is there a framework that does so or there is an specific mechanism to achieve it?
Thanks in advance.
u can use some application development platforms like visual basic, netbeans, eclipse for development of application which will help you to debug the complete code by using method breakpoints in case it is nt running as expected.

Mailing in box2d (iphone) application

I am developing a box2d(iphone) application in xcode. Can any one suggest me a sample code on how to take a screenshot in a box2d project. I found the code for view based application but couldn't find it for a cocos/box2d. Thanks in advance
This forum thread on the cocos2d-iphone website should give you what you need: http://www.cocos2d-iphone.org/forum/topic/1722/page/2

Cocos2d on application start gives random fps drop?

I am developing an iphone game using cocos2d and have it set to to show the FPS. Now most of the time the application will start and run at 60 fps, However apparently randomly sometimes the application will start and top at only 40 fps.
This does not happen often and seems to happen only when you quit the application and restart it as soon as possible, allthough this does not trigger the effect most of the time. But after a few quick quit-restart sequences the game eventually starts and has only 40 fps instead of the normal 60. If I quit the application at this point and wait for about 3 seconds it will again start with the normal 60 fps.
I am assuming this has something to do with the application not being able to free all of its memory before starting again?, this problem seems to be related to the iPhone OS.
It is important to note that this never happens if I quit the application wait 5 seconds and restart. Has anyone had this sort of problem before?. Any ideas of why this might be happening?.
If anyone is wondering this is because there used to be a bug when emulating the OPEN GL 2.0 in the iPhone 3GS/iPod Touch 3G, this has been fixed for OS 3.1. And all you have to do is the following:
// Try to use CADisplayLink director
// if it fails (SDK < 3.1) use Threaded director
if( ! [Director setDirectorType:CCDirectorTypeDisplayLink] )
[Director setDirectorType:CCDirectorTypeThreadMainLoop];