Skip to content

After calling cc.game.end(), opening the app again will crash #18568

@zhitaocai

Description

@zhitaocai

Cocos Creator version

2.4.13

System information

Android 15

Issue description

Cocos Creator 2.x ,具体为 2.4.13,在调用 cc.game.end() 后,再次打开应用,会导致应用崩溃

此问题目前在 Android 15 的设备上必现

Relevant error log output

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/bluejay/bluejay:15/BP1A.250305.019/13003188:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2025-04-07 16:19:28.034883140+0800
Process uptime: 10s
Cmdline: com.test.game
pid: 20741, tid: 20952, name: GLThread 123  >>> com.test.game <<<
uid: 10307
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x005536c0709dc9a8
    x0  b4000077e4db4220  x1  0000000000000001  x2  0000000000000000  x3  0000000000000010
    x4  0000000000000000  x5  0000000000403af4  x6  31332d2f2d371f39  x7  7f7f7f7f7f7f7f7f
    x8  145536c0709dc9a8  x9  0200007954e95950  x10 00000000742549e7  x11 0000000000030000
    x12 0000000000004a63  x13 000000007fffffff  x14 0000000000403af4  x15 0000008d06937299
    x16 000000766f9bb180  x17 000000766f362f4c  x18 000000767cb18000  x19 b400007954e95950
    x20 b4000077e4db4220  x21 b400007924e42560  x22 0000000000000003  x23 000000779b556d10
    x24 00000076c014bd70  x25 0000000000000003  x26 00000076c014c090  x27 0000000000000003
    x28 000000779b556bd0  x29 000000779b5562b0
    lr  000000766f0d7ca8  sp  000000779b556270  pc  005536c0709dc9a8  pst 0000000060001000
27 total frames
backtrace:
      #00 pc 005536c0709dc9a8  <unknown>
      #01 pc 0000000001c65ca4  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (v8::internal::IsolateAllocator::InitReservation()+52) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #02 pc 0000000001c65c20  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (v8::internal::IsolateAllocator::IsolateAllocator(v8::internal::IsolateAllocationMode)+40) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #03 pc 0000000001b546a8  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (v8::internal::Isolate::New(v8::internal::IsolateAllocationMode)+36) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #04 pc 0000000001a65a84  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (v8::Isolate::New(v8::Isolate::CreateParams const&)+20) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #05 pc 00000000011395a8  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (se::ScriptEngine::init()+256) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #06 pc 000000000113bab8  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (se::ScriptEngine::start()+44) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #07 pc 0000000000f11388  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (AppDelegate::applicationDidFinishLaunching()+188) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #08 pc 0000000000f1f5ac  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (cocos2d::Application::start()+28) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #09 pc 0000000000f48330  /data/app/~~1c17LLj4TQzrxBS4kzz9yQ==/com.test.game-O_8HO_imU-j8LEsucQZj3A==/lib/arm64/libcocos2djs.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+252) (BuildId: 88c157b357df21c104c281c2fe8648ee719d8b83)
      #10 pc 000000000037ef70  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #11 pc 0000000000368a40  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #12 pc 0000000000361e5c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+2048) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #13 pc 000000000076f734  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+12208) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #14 pc 00000000003815d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #15 pc 0000000000010588  <anonymous:7a58d0a000> (org.cocos2dx.lib.Cocos2dxRenderer.onSurfaceCreated+0)
      #16 pc 00000000003535dc  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1932) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #17 pc 000000000037f098  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #18 pc 00000000023ec858  /memfd:jit-cache (deleted) (offset 0x2000000) (android.opengl.GLSurfaceView$GLThread.guardedRun+2584)
      #19 pc 00000000023ebcec  /memfd:jit-cache (deleted) (offset 0x2000000) (android.opengl.GLSurfaceView$GLThread.run+300)
      #20 pc 0000000000368774  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #21 pc 0000000000353f24  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #22 pc 0000000000947968  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #23 pc 0000000000636878  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #24 pc 0000000000636328  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: a0856b3dbc826e8cee9d66738ac739d8)
      #25 pc 000000000006f584  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+180) (BuildId: f0cc3fe16b52af6fc8d4e5b18105de09)
      #26 pc 0000000000061610  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f0cc3fe16b52af6fc8d4e5b18105de09)

Steps to reproduce

  1. 准备一台 Andorid 15 的手机
  2. 启动应用
  3. 主动调用 cc.game.end() 后,应用会退出
  4. 此时再次打开应用就会崩溃

Minimal reproduction project

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions