在0xdeadbaad致命的信号11(SIGSEGV)(code = 1)错误 [英] Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) error

查看:131
本文介绍了在0xdeadbaad致命的信号11(SIGSEGV)(code = 1)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个游戏项目的android与andengine像FruitNinja中,我使用从底部抛出图像顶部 项目工作正常,但有时这给错误 我用的System.gc(),但没有帮助

致命的信号11(SIGSEGV)在0xdeadbaad(code = 1)

我的code是

 私人无效throwHardware(最终浮动像素,最终浮动PY){

    最后FixtureDef boxFixtureDef = PhysicsFactory.createFixtureDef(0.1F,
            0.5F,0.5F);
    boxFixtureDef.filter.categoryBits = 0×0002;
    boxFixtureDef.filter.maskBits =×0004;
    boxFixtureDef.filter.groupIndex = 2;
    随机RNG =新的随机();
    generated1 =新的ArrayList<整数GT;();
    R = rng.nextInt(8);
    Log.e(Integer.toString(r)的R);
    如果(R == 0){
        硬件=新的Sprite(PX,PY,JAVA,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [活动] =新的Sprite(PX,PY,JAVA,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){

                    若(a == 0){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        错误();
                        题();

                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则如果(R == 1){
        硬件=新的Sprite(PX,PY,脸谱,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);

        mHardware [活动] =新的Sprite(PX,PY,this.facebook,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    如果(一个== 1){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        错误();
                        题();
                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则如果(R == 2){
        硬件=新的Sprite(PX,PY,机器人,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [活动] =新的Sprite(PX,PY,机器人,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    如果(一个== 2){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        错误();
                        题();

                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则,如果(R == 3){
        硬件=新的Sprite(PX,PY,USB,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [活动] =新的Sprite(PX,PY,USB,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    若(a == 3){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        错误();
                        题();

                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则,如果(R == 4){
        硬件=新的Sprite(PX,PY,谷歌,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [激活] =新的Sprite(PX,PY,谷歌,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    若(a == 4){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        题();
                        错误();
                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则,如果(R == 5){
        硬件=新的Sprite(PX,PY,RAM,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [活动] =新的Sprite(PX,PY,RAM,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    若(a == 5){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        题();
                        错误();
                    }
                    返回true;
                }
                返回true;
            };
        };
    }否则,如果(R == 6){
        硬件=新的Sprite(PX,PY,CD,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [活动] =新的Sprite(PX,PY,CD,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    若(a == 6){
                        得分了();
                        删除();
                        题();
                    } 其他 {

                        删除();
                        错误();
                        题();
                    }
                    返回true;
                }
                返回true;
            }

        };
    }否则,如果(R == 7){
        硬件=新的Sprite(PX,PY,三星,
                this.getVertexBufferObjectManager());
        身体= PhysicsFactory.createBoxBody(this.mPhysicsWorldg,五金,
                BodyType.DynamicBody,boxFixtureDef);
        mHardware [激活] =新的Sprite(PX,PY,三星,
                this.getVertexBufferObjectManager()){
            @覆盖
            公共布尔onAreaTouched(的TouchEvent pSceneTouchEvent,
                    浮X,浮动Y){
                如果(pSceneTouchEvent.isActionDown()){
                    若(a == 7){
                        得分了();
                        删除();
                        题();
                    } 其他 {
                        删除();
                        错误();
                        题();
                    }
                    返回true;
                }
                返回true;
            };
        };
    }

    mHardwareBody [激活] = PhysicsFactory.createBoxBody(
            this.mPhysicsWorldg,mHardware [活动],BodyType.DynamicBody,
            boxFixtureDef);

    scene.attachChild(mHardware [激活]);

    this.mPhysicsWorldg.registerPhysicsConnector(新PhysicsConnector(
            mHardware [活动],mHardwareBody [活动],真,假));

    Vector2速度= Vector2Pool.obtain(-1,-16);
    body.setTransform(速度,85);
    mHardwareBody [激活] .setLinearVelocity(速度);
    Vector2Pool.recycle(速度);
    this.scene.registerTouchArea(mHardware [激活]);

}
 

解决方案

有什么地方损坏或未初始化。 0xdeadbaad 看起来像调试/定点地址中的一个像 0xdeadbeef 0xbaadf00d

有些事情,你可能想看看是堆损坏。据维基百科HexSpeak页面

  

0xDEADBAAD (死差)所使用的是Android的libc中止()函数,当检测到本机堆损坏。

有没有在你的问题真的足够的信息来给出具体guidanve固定这样的问题,它可能是值得联系AndEngine的BOD,看看他们认为,假设它的东西,不会引起他们的code(或您的$通过他们的C $Ç间接的)。

i am on a game project in android with andengine like FruitNinja in which i am using to throw images from bottom to top project is working fine but giving error this sometimes i used System.gc() but not helpful

Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)

my code is

private void throwHardware(final float pX, final float pY) {

    final FixtureDef boxFixtureDef = PhysicsFactory.createFixtureDef(0.1f,
            0.5f, 0.5f);
    boxFixtureDef.filter.categoryBits = 0x0002;
    boxFixtureDef.filter.maskBits = 0x0004;
    boxFixtureDef.filter.groupIndex = 2;
    Random rng = new Random();
    generated1 = new ArrayList<Integer>();
    r = rng.nextInt(8);
    Log.e(Integer.toString(r), "r");
    if (r == 0) {
        Hardware = new Sprite(pX, pY, java,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, java,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {

                    if (a == 0) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        wrong();
                        question();

                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 1) {
        Hardware = new Sprite(pX, pY, facebook,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);

        mHardware[active] = new Sprite(pX, pY, this.facebook,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 1) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        wrong();
                        question();
                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 2) {
        Hardware = new Sprite(pX, pY, android,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, android,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 2) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        wrong();
                        question();

                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 3) {
        Hardware = new Sprite(pX, pY, usb,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, usb,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 3) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        wrong();
                        question();

                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 4) {
        Hardware = new Sprite(pX, pY, google,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, google,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 4) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        question();
                        wrong();
                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 5) {
        Hardware = new Sprite(pX, pY, ram,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, ram,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 5) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        question();
                        wrong();
                    }
                    return true;
                }
                return true;
            };
        };
    } else if (r == 6) {
        Hardware = new Sprite(pX, pY, cd,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, cd,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 6) {
                        score();
                        remove();
                        question();
                    } else {

                        remove();
                        wrong();
                        question();
                    }
                    return true;
                }
                return true;
            }

        };
    } else if (r == 7) {
        Hardware = new Sprite(pX, pY, samsung,
                this.getVertexBufferObjectManager());
        body = PhysicsFactory.createBoxBody(this.mPhysicsWorldg, Hardware,
                BodyType.DynamicBody, boxFixtureDef);
        mHardware[active] = new Sprite(pX, pY, samsung,
                this.getVertexBufferObjectManager()) {
            @Override
            public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                    float X, float Y) {
                if (pSceneTouchEvent.isActionDown()) {
                    if (a == 7) {
                        score();
                        remove();
                        question();
                    } else {
                        remove();
                        wrong();
                        question();
                    }
                    return true;
                }
                return true;
            };
        };
    }

    mHardwareBody[active] = PhysicsFactory.createBoxBody(
            this.mPhysicsWorldg, mHardware[active], BodyType.DynamicBody,
            boxFixtureDef);

    scene.attachChild(mHardware[active]);

    this.mPhysicsWorldg.registerPhysicsConnector(new PhysicsConnector(
            mHardware[active], mHardwareBody[active], true, false));

    Vector2 velocity = Vector2Pool.obtain(-1, -16);
    body.setTransform(velocity, 85);
    mHardwareBody[active].setLinearVelocity(velocity);
    Vector2Pool.recycle(velocity);
    this.scene.registerTouchArea(mHardware[active]);

}

解决方案

Something's corrupted or uninitialised. 0xdeadbaad looks like one of those debugging/sentinel addresses like 0xdeadbeef or 0xbaadf00d.

Something you may want to look into is heap corruption. According to the Wikipedia HexSpeak page:

0xDEADBAAD ("dead bad") is used by the Android libc abort() function when native heap corruption is detected.

There's not really enough information in your question to give specific guidanve for fixing such a problem, it may be worth contacting the AndEngine bods to see what they think, assuming it's something being caused by their code (or your code indirectly through theirs).

这篇关于在0xdeadbaad致命的信号11(SIGSEGV)(code = 1)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