Frozen Frames Warnings by Google Play Pre-Launch Report for 3.17 Cocos Demo App

Hey!

We’ve found that a cocos 2dx 3.10 “Hello World” app compiled for Android target 26 (armeabi) and uploaded to Google Play is displaying “Warnings” in the PreLaunch report due to abnormally low frame rates.

Performance Report screenshot:
https://gmkr.io/s/5b3513bbae3ce3365284df27/0

Issues found in 2 devices:

Mate 9: (Android 24)

LG G6: (Android 24)

Has anyone tested a blank / default cocos 2dx app on google play? And got a different result?

Any help would be appreciated!

Thx

3.10 is pretty long in the tooth by now. Is there a reason you don’t upgrade to 3.17?

Thanks @slackmoehrle for the quick response. We have not migrated to cocos creator as yet, so am unsure of the impact of porting everything to creator.

The main reason for not migrating was because of lack of c++ support which i understand has now been implemented, but i haven’t found any documentation that detailing the changes in the c++ api.

Thanks

Creator? I meant cocos2d-x 3.17. Creator is only at v1.9.x.

You can still use cocos studio in 3.17.

I think it works fairly ok still. Yes?

Yes, all our games are based on Cocos Studio and they’re working fine. But I’m little worried, because most probably next mac os won’t allow to open 32 bits apps like… cocos studio. Is it possible to rebuild cocos studio in 64bits to maintain the support for a little longer?

It won’t be possible. Cocos Studio is closed source and we haven’t maintained it for years now.

But it’s not for new features. Just rebuilding it for 64bits.

Yup I realize what you are asking and I can say with almost 100% certainty that we won’t be doing anything.

But why such stubborn (no offense) position (not sure I’ve used right words, but I hope you understand what I meant) :slight_smile: ? I understand you decided not to continue working on Cocos Studio, when you have a new editor. I know you may not care, but there may be a lot of developers like me… we have over 30 apps made in Cocos Studio. I cannot imagine porting it to Creator just because Apple will drop support for 32bit apps. There are working perfectly fine now.

Anyway, I appreciate the work of cocos team. It’s amazing what are you doing and what’s more it’s free and open source. :smiley:

The team behind Cocos Studio is gone and the current teams are busy. We don’t have the time to invest in engineers learning the product to compile it.

And it isn’t as simple as just compiling it. If we put out a new version we also have to support it. Bugs crop up and users expect answers and fixes.

I see. That’s not good :frowning: Anyway thanks for a detailed explanation.

@slackmoehrle We put a cocos 2dx 3.17 APK built using NDK 17, and to my surprise Google Play PreLaunch report is reporting the same performance issues as with 3.10 built APK. The APK is the default APK generated from a “new” project. No code changes done in native or Java. Only modifications was a change in the package/version IN MANIFEST, so that Google play will accept the APK in the internal test track.

I will follow up with another email with screenshots, but summary is that we are seeing frame delays of 1050 msecs in the PreLaunch report for Pixel, Mate9 and LG G6.

Thx!

Hmmm we need someone with Mate9 or LG G6 …
@net4uonline could you check the same with NDK 16? cocos 2dx 3.17 prebuild were build with NDK16. “All libraries should be generated with the same NDK version” according to:
https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#using-mismatched-prebuilt-libraries

@slackmoehrle @CrazyHappyGame As promised links to screenshots of UI Render Time from Google PreLaunch:

Mate 9 - Android 24
https://gmkr.io/s/5b37b0acd52e1b7534dc7ec7/0

LG G6 - Android 24
https://gmkr.io/s/5b37b1269bc71175e6b21acf/0

Pixel (sailfish) - Android 25
https://gmkr.io/s/5b37b14e3287153604dd0310/0

As you can see, 1000 msecs+ is a massive amount of time.
Gradle Properties:
PROP_COMPILE_SDK_VERSION=27
PROP_MIN_SDK_VERSION=14
PROP_TARGET_SDK_VERSION=27
PROP_BUILD_TOOLS_VERSION=27.0.1
PROP_APP_ABI=armeabi-v7a
PROP_BUILD_TYPE=ndk-build

Android.mk
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

$(call import-add-path,$(LOCAL_PATH)/…/…/…/cocos2d)
$(call import-add-path,$(LOCAL_PATH)/…/…/…/cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/…/…/…/cocos2d/cocos)
$(call import-add-path,$(LOCAL_PATH)/…/…/…/cocos2d/cocos/audio/include)

LOCAL_MODULE := MyGame_shared

LOCAL_MODULE_FILENAME := libMyGame

LOCAL_SRC_FILES := $(LOCAL_PATH)/hellocpp/main.cpp
$(LOCAL_PATH)/…/…/…/Classes/AppDelegate.cpp
$(LOCAL_PATH)/…/…/…/Classes/HelloWorldScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/…/Classes

_COCOS_HEADER_ANDROID_BEGIN

_COCOS_HEADER_ANDROID_END

LOCAL_STATIC_LIBRARIES := cocos2dx_static

_COCOS_LIB_ANDROID_BEGIN

_COCOS_LIB_ANDROID_END

include $(BUILD_SHARED_LIBRARY)

$(call import-add-path, $(LOCAL_PATH)/…/…/…/cocos2d)
$(call import-module, cocos)

_COCOS_LIB_IMPORT_ANDROID_BEGIN

_COCOS_LIB_IMPORT_ANDROID_END

Application.mk
APP_STL := c++_static

APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -Wno-extern-c-compat
APP_LDFLAGS := -latomic

APP_ABI := armeabi-v7a
APP_SHORT_COMMANDS := true

ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := release
endif

Pls let me know if there is any other info you would like me to send you from the PreLaunch report.

hello @CrazyHappyGame @slackmoehrle @piotrros !

We have redone the PreLaunch Report test, which is showing 33.33% frozen frames for LG G6, Mate 9 and Pixel. Point to note is that these are the only devices that are running Android 24 (7.0)/25 (7.1.1) from the list of devices used for the Google Play PreLaunch report - (other devices/android versions 22,23,26 have no issues)

As @CrazyHappyGame suggested we have tested with Cocos2dx 3.17 generated “default” APK using NDK 16.

Thx once again!

@drelaptop any advice here?

@slackmoehrle @drelaptop

We have been investigating the problem on a 7.1.1 device, and found that in debug mode, Android is reporting screen frozen in logcat. See: https://pastebin.com/Cpe9pkzQ

This is the default cococs application created with a “new project” on 7.1.1 device.

Has anyone seeing the same kind of output?

An educated guess would be that JNI call to setAnimationInterval is the reason for the delay in rendering, so I commented it out from the code, but cocos engine is still calling setAnimationInterval (JNI).

Any pointers to fixing this or understanding why the thread takes 1sec + to render on startup???

Thx!

@slackmoehrle anybody had a chance to check this?

Thx