Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

libcorona.so crash
Started by mateusz8 Jun 02 2018 12:28 AM

13 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Hello,

 

I have released my app 2 months ago and since then I'm getting errors like this:

backtrace:
#00 pc 0000000000246ee8 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so

#01 pc 0000000000246ef5 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so

#02 pc 0000000000246f47 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so
#03 pc 000000000024666b /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so
#04 pc 0000000000245fe3 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so

#05 pc 0000000000142cb0 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so
#06 pc 0000000000141120 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so
#07 pc 000000000008d440 /data/app/com.hawkgames.tapthemonster-1/lib/arm/libcorona.so
#08 pc 00000000008f149d /data/app/com.hawkgames.tapthemonster-1/oat/arm/base.odex

Does anyone know how to debug it? Is there a way to check what function is under 0x8f149d in base.odex or 0x246ee8 in libcorona.so?



[TOPIC: post.html]
#2

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Managed to get the function names from libcorona.so via addr2line:

__gxx_personality_v0
__gxx_personality_v0
__gxx_personality_v0
operator delete[](void*)
sqrt(vlong, vlong)
CoronaExternalFormatBPP
CoronaExternalFormatBPP
Java_com_ansca_corona_JavaToNativeShim_nativeGetCoronaRuntime


[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,865 posts
  • Corona Staff

What version of Corona are you building with?

 

Rob



[TOPIC: post.html]
#4

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

What version of Corona are you building with?

 

Rob

 

3308



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,865 posts
  • Corona Staff

I'm a little confused. You say you released your app a couple of months ago, but 3308 has been out for about 5 days. So are you getting these errors with 3308 or an older version of Corona? When did you update your app? Are these errors recent with a version released with 3308?

 

Rob



[TOPIC: post.html]
#6

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

I'm a little confused. You say you released your app a couple of months ago, but 3308 has been out for about 5 days. So are you getting these errors with 3308 or an older version of Corona? When did you update your app? Are these errors recent with a version released with 3308?

 

Rob

 

I'm getting these errors in all of my apps and in all of CoronaSDK versions. All of them happen in the CoronaExternalFormatBPP function.

 

w0qx1aK.png



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,865 posts
  • Corona Staff

Can you use a service like pastebin.com and paste a complete backtrace for some of these crashes?

 

Rob



[TOPIC: post.html]
#8

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Crashlogs from APKs compiled with version 3319:

First game, only thing that differs is the address in the base.odex file:
https://pastebin.com/41eKN8Ck

Other crash - happens about 5 times less often than the first one, but involves similar addresses:
https://pastebin.com/GHDgb4A8

From another game, the same adresses:
https://pastebin.com/0HbkjFQs



[TOPIC: post.html]
#9

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Just checked and the errors started happening after on of the game updates.

 

Is there a way to check what LUA functions are calling the Java_com_ansca_corona JavaToNativeShim->nativeGetCoronaRuntime function?



[TOPIC: post.html]
#10

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Just received the more detailed report from Google Pixel 2 (looks like that devices are more debug friendly):

 

#00 pc 0000000000246f70 /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#01 pc 0000000000246f7d /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#02 pc 0000000000246fcf /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#03 pc 00000000002466f3 /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#04 pc 000000000024606b /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#05 pc 0000000000142d38 /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#06 pc 00000000001411a8 /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#07 pc 000000000008d4c0 /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/lib/arm/libcorona.so
#08 pc 000000000002d07f /data/app/com.hawkgames.caseclicker2-GLnQXaqrT-DeM0_WvS5Hwg==/oat/arm/base.odex (com.ansca.corona.JavaToNativeShim.nativeAbortShowingImageProvider [DEDUPED]+102)
#09 pc 000000000001cc41 /dev/ashmem/dalvik-jit-code-cache (deleted)

So here's how the functions look like now:

#00 __gxx_personality_v0
#01 __gxx_personality_v0
#02 __gxx_personality_v0
#03 operator delete[](void*)
#04 sqrt(vlong, vlong)
#05 CoronaExternalFormatBPP
#06 CoronaExternalFormatBPP
#07 JavaToNativeShim.nativeGetCoronaRuntime
#08 JavaToNativeShim.nativeAbortShowingImageProvider


[TOPIC: post.html]
#11

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Build.settings:

https://pastebin.com/Wy6DKXud



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,865 posts
  • Corona Staff

I would suggest two actions:

 

1. remove this plugin:

        ["plugin.google.play.services"]       = { publisherId = "com.coronalabs" },

This is the old AdMob plugin and is no longer supported by Google and is going to cause problems. It should not be used at all. This used to be a dependency for many other plugins, but that hasn't been the case in a couple of years. If you are using AdMob you will either have to pay for the modern version of the plugin or use Appodeal.

 

2. This Vungle plugin is very, very old. Please update to the latest vungle plugin. Remove this:

        ["CoronaProvider.ads.vungle"]         = { publisherId = "com.vungle"    , supportedPlatforms = { iphone = true, android = true } },

See: https://support.vungle.com/hc/en-us/articles/360003413891-Get-Started-with-Vungle-SDK-v-6-2-Corona

 

3. Update to at least 3326. You can't submit to Google Play with any earlier version due to Android 8 support. We've addressed quite a few Android crashes. Consider the latest daily build.

 

Rob



[TOPIC: post.html]
#13

mateusz8

[GLOBAL: userInfoPane.html]
mateusz8
  • Enthusiast

  • 31 posts
  • Corona SDK

Found the cause: the crashes happen randomly in  the onComplete event in the audio.play function (even if the event callback is empty).

 

After removing it the crash rate dropped from ~3.5% of sessions to < 0.5%.

 

Don't use the onComplete func until it's fixed.



[TOPIC: post.html]
#14

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,865 posts
  • Corona Staff

Can you create a simple example app that crashes during the onCompete call?

 

Rob




[topic_controls]
[/topic_controls]