SUMMARY Krita 5.3.1(.1) crashes on startup on my old device, but not other devices. logcat shows: > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: Failed to enter fullscreen > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: java.lang.NullPointerException: Attempt to invoke virtual method 'void > android.view.View.requestLayout()' on a null object reference > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: at org.qtproject.qt5.android.QtActivityDelegate.setFullScreen(r8-> map-id-de68625f794a6cb9b53c29a96a04e6fb0261fa39ca10aef2ca0e6306d97babf2:100) > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: at org.qtproject.qt5.android.bindings.QtActivity.setFullScreen(r8-> map-id-de68625f794a6cb9b53c29a96a04e6fb0261fa39ca10aef2ca0e6306d97babf2:5) > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: at org.krita.android.MainActivity.onStart(r8-map-id-> de68625f794a6cb9b53c29a96a04e6fb0261fa39ca10aef2ca0e6306d97babf2:11) > 04-06 11:11:33.336 21210 21210 E krita.MainActivity: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1249) STEPS TO REPRODUCE Open Krita OBSERVED RESULT "fatal error" EXPECTED RESULT Krita starts SOFTWARE/OS VERSIONS Krita 5.3.1.1, Android 7.1 arm32 ADDITIONAL INFORMATION 5.3.0-prealpha-5a235908 from December doesn't crash, despite that it should also go fullscreen on startup. 5.4.0-prealpha-79e44113 (from April) does crash.
Took another look at this and found the actual cause. Preceding the "Failed to enter fullscreen" message is > 04-06 11:08:29.668 21141 21141 W System.err: Caused by: java.lang.NoSuchMethodError: No virtual method setFocusedByDefault(Z)V in class Landroid/view/ViewGroup; or its super classes (declaration of 'android.view.ViewGroup' appears in /system/framework/framework.jar:classes2.dex) > 04-06 11:08:29.668 21141 21141 W System.err: at org.qtproject.qt5.android.QtLayout.initializeFocus(r8-map-id-de68625f794a6cb9b53c29a96a04e6fb0261fa39ca10aef2ca0e6306d97babf2:8) setFocusedByDefault doesn't exist on Android 7 (nor does setFocusable). That causes QtLayout to break, which causes it to fail to go fullscreen. That function call was added by the "Android text input fixes" Qt patch (https://invent.kde.org/szaman/qtbase/-/merge_requests/12/).
Fix is pending here https://invent.kde.org/szaman/qtbase/-/merge_requests/18 `setFocusable` *does* exist on Android 7 (all the way down to 1), they just added another overload of it later, but we're not calling that.
*** Bug 520374 has been marked as a duplicate of this bug. ***
The above fix was merged and I confirmed it works with my own build. It should be in the upcoming 5.3.2 release.