Projects > cpp > Issues > Bug #674

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

games crash on Samsung Galaxy S2

Bug #674 [Closed]
walzer@cocos2d-x.org 2011-08-12 18:56 . Updated about 11 years ago

It’s reported by our developers, many games crash on Samsung Galaxy S2, i9100.

zhangxm 2011-09-27 23:15
  • Target version changed from cocos2d-1.0.1-x-0.9.2 to 9
rubby 2011-12-09 17:35

The same problem on Galaxy S2 here? Do you know why?

clintwood_games 2011-12-10 01:32

Johan Losay wrote:

The same problem on Galaxy S2 here? Do you know why?

We had the same problem.
We modified Cocos2dxAccelerometer to call the native onSensorChanged on the GL thread using Cocos2dxGLSurfaceView’s queuevent. It fixed our crashes, hope this helps.

diegor 2011-12-11 17:30

@Clintwood Games

Do you mind posting your code with the fix you mentioned above?

Thanks!

clintwood_games 2011-12-12 08:31

Diego R wrote:

`Clintwood Games

Do you mind posting your code with the fix you mentioned above?

Thanks!

in Cocos2dxAccelerometer.java in onSensorChanged
replaced:

onSensorChanged(x, y, z, event.timestamp);
with something like this:

      surfaceView.queueEvent(new Runnable() {
            `Override

public void run() {
onSensorChanged(x, y, z, event.timestamp);
}
});

where surfaceView is the instance of Cocos2dxGLSurfaceView

zhangxm 2012-01-18 05:52
  • Target version changed from 9 to cocos2d-1.0.1-x-0.12.0
zhangxm 2012-02-27 09:45
  • Target version changed from cocos2d-1.0.1-x-0.12.0 to 23

I think it is because of CocosDenshion, can refer http://www.cocos2d-x.org/boards/10/topics/7980?r=8056\#message-8056.
Should use opensl to implement CocosDenshion.

walzer@cocos2d-x.org 2012-05-25 08:07
  • Project changed from cocos2d-x to cpp
  • Category deleted (2)
  • Target version deleted (23)
walzer@cocos2d-x.org 2013-04-29 01:24
  • Status changed from New to Closed

Duplicated with bug #1284, it’s caused by Samsung i9100’s audio driver.
We should add limitation when playing effects on i9100 to 32 sources synchronously.

dumber77 2013-10-17 06:07

cocos2d-x CCLabelTTF, CCEditBox crash workaround on Galaxy S2

void CCLabelTTF::setString(const char *string)
{
    CCAssert(string != NULL, "Invalid string");
    if(string == NULL || strlen(string) == 0) {
        string = " ";
    }

    if (m_string.compare(string))
    {
        m_string = string;

        this->updateTexture();
    }
}
track3r 2013-10-21 15:15

Game crashes on Galaxy S2 in CCLabelTTF::setString of string has trailing whitespace.

Atom PDF

Status:Closed
Start date:2011-08-12
Priority:Normal
Due date:
Assignee:-
% Done:

0%

Category:-
Target version:-