Crash when attempting to show an audience network rewarded video - android

In our game we are using the Facebook SDK for Unity (v7.5.0), together with rewarded video mediation from IronSource.
The underlying Facebook SDK for Android is v4.11.0.
When attempting to show a rewarded video, our game crashes with this exception:
E/JavaBinder( 1172): !!! FAILED BINDER TRANSACTION !!! (parcel size = 521496)
W/ActivityManager( 1172): Exception when starting activity com.moonactive.coinmaster/com.facebook.ads.AudienceNetworkActivity
W/ActivityManager( 1172): android.os.TransactionTooLargeException: data parcel size 521496 bytes
W/ActivityManager( 1172): at android.os.BinderProxy.transactNative(Native Method)
W/ActivityManager( 1172): at android.os.BinderProxy.transact(Binder.java:503)
W/ActivityManager( 1172): at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:1088)
W/ActivityManager( 1172): at com.android.server.am.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:2540)
W/ActivityManager( 1172): at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:2661)
W/ActivityManager( 1172): at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:3493)
W/ActivityManager( 1172): at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:2613)
W/ActivityManager( 1172): at com.android.server.am.ActivityStackSupervisor.resumeTopActivitiesLocked(ActivityStackSupervisor.java:5060)
W/ActivityManager( 1172): at com.android.server.am.ActivityStack.completePauseLocked(ActivityStack.java:1687)
W/ActivityManager( 1172): at com.android.server.am.ActivityStack.completePauseLocked(ActivityStack.java:1552)
W/ActivityManager( 1172): at com.android.server.am.ActivityStack.activityPausedLocked(ActivityStack.java:1474)
W/ActivityManager( 1172): at com.android.server.am.ActivityManagerService.activityPaused(ActivityManagerService.java:10204)
W/ActivityManager( 1172): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:547)
W/ActivityManager( 1172): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:4014)
W/ActivityManager( 1172): at android.os.Binder.execTransact(Binder.java:453)
D/ActivityManager( 1172): isAutoRunBlockedApp:: com.moonactive.coinmaster, Auto Run ON
W/ActivityManager( 1172): Force removing ActivityRecord{6a0b73e u0 com.moonactive.coinmaster/com.moon.coinmaster.android.GameActivity t756}: app died, no saved state
Is this a known bug that has been resolved? I could not find any bugs similar to this.

Android SDK target 26+ has changed the way activities can pass data around -- basically they limited the amount of data that can be passed.
Eventually Facebook will release an updated AudienceNetwork.aar file to resolve this issue.
However, the workaround is as follows:
Unity automatically builds your Android project targeting the latest and greatest SDK available. Most likely this is SDK 26 at this point. There is no option in the Unity Editor to override this setting, but there IS an option to override the Minimum SDK Version.
Open your Unity project
Go to File -> Build Settings. Make sure 'Android' is selected.
Click Player Settings, then on the right, click to expand Other Settings.
Take note of the "Minimum API Level". There will be some text and a number, like Android 4.1 'Jelly Bean' (API level 16). The number you want, in my example, is the 16.
Save and close your project.
Navigate to the root of your Unity project, then navigate to the Assets/Plugins/Android folder.
Edit the AndroidManifest.xml file there.
The first line should start out: <?xml ...
The second line should be something like <manifest xmlns:android...
Insert THIS line as the 3rd line:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
Replace the "16" with whatever minimum Sdk version you want, from Step 4 above. Set the targetSdkVersion to 25, or 24, or whatever number you want -- it must be lower than 26.
Delete the Temp folder from your Unity project root.
Open Unity and rebuild your project.
If you're not on Unity, then just update your targetSdkVersion to 25 or lower -- updating the AndroidManifest.xml in your main project folder. As of this morning, Facebook's latest still shows 4.25.0 and still does not work if you target Android SDK 26.

Related

App Screen is blank when deployed through AppCenter

