Android build on older device not rendering game objects (SOLVED)

Hi!

Once again I must ask for your guidance and help with our project. With latest Defold Engine 1.2.165 (6fac6e8) and some other latest builds cause some older Android devices not to render game objects at all. GUIs and particles are working. Our released package from November is working flawlessly on every device. I tested building that same codebase but the error was still there (I had to update firebase libraries due the changes on the Defold Engine but no other changes were done on this test). I am using macOS 10.14.5. I tested with our own render script and also built-in render script with no difference, which probably is quite obvious since it worked before.

A screenshot of the problem from Zenpad missing all the game objects:

And this is how it should look:

Interestingly I found that this is though not dependent of Android version. I have Asus Zenpad 10 P023 with Android 5.0.2 that has the issue but for example ZTE Blade V6 with exactly the same Android 5.0.2 hasn’t. I have not seen this with modern Androids, but I have tested only a few devices. Zenpad has x86 Intel processor and ZTE has an ARM processor if that matters. iOS build are working also.

I have not managed to get any logs from this issue since if I build a debuggable package, it crashes immediately after successful Firebase init with error 02-24 19:04:25.280 17521-17547/com.helmigames.bouncerstory E/defold: ERROR:GRAPHICS: gl error 1280 02-24 19:04:25.400 17521-17547/com.helmigames.bouncerstory I/defold: INFO:CRASH: Successfully wrote Crashdump to file: /data/data/com.helmigames.bouncerstory/files/_crash 02-24 19:04:25.400 17521-17547/com.helmigames.bouncerstory E/defold: ERROR:CRASH: CALL STACK: # 0 pc 0xfc464 [anon:Mem_0x10000004] <unknown>+0 02-24 19:04:25.550 657-773/? W/InputDispatcher: channel '1a80f79f com.helmigames.bouncerstory/com.dynamo.android.DefoldActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 02-24 19:04:25.550 657-773/? E/InputDispatcher: channel '1a80f79f com.helmigames.bouncerstory/com.dynamo.android.DefoldActivity (server)' ~ Channel is unrecoverably broken and will be disposed! I don’t know if this is related or not, but release package does not crash.

Our dependencies:
https://github.com/defold/extension-firebase-analytics/archive/1.3.2.zip
https://github.com/AGulev/defreview/archive/master.zip

Thanks for your help!

Is this a problem only with your project? Can you try an empty project and add a single sprite?

1 Like

Thanks for the tip! I tested today with an empty project and it was working just fine. I also tested adding the same dependencies, AndroidManifest and render_script to the empty project but it is still working. The problem also seems to be not related if game objets are added directly to a collection or are created from a factory, neither of them works at actual project. I tested also that this is not about extrude borders of atlas.

Any ideas to test? Thanks!

What does adb logcat say? Maybe some clue?

And the project is left exactly as it was? No changes between the version that works and the one that had problems?

I am not been able to get any logs since debuggable package crashes with logs I mentioned on the first post, but I will test it more if I will get it work.

We have made development, but I tested with the same codebase from version control that we released on November and it didn’t work any more with the new editor. The only change I had to make to get it built was those Firebase dependencies since they were not working with the latest engine, but crashed immediately when opening the app. But these same dependencies make no trouble in the empty project so most like not related to the issue.

Since your log mentions an opengl error, could it be a special shader or material?
Do you have a custom render script?

1 Like

Shaders and materials are something I haven’t tested yet but I will. Our characters has a custom shaders and material, but the background doesn’t have these but still something new to test. Thanks! And yes we have a custom render script, but it is working on the empty test project without any problems.

Have you tried it on any other platforms?
E.g. HTML5?
Different graphics drivers log differently when it comes to the portability of shaders, so it might be good to check there as well (or windows if you can)

1 Like

iOS is working flawlessly so as is Android with newer devices like OnePlus 6 and even old ZTE Blade V6 with Android 5.0.2 but for some reason the problem is (at least )with Zenpad 10 with Android 5.0.2. All of these devices works well with the build from November but Zenpad has this issue with now built bundle even with same codebase as on November, which makes this pretty difficult to figure out :smiley:

Only differences between these ZTE and Zenpad devices are that Zenpad is of course bigger, but also less performant and has Intel instead of ARM processor. And maybe a difference with openGL support, but earlier it was working.

1 Like

Btw, when you say you can’t get the logcat, what do you mean?
You’ve already posted some of the logcat in the first post?

