gluongluon-mobilejavafxports

Gluon Mobile app suddenly crashes without code changes being done (iOS 13.3.1)


Our App got rejected during AppStore review. It worked fine on the physical test device running iOS 13.1.2 however. So, I upgraded to iOS 13.3.1 and now it crashes with the exact same error report that Apple has sent.

Am I correct in the assumption that the error needs to be fixed in JavaFXPorts?

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4374036480
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                 0000000104b68000-0000000106898000 [ 29.2M] r-x/r-x SM=COW  ...yMobileApp

Termination Reason: LIBSYSTEM, [0x4]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001aa016930 __abort_with_payload + 8
1   libsystem_kernel.dylib          0x00000001aa01af24 abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:72)
2   libsystem_kernel.dylib          0x00000001aa01aec0 abort_with_reason + 28 (terminate_with_reason.c:86)
3   libsystem_pthread.dylib         0x00000001a9f3fed0 pthread_self.cold.1 + 32
4   libsystem_pthread.dylib         0x00000001a9f3f0a8 pthread_self + 48 (internal.h:722)
5   Foundation                      0x00000001aa4d2964 +[NSThread currentThread] + 96 (NSThread.m:373)
6   MyMobileApp                 0x0000000104d58170 JNI_OnLoad_glass + 63624
7   MyMobileApp                 0x00000001055b0cfc 0x104b68000 + 10783996
8   MyMobileApp                 0x00000001055a5030 [J]com.sun.glass.ui.Window.<init>(Lcom/sun/glass/ui/Window;Lcom/sun/glass/ui/Screen;I)V + 10735664 (Window.java:273)
9   MyMobileApp                 0x00000001055b0c58 [J]com.sun.glass.ui.ios.IosWindow.<init>(Lcom/sun/glass/ui/Window;Lcom/sun/glass/ui/Screen;I)V + 10783832 (IosWindow.java:40)
10  MyMobileApp                 0x00000001055aa790 [J]com.sun.glass.ui.ios.IosApplication.createWindow(Lcom/sun/glass/ui/Window;Lcom/sun/glass/ui/Screen;I)Lcom/sun/glass/ui/Window; + 10758032 (IosApplication.java:78)
11  MyMobileApp                 0x0000000105915f50 [J]com.sun.javafx.tk.quantum.WindowStage.initPlatformWindow()V + 14344016 (WindowStage.java:198)
12  MyMobileApp                 0x0000000105915c7c [J]com.sun.javafx.tk.quantum.WindowStage.init(Lcom/sun/javafx/tk/quantum/GlassSystemMenu;)Lcom/sun/javafx/tk/quantum/WindowStage; + 14343292 (WindowStage.java:144)
13  MyMobileApp                 0x000000010590525c [J]com.sun.javafx.tk.quantum.QuantumToolkit.createTKStage(Ljavafx/stage/Window;ZLjavafx/stage/StageStyle;ZLjavafx/stage/Modality;Lcom/sun/javafx/tk/TKStage;ZLjava/security/AccessControlContext;)Lcom/sun/javafx/tk/TKStage; + 14275164 (QuantumToolkit.java:570)
14  MyMobileApp                 0x00000001061b485c [J]javafx.stage.Stage.impl_visibleChanging(Z)V + 23382108 (Stage.java:1164)
15  MyMobileApp                 0x00000001061b9bec [J]javafx.stage.Window$9.invalidated()V + 23403500 (Window$9.java:825)
16  MyMobileApp                 0x0000000105ed4e54 [J]javafx.beans.property.BooleanPropertyBase.markInvalid()V + 20368980 (BooleanPropertyBase.java:110)
17  MyMobileApp                 0x0000000105ed4f58 [J]javafx.beans.property.BooleanPropertyBase.set(Z)V + 20369240 (BooleanPropertyBase.java:146)
18  MyMobileApp                 0x00000001061b8564 [J]javafx.stage.Window.setShowing(Z)V + 23397732 (Window.java:923)
19  MyMobileApp                 0x00000001061b85d4 [J]javafx.stage.Window.show()V + 23397844 (Window.java:938)
20  MyMobileApp                 0x00000001061b34fc [J]javafx.stage.Stage.show()V + 23377148 (Stage.java:260)
21  MyMobileApp                 0x00000001054c4160 [J]com.gluonhq.charm.glisten.application.MobileApplication.a(Z)V + 9814368 (MobileApplication.java:277)
22  MyMobileApp                 0x00000001054c3e38 [J]com.gluonhq.charm.glisten.application.MobileApplication.start(Ljavafx/stage/Stage;)V + 9813560 (MobileApplication.java:235)
23  MyMobileApp                 0x00000001055f8a54 [J]com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(Ljava/util/concurrent/atomic/AtomicBoolean;Ljavafx/application/Application;)V + 11078228 (LauncherImpl.java:868)

There's more in the report but I think this should be enough. If more information is needed I will glady provide it.


Solution

  • Until a new JavaFXPorts repo is officially published with the fix, you can download the custom ios-sdk from this repository . Extract it and change your build.gradle as follows to use it:

    jfxmobile {
        javafxportsVersion = '8.60.13'
        ios {
            iosSdk='<PATH_TO_EXTRACTED_ios-sdk>';
            ....
        }
    }