Few cents about my commits

ObjC interop: state lost - concurrency issues under heavy duty load

|

As continue of investigating deadlock:

Thread #17 also displays strange stacktrace that normally should not happen:

  • native(ObjC code) calls [myObject description];
  • tries to marshal pointer(handle) to Java object in toObjCObject;
  • it doesn’t find it in peer map and creates new Java instance/wrapper using ObjCObject.createInstance.

What is completely wrong here:

ObjC interop: deadlock — concurrency issues under heavy load

|

Due to a deadlock, a synchronization object in ObjC-related code became unavailable, causing the application to hang while trying to acquire a lock on it. It could also crash if the garbage collector (GC) was involved at that moment:

[ERROR] android.System: com.example.TestObject.finalize() timed out after 10 seconds
[ERROR] android.System: java.util.concurrent.TimeoutException: com.example.TestObject.finalize() timed out after 10 seconds
    at org.robovm.objc.ObjCObject$ObjectOwnershipHelper.release(ObjCObject.java:525)
    at org.robovm.objc.ObjCRuntime.void_objc_msgSend(Native Method)
    at org.robovm.apple.foundation.NSObject.release(NSObject.java:228)
    at org.robovm.apple.foundation.NSObject.doDispose(NSObject.java:212)
    at org.robovm.objc.ObjCObject.dispose(ObjCObject.java:148)
    at org.robovm.objc.ObjCObject.finalize(ObjCObject.java:135)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:172)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:155)
    at java.lang.Thread.run(Thread.java:869)

Getting the stack traces

AltPods: pods updated - 1.54.0-SNAPSHOT

|

AltPods were updated to v1.54.0-SNAPSHOT to sync with recent releases.

Updated pods (ones with API changed)

Updates are not fully tested, please open issue if bug found.

Tracking slipped NPE, but in Crashlytics v11.15.0

|

Few months since last Tracking slipped NPE and here we go again:

  • same user reported;
  • same scenario (code that handles a lot of NPE in try/catch);
  • this time with Crashlytics.

Time for dissection…

Debugger: "Could not initialize class" when running debug build

|

There was a report in MobiVM matrix channel for crash that is happening only during running under debugger:

java.lang.NoClassDefFoundError: Could not initialize class com.sample.mobile.ios.network.RoboVmNetzwerkStatusController
        at com.sample.mobile.ios.Main.didFinishLaunching(Main.java:208)
        at com.sample.mobile.ios.Main.$cb$application$didFinishLaunchingWithOptions$(Main.java)
        at org.robovm.apple.uikit.UIApplication.main(Native Method)
        at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:442)
        at com.sample.mobile.ios.Main.main(Main.java:314)

TLTR: Fix and workaround

AltPods: pods updated - 1.53.0-SNAPSHOT

|

AltPods were updated to v1.53.0-SNAPSHOT to sync with recent releases.

Updated pods (ones with API changed)

Updates without any API change

  • Google Mobile Ads updated to v12.8.0 -> v12.9.0
  • Firebase updated to v12.1.0 -> v12.2.0
  • UnityAds updated: v4.16.0 -> v4.16.1

  • These pods were pushed to https://central.sonatype.com/repository/maven-snapshots/ maven repo under 1.53.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

Swift: missing _OBJC_CLASS_$_RvmProduct_PurchaseOption case

|

issue#813 was reported as an issue with storekit2 bindings.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘+[missing_RvmProduct_PurchaseOption appAccountToken:]: unrecognized selector sent to class 0x1332748a0’

With comments that simulator works but app fails on real device.
Lets investigate.

Tracking slipped NPE, but in GAD v12.9.0

|

Tom-ski have reported production level crash caused by EXC_BAD_ACCESS by java code inside try/catch block. It is well known issue of code like this:

    public static void sayHello() {
        String s = null;
        try {
            s.toString();
        } catch (NullPointerException e) {
            e.printStackTrace();
        }
    }

caused by third party code that messes with SIGSEGV signal handler and makes it not accessible to RoboVM.

AltPods: pods updated - 1.52.0-SNAPSHOT

|

AltPods were updated to v1.52.0-SNAPSHOT to sync with recent releases.

Updated pods (ones with API changed)

Updates without any API change

  • Facebook iOS Audience updated: v6.20.0 -> v6.20.1
  • Branch Metrics updated: v3.12.1 -> v3.12.2
  • Tenjin updated: v1.14.10 -> v1.14.11
  • Unity updated: v4.15.1 -> v4.16.0
  • CleverAds updated: v4.1.2 -> v4.3.0
  • Google Mobile Ads updated to v12.7.0 -> v12.8.0
  • Firebase updated to v12.0.0 -> v12.1.0

  • These pods were pushed to https://central.sonatype.com/repository/maven-snapshots/ maven repo under 1.52.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

AltPods: pods updated - 1.51.0-SNAPSHOT

|

AltPods were updated to v1.51.0-SNAPSHOT to sync with recent releases.

Breaking changes

AdMob is not longer a part of Firebase. It was moved out of Firebase package so its artifact id is changed:

  • admob -> io.github.dkimitsa.robovm:robopods-google-mobile-ads-ios
  • ump -> io.github.dkimitsa.robovm:robopods-google-ump-ios
  • DynamicLinks removed as not available in Firebase anymore.

Silly typo fixed in CleverAds class package name: package org.robovm.pods.cleverads.* now.

Updated pods (ones with API changed)

Updates without any API change

  • Fyber updated v8.3.7 to v8.3.8
  • UnityAds updated: v4.15.0 to v4.15.1

  • These pods were pushed to https://central.sonatype.com/repository/maven-snapshots/ maven repo under 1.51.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.