Perhaps there are something else relevant prior to those lines?

Run with: $ adb logcat
and it should print it out to your console.

Has it updated during this time? E.g. with new drivers?

I have updated the BETA build with a small log improvement that lets me know what function and line number is failing the glGeterror() check.

Please try it out and report that log to me.

2 Likes

Thanks, I have to try it out. I meant that the game crashes immediately if I made a debuggable build so that I couldn’t get as far to see any missing game objects and to see if there is a more detailed logs about that issue.

The Zenpad device has not been updated and if I now install the old package, it is working flawlessly and when I install a new package from the old codes but with the latest editor, it is having the issue and missing the game objects.

1 Like

I tested our shaders and sprite materials on the empty project and it is still working, so these are not causing problems with the main project.

I also tested the 166 BETA client but I cannot get a debug build done because Firebase seems to miss something with this new editor. Error seems similar as in this thread Errors in building a project for Android

I cannot send a screenshot maybe because the forum’s certificate is expired but I copied the Build Errors log here:
/firebase/src/firebase.cpp
Line 3: ‘DLIB_LOG_DOMAIN’ macro redefined [-Wmacro-redefined]
#define DLIB_LOG_DOMAIN LIB_NAME
^
Line 3: previous definition is here
#define DLIB_LOG_DOMAIN “FIREBASE”
^
Line 36: extra tokens at end of #else directive [-Wextra-tokens]
#else if defined(DM_PLATFORM_IOS)
^
//
Line 165: format string is not a string literal (potentially insecure) [-Wformat-security]
luaL_error(L, msg);
^~~
Line 165: treat the string as an argument to avoid this
luaL_error(L, msg);
^
“%s”,
Line 185: format string is not a string literal (potentially insecure) [-Wformat-security]
luaL_error(L, msg);
^~~
Line 185: treat the string as an argument to avoid this
luaL_error(L, msg);
^
“%s”,
Unknown source:
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

And I am using the latest 1.3.2 version of Firebase as mentioned on the first post.

Your log snippet doesn’t seem to contain any errors.
Please post the log.txt you’ll find in your project/build folder so I can take a look at the build error.

Here, thanks!

armv7_log.txt (14.0 KB)
arm64_log.txt (13.6 KB)

They doesn’t seem to have a specific error either, but actually now when I tested again it was successful! So now I can test with beta build and Zenpad to get the logs.

Yes, it was most likely due to an expired certificate which we fixed today.

1 Like

Here are now the logs from debuggable build with the latest Beta editor

Full unfiltered log, which contains also most likely so much unnecessary trash
full_logs.txt (10.8 KB)

Defold filtered logs (adb logcat -s defold)
defold_logs.txt (1.4 KB)

As a quick look, I didn’t notice any special compared to the original log from older editor posted earlier. It is weird that debuggable build crashes like this on startup and a release build does not crash. I have enabled debuggable from Android build dialog and added android:debuggable="{{android.debuggable}}" to the manifest.

Thanks for your help!

1 Like

If you can try a specially built editor/bob, I’ve added some more debug info for those types of errors, and also your problem in particular:

OSX
Windows
Linux

2 Likes

Thanks, I tested with that special editor and here are the logs.

Full logs from Zenpad:
full_logs2.txt (12.8 KB)

Defold logs from Zenpad:
defold_logs2.txt (1.4 KB)

Defold logs from other Android device (ZTE Blade v6) where everything works:
working_device_logs.txt (1.0 KB)

When I run game on the editor I can see a lots of prints like this
MAWE: DrawElements:
MAWE: prim_type: 4
MAWE: count: 36 00000024
MAWE: type: 5125
MAWE: first: 0 00000000
MAWE: DrawElements:
MAWE: prim_type: 4
MAWE: count: 36 00000024
MAWE: type: 5125
MAWE: first: 0 00000000
MAWE: DrawElements:
MAWE: prim_type: 4
MAWE: count: 36 00000024
MAWE: type: 5125
MAWE: first: 0 00000000
MAWE: DrawElements:
MAWE: prim_type: 4
MAWE: count: 36 00000024
MAWE: type: 5125
MAWE: first: 0 00000000
MAWE: DrawElements:
MAWE: prim_type: 4
MAWE: count: 36 00000024
MAWE: type: 5125
MAWE: first: 0 00000000

but on the device logs I cannot see these.

1 Like