I have a Xamarin.Forms app built for iOS and Android. The application works fine when tested from Visual Studio (in Debug or Release modes and on the emulator or a device). However, when I try to deploy it through AppCenter, the app works on iOS and on Android, it displays the SplashScreen and then a blank white page. None of my controls show up at all...on iOS it is working fine, so the Views seem to be correct..
I hooked up the Android Device Monitor, but I do not seem to get any error messages. I have tried several changes of the project properties (turning ProGuard and MultiDex on and off; changing the Linker settings), but nothing seems to change the behavior.
I am out of ideas to even look for the problem...does anyone have any suggestions? Has anyone seen this before? Is there anywhere that lists the differences in build between Visual Studio and AppCenter?
UPDATE: I have gotten some additional logging from the Device Monitor. There are additional log entries in the version that works, so it seems that something is not running in the deployed version (maybe associated with Google Maps?).
The version not working has these two lines:
01-09 07:23:04.378: I/Google Maps Android API(11219): Google Play services client version: 11400000
01-09 07:23:04.709: I/LaunchCheckinHandler(1410): Displayed {my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.MainActivity,wp,ca,537
The version that works has these extra log entries:
01-09 07:28:29.970: I/Google Maps Android API(12443): Google Play services client version: 11400000
01-09 07:28:31.807: I/SFPerfTracer(735): triggers: (rate: 0:0) (9563 sw vsyncs) (0 skipped) (121:40138 vsyncs) (123:54057)
01-09 07:28:32.279: I/SFPerfTracer(735): triggers: (rate: 6:1097) (compose: 0:0) (post: 0:3) (render: 0:4) (125:27407 frames) (126:32007)
01-09 07:28:32.279: D/SFPerfTracer(735): layers: (2:8) (StatusBar#0 (0xaf154000): 4:4927)* (com.android.systemui.ImageWallpaper#0 (0xaf113000): 0:228)* (DimLayerController/Stack=0#0 (0xaf10c000): 0:373)* (animation background stackId=1#0 (0xaf192000): 0:20)* (NavigationBar#0 (0xaf445000): 0:493) (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#0 (0xaf424000): 0:14)* (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#1 (0xaf2fa000): 0:154)* ({my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.SplashActivity#0 (0xaf437000): 0:3)
01-09 07:28:32.514: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md58432a647068b097f9637064b8985a5e0.ViewRenderer_2
01-09 07:28:32.652: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.ActivityIndicatorRenderer
01-09 07:28:32.764: I/ThermalEngine(967): Thermal-Server: Thermal received msg from override
01-09 07:28:32.764: I/Thermal-Lib(721): Thermal-Lib-Client: Client request sent
01-09 07:28:32.947: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.TableViewRenderer
01-09 07:28:33.055: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.BaseCellView
01-09 07:28:33.055: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.TextCellRenderer_TextCellView
01-09 07:28:33.083: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.CellRenderer_RendererHolder
01-09 07:28:33.172: W/View(12443): requestLayout() improperly called by md51558244f76c53b6aeda52c8a337f2c37.ScrollViewContainer{3f9ae0f V.E...... ......ID 0,0-1080,1444} during layout: running second layout pass**
01-09 07:28:33.325: I/LaunchCheckinHandler(1410): Displayed {my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.MainActivity,wp,ca,3558
Can anyone translate these log messages into English so I have some idea where to look for the issue? IS there something extra that needs to be done with Google Maps when it is deployed versus debug/testing?
Thanks in advance.
It may not relate to the OP's issue but I had the same symptom today:
App working fine on Android when deployed from VS.
Blank screen when deployed from the MDM provider (in my case this was Airwatch Workspace ONE).
No useful information provided in the logs and no errors occurred.
I fixed it by unchecking Android Options -> Use shared runtime

Android studio instant-run not work well

I use the Android studio 2.0, and configure the project with the official doc , the config of instant run in the setting window of AS has changed from disabled to enabled state. As well the run icon has lightning now,but when i change the code, just add a toast in a function, and click the lightning run, the application will be exit, and log show like below:
11-24 19:59:40.382 20951-20957/com.ss.android.essay.joke I/art: System.exit called, status: 1
11-24 19:59:40.383 20951-20957/com.xxx I/AndroidRuntime: VM exiting with result code 1, cleanup skipped.
11-24 19:59:40.475 4922-14521/? I/WindowState: WIN DEATH: Window{651bd86 u0 com.ss.android.essay.joke/com.xxx.MainActivity}
Edit:The status of bug has updated,crash not happened again with alpha2,but still can't use instant-run, more detail:https://code.google.com/p/android/issues/detail?id=195064
Edit: Android studio 2.1.1 with 2.12 gradle work well now.
Pretty sure your change is not covered by Instant Run, check out Android tools site for a list of supported hot swap actions:

App update losing all data as Code/Resouce path for pkg changes

We recently submitted an update of our to Google Play, and have had a handful of users report an issue with all of their data disappearing.
We've managed to reproduce the issue once, and it was caused by:
5787 08-17 12:50:56.309 937 1030 W PackageManager: Code path for pkg : com.attidomobile.passwallet changing from /data/app/com.attidomobile.passwallet-2 to /data/app/com.attidomobile.passwallet-1
5789 08-17 12:50:56.309 937 1030 W PackageManager: Resource path for pkg : com.attidomobile.passwallet changing from /data/app/com.attidomobile.passwallet-2 to /data/app/com.attidomobile.passwallet-1
Note, this is not the same problem as Resource/Code path changing for pkg on Android App update. We are ProGuarding our app, but the actual folder it's being installed to is changing.
Anyone experienced this, or know of the reasons why the PackageManager changes the code/resource path?
I found this post describing the update process for pre-installed applications which seems to match what is happening, but our app isn't a pre-installed app:
http://debuggingisfun.blogspot.co.uk/2014/09/android-3rd-party-application-as-system.html
We've gone through the changes between versions and there have been no significant changes; the only change in the manifest is to the version number, plus some logic changes in the code.
We've never seen this issue before with any of our previous app updates (and there's been a lot, the app is nearly 3 years old and this is update 38).

App using NDK (native code) falls. How can i find out why?

My app is using NDK (4r-crystax in my case) to proccess images from a camera. Problem is, it falls after few minutes of work. I guess there can be some memory leaks or something like that, but i dont know how to find out where the problem is. This is a log around this error:
04-14 23:07:37.133: INFO/NATIVE CODE(14895): Detection percentage counted.
04-14 23:07:37.163: DEBUG/MDDetectorView(14895): Some debug info
04-14 23:07:37.193: DEBUG/dalvikvm(14895): GC_EXTERNAL_ALLOC freed 19 objects / 872 bytes in 27ms
04-14 23:07:37.283: INFO/NATIVE CODE(14895): Image to proccess loaded.
04-14 23:07:37.493: INFO/ActivityManager(92): Process com.motiondetector (pid 14895) has died.
04-14 23:07:37.493: DEBUG/CameraService(67): Client::~Client E (pid 67, client 0xad08)
04-14 23:07:37.503: INFO/WindowManager(92): WIN DEATH: Window{46590698 com.motiondetector/com.motiondetector.MDMenuActivity paused=false}
04-14 23:07:37.513: ERROR/CameraService(67): getClientFromCookie: client appears to have died
Any ideas? Are there any usefull tools to help me find answer?
Is possible that Android kill on screen activity during proccessing a native code?
If you're using NDK r5 or greater, you can use the ndk-gdb script to run your program and connect to it via GDB. If your native code is crashing, it should drop you into the GDB command line, where you can examine the area of code that's causing the problem.

How to debug crashed android native library?

I am runing junit test for native library(C++), native library process crashed and logcat shows:
I/ActivityManager( 161): Force stopping package xxxxx uid=10043
I/ActivityManager( 161): Start proc xxxxx for added application xxxx: pid=1656 uid=10043 gids={1015}
I/TestRunner( 1656): started: testAddressBook(xxxxx.AddressBookTest)
F//system/bin/app_process( 1656): stack corruption detected: aborted
I/ActivityManager( 161): Process xxxxx (pid 1656) has died.
Where xxxxx is the process name.
I try to follow instruction on http://source.android.com/porting/debugging_native.html , but the instruction is confusing:
If it crashes, connect with aproto and run logcat on the device
What is aproto? I can't find it. Nor "stack" tool.
Any suggestion is appreciated!
-Henry
F//system/bin/app_process( 1656): stack corruption detected: aborted
That sounds like you're trashing a local variable. Here's a really popular way to do that:
char localVar[16];
sprintf(localVar, "And this is why sprintf is the devil");
That's not exactly what you asked for, but I hope it helps anyway.

Categories

Resources