timer callback freeze? | developer.brewmp.com timer callback freeze? | developer.brewmp.com

Developer

timer callback freeze?

Forums:

Hi, All,

I have a problem when porting a game, I use ISHELL_SetTimer to set a callback to handle calculations and drawing screen. but the timer is not working well. it freezes sometime, and all is random, the timer is stopped, and EVT_KEY is not received when key pressed.
I have this problem in several handsets, t720, c343, kx414 and 8600. I am trying to solve this problem by set timer at a long interval, and reduce the working in timer callback function, but no use.

I have seen in this forum that someone else had this problem too, but there is no answer for the problem.
Can anyone has some advice?
Thank you for your kindness.

Have you run the app in the BREW Emulator? Does the problem appear there?

Have you run the app in the BREW Emulator? Does the problem appear there?

dunrong wrote:Hi, All,
I have a problem when porting a game, I use ISHELL_SetTimer to set a callback to handle calculations and drawing screen. but the timer is not working well. it freezes sometime, and all is random, the timer is stopped, and EVT_KEY is not received when key pressed.
I have this problem in several handsets, t720, c343, kx414 and 8600. I am trying to solve this problem by set timer at a long interval, and reduce the working in timer callback function, but no use.
I have seen in this forum that someone else had this problem too, but there is no answer for the problem.
Can anyone has some advice?
Thank you for your kindness.
In my experience,
If you take a long time processing, it is possible to miss key events
because your app is not awake to process them. Usually, for me, this
has only happened when experimenting with new routines that
slowed things down to 1-2 FPS on the graphics side until they were
better optimized.
---jeff

dunrong wrote:Hi, All,
I have a problem when porting a game, I use ISHELL_SetTimer to set a callback to handle calculations and drawing screen. but the timer is not working well. it freezes sometime, and all is random, the timer is stopped, and EVT_KEY is not received when key pressed.
I have this problem in several handsets, t720, c343, kx414 and 8600. I am trying to solve this problem by set timer at a long interval, and reduce the working in timer callback function, but no use.
I have seen in this forum that someone else had this problem too, but there is no answer for the problem.
Can anyone has some advice?
Thank you for your kindness.
In my experience,
If you take a long time processing, it is possible to miss key events
because your app is not awake to process them. Usually, for me, this
has only happened when experimenting with new routines that
slowed things down to 1-2 FPS on the graphics side until they were
better optimized.
---jeff

I cannot repeat this problem on emulator.
and the game is running smooth before freeze, user is pressing keys and all of a sudden, game freezed for several seconds and after that game is continue, the timer is continue, (I use ISHELL_GetTimeMs to get time and it seems that it is freezed also), it seems like EVT_APP_SUSPEND has been sent to application and after several seconds EVT_APP_RESUME has been sent to application.

I cannot repeat this problem on emulator.
and the game is running smooth before freeze, user is pressing keys and all of a sudden, game freezed for several seconds and after that game is continue, the timer is continue, (I use ISHELL_GetTimeMs to get time and it seems that it is freezed also), it seems like EVT_APP_SUSPEND has been sent to application and after several seconds EVT_APP_RESUME has been sent to application.

During this time when your app is suspended, is anything drawn to the screen?
Can you confirm what is causing the the EVT_APP_SUSPEND event (is it a single key press, a series of key presses, or multiple simultaneous key presses)?

During this time when your app is suspended, is anything drawn to the screen?
Can you confirm what is causing the the EVT_APP_SUSPEND event (is it a single key press, a series of key presses, or multiple simultaneous key presses)?