cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

cocos2d game crashed in Samsung DEX mode. #18170

Open Namyi opened 7 years ago

Namyi commented 7 years ago

Some COCOS2d game crashed in Samsung Dex mode. When I launch some game, Crash occurred Please refer to below log

06-24 17:04:22.140 13645 13645 F DEBUG : pid: 13464, tid: 13495, name: GLThread 72 >>> com.gtarcade.loa.ph <<< 06-24 17:04:22.140 13645 13645 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 06-24 17:04:22.140 13645 13645 F DEBUG : r0 00000000 r1 e4e4dcac r2 00430000 r3 c7bdf108 06-24 17:04:22.140 13645 13645 F DEBUG : r4 d6a50b08 r5 e4e4dfe0 r6 e4e4dd88 r7 e4e4dd48 06-24 17:04:22.140 13645 13645 F DEBUG : r8 e4e4dfe0 r9 d49f8a00 sl d49f8a8c fp e4e4dc9c 06-24 17:04:22.140 13645 13645 F DEBUG : ip c7420020 sp e4e4dc98 lr c742002c pc c742002c cpsr 600b0010 06-24 17:04:22.144 13645 13645 F DEBUG : 06-24 17:04:22.144 13645 13645 F DEBUG : backtrace: 06-24 17:04:22.144 13645 13645 F DEBUG : #00 pc 0069a02c /data/app/com.gtarcade.loa.ph-1/lib/arm/libgame.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause+12) 06-24 17:04:22.144 13645 13645 F DEBUG : #01 pc 00815a05 /data/app/com.gtarcade.loa.ph-1/oat/arm/base.odex (offset 0x78d000)

minggo commented 7 years ago

i will try to find S8 to test

Namyi commented 7 years ago

Thank you!
This is occurred when Game goes into onPause as soon as onResume. Because Samsung DEX launch activity as ForcedResizableInfoActivity. So google give a warning popup first. And it makes to move into onPause as soon as in OnResume.

08-17 07:10:34.125 11853 11853 D Cocos2dxActivity: ACTIVITY ON RESUME = Activity OnResume 08-17 07:10:34.125 11853 11853 D Cocos2dxActivity: RESUME COCOS2D … 08-17 07:10:34.126 11853 11853 I am_on_resume_called: [0,com.uuzu.nslm.Nslm,LAUNCH_ACTIVITY] … 08-17 07:10:34.183 11853 11853 D Cocos2dxActivity: ACTIVITY ON PAUSE = Activity OnPause

minggo commented 7 years ago

Because Samsung DEX launch activity as ForcedResizableInfoActivity

What does it mean? Only Samsung DEX do it like this?

Namyi commented 7 years ago

Yes right.

minggo commented 7 years ago

Is there any docs says it?

Namyi commented 7 years ago

what kind of docs do you mean?

minggo commented 7 years ago

Samsung DEX launch activity as ForcedResizableInfoActivity

Namyi commented 7 years ago

No I don`t have

minggo commented 7 years ago

Then how can you make sure that Samsung DEX launch activity as ForcedResizableInfoActivity? And it is a pity that i can not find s8 to test.

Namyi commented 7 years ago

You can find it in log files like below.

/////////////////////////////////////////////////////////////////////////////////////////////// 08-17 07:10:34.062 1213 1306 I am_create_activity: [0,128740244,1366,com.android.systemui/.stackdivider.# ForcedResizableInfoActivity,NULL,NULL,NULL,276824064,com.android 08-17 07:10:34.063 1213 1306 I am_focused_activity: [0,com.android.systemui/.stackdivider.ForcedResizableInfoActivity,startedActivity] ... 08-17 07:10:34.125 11853 11853 D Cocos2dxActivity: ACTIVITY ON RESUME = Activity OnResume 08-17 07:10:34.125 11853 11853 D Cocos2dxActivity: RESUME COCOS2D … ... 08-17 07:10:34.126 11853 11853 I am_on_resume_called: [0,com.uuzu.nslm.Nslm,LAUNCH_ACTIVITY] ... 08-17 07:10:34.183 11853 11853 D Cocos2dxActivity: ACTIVITY ON PAUSE = Activity OnPause ///////////////////////////////////////////////////////////////////////////////////////////////