App generated with RAB 11.02 crashes on Change Text Appearance

When changing Text Appearance, the app crashes 90% of the time with:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String c.a.a.b.b.f.d.K()' on a null object reference
    at org.sil.app.android.scripture.x.d(Unknown Source:5)
    at org.sil.app.android.scripture.x.f(Unknown Source:11)
    at org.sil.app.android.scripture.x.a(Unknown Source:0)
    at org.sil.app.android.scripture.e.k.a(Unknown Source:22)
    at c.a.a.a.a.d.b.onClick(Unknown Source:50)
    at android.view.View.performClick(View.java:7892)
    at android.widget.TextView.performClick(TextView.java:16220)
    at android.view.View.performClickInternal(View.java:7869)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:30891)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8762)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

It was built with:

  • Zulu 17.42.19, JDK 17.0.7
  • SDK:
    • Tools: 26.1.1
    • Build tools: 34.0.0
    • Platform tools: 34.0.4
    • Platform API: Android 13 (API 33)

and I’m testing it on a Samsung Galaxy S23 with Android 13. I’m trying to get this updated before the August 31 cut off. Any ideas? I would submit this as a bug report, but outside of this community, I’m not sure how to do that. My son is a professional Java dev, so if we had the source code he could probably fix it. :slight_smile:

Update: I copied the appDef and accompanying directory to my Windows laptop (I was using a Mac for the above), recompiled, and that APK does not crash under the same circumstances on my Android device. The JDK on Windows is different:

java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

Matt, please could you give us some more information about when this crash happens. Is it when you are viewing a book, or when you are in the contents menu? If it is a book, what kind of book is it?

Hi Richard. Thanks for your reply. It happens when changing Text Appearance. If I load the app, then go to the hamburger menu in the top-left, then click Text Appearance, it works fine. I can change the font size, but when I click a different background (sepia or black) the app crashes. Note that it doesn’t crash if I build it on my Windows computer–only if it’s on my Mac. Besides the operating system itself (and all sorts of things that go with that) the main difference I see is that I’m running the Oracle JDK on Windows:

java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)