Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] NullPointerException: Attempt to invoke virtual method WindowsInsetsController #60

Closed
ShootingKing-AM opened this issue Jan 27, 2021 · 0 comments
Labels
bug Something isn't working fixed Issued fixed

Comments

@ShootingKing-AM
Copy link
Member

ShootingKing-AM commented Jan 27, 2021

Describe the bug/issue
NullPointerException: Attempt to invoke virtual method WindowsInsetsController.
The app crashes a split second after Steamvr tries to establish a connection to it

Envirnoment:

  • Desktop OS: __
  • Android OS: Lineageos 18.1 (Android 11)
  • Mobile Device Model: Oneplus 5

Stacktrace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{viritualisres.phonevr\/viritualisres.phonevr.GameActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7660)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)\nCaused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
	at com.android.internal.policy.PhoneWindow.getInsetsController(PhoneWindow.java:3880)
	at viritualisres.phonevr.GameActivity.setImmersiveSticky(GameActivity.kt:236)
	at viritualisres.phonevr.GameActivity.onCreate(GameActivity.kt:91)
	at android.app.Activity.performCreate(Activity.java:8000)
	at android.app.Activity.performCreate(Activity.java:7984)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
	... 11 more

LogCat:

01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1261)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1117)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at viritualisres.phonevr.MainActivity.onCreate(MainActivity.kt:30)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.Activity.performCreate(Activity.java:8000)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.Activity.performCreate(Activity.java:7984)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.os.Handler.dispatchMessage(Handler.java:106)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.os.Looper.loop(Looper.java:223)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at android.app.ActivityThread.main(ActivityThread.java:7660)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at java.lang.reflect.Method.invoke(Native Method)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-26 21:49:21.814 E\/TypefaceCompatApi26Impl(23308): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-26 21:49:21.827 D\/PhoneVR (23308): ExtDir: \/storage\/emulated\/0\/Android\/data\/viritualisres.phonevr\/files, ExtRead Only? :false, ExtAvalb ?:true
01-26 21:49:21.827 D\/PVR-JNI-D(23308): Directory Error 17 (\/storage\/emulated\/0\/Android\/data\/viritualisres.phonevr\/files): \/storage\/emulated\/0\/Android\/data\/viritualisres.phonevr\/files\/PVR\/ - File exists
01-26 21:49:21.828 W\/alisres.phonevr(23308): type=1400 audit(0.0:488): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tclass=netlink_route_socket permissive=0 b\/155595000 app=viritualisres.phonevr
01-26 21:49:21.828 W\/alisres.phonevr(23308): type=1400 audit(0.0:489): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tclass=netlink_route_socket permissive=0 b\/155595000 app=viritualisres.phonevr
01-26 21:49:21.830 W\/GooglePlayServicesUtil(23308): Google Play Store is missing.
01-26 21:49:21.830 W\/FA      (23308): Service invalid
01-26 21:49:21.846 I\/FA      (23308): Tag Manager is not found and thus will not be used
01-26 21:49:21.852 I\/AdrenoGLES(23308): QUALCOMM build                   : 6209c5d, Ifdcc64d6e8
01-26 21:49:21.852 I\/AdrenoGLES(23308): Build Date                       : 12\/12\/19
01-26 21:49:21.852 I\/AdrenoGLES(23308): OpenGL ES Shader Compiler Version: EV031.27.05.03
01-26 21:49:21.852 I\/AdrenoGLES(23308): Local Branch                     : mybranchea1c9b4a-9e05-f149-a3b2-1458d0b52ae8
01-26 21:49:21.852 I\/AdrenoGLES(23308): Remote Branch                    : quic\/gfx-adreno.lnx.1.0.r85-rel
01-26 21:49:21.852 I\/AdrenoGLES(23308): Remote Branch                    : NONE
01-26 21:49:21.852 I\/AdrenoGLES(23308): Reconstruct Branch               : NOTHING
01-26 21:49:21.852 I\/AdrenoGLES(23308): Build Config                     : C O 9.0.3 AArch32
01-26 21:49:21.855 I\/AdrenoGLES(23308): PFP: 0x005ff112, ME: 0x005ff066
01-26 21:49:21.872 I\/Gralloc4(23308): mapper 4.x is not supported
01-26 21:49:21.872 W\/Gralloc3(23308): mapper 3.x is not supported
01-26 21:49:21.893 I\/TetheringManager(23308): registerTetheringEventCallback:viritualisres.phonevr
01-26 21:49:21.918 W\/ContextImpl(23308): Failed to ensure \/data\/user\/0\/com.google.android.gms\/shared_prefs: mkdir failed: ENOENT (No such file or directory)
01-26 21:49:43.139 W\/SdkConfigurationReader(23308): VrParamsProvider returned null params, using defaults.
01-26 21:49:43.141 V\/GvrLayoutFactory(23308): Dynamic library loading disabled, using built-in GvrLayout implementation.
01-26 21:49:43.159 D\/ConfigUtils(23308): Parameters file not found for reading: java.io.FileNotFoundException: \/storage\/emulated\/0\/Cardboard\/current_device_params: open failed: ENOENT (No such file or directory)
01-26 21:49:43.160 I\/GVR     (23308): [vr\/gvr\/capi\/src\/gvr.cc:103] Initialized GVR version 1.101.0
01-26 21:49:43.167 D\/GvrLayoutFactory(23308): Loaded GvrLayout from SDK.
01-26 21:49:43.168 D\/AndroidRuntime(23308): Shutting down VM
01-26 21:49:43.169 E\/AndroidRuntime(23308): FATAL EXCEPTION: main
01-26 21:49:43.169 E\/AndroidRuntime(23308): Process: viritualisres.phonevr, PID: 23308
01-26 21:49:43.169 E\/AndroidRuntime(23308): java.lang.RuntimeException: Unable to start activity ComponentInfo{viritualisres.phonevr\/viritualisres.phonevr.GameActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.os.Handler.dispatchMessage(Handler.java:106)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.os.Looper.loop(Looper.java:223)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.ActivityThread.main(ActivityThread.java:7660)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at java.lang.reflect.Method.invoke(Native Method)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-26 21:49:43.169 E\/AndroidRuntime(23308): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at com.android.internal.policy.PhoneWindow.getInsetsController(PhoneWindow.java:3880)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at viritualisres.phonevr.GameActivity.setImmersiveSticky(GameActivity.kt:236)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at viritualisres.phonevr.GameActivity.onCreate(GameActivity.kt:91)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.Activity.performCreate(Activity.java:8000)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.Activity.performCreate(Activity.java:7984)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
01-26 21:49:43.169 E\/AndroidRuntime(23308): 	... 11 more
01-26 21:49:43.169 E\/ACRA    (23308): ACRA caught a RuntimeException for viritualisres.phonevr
01-26 21:49:43.169 E\/ACRA    (23308): java.lang.RuntimeException: Unable to start activity ComponentInfo{viritualisres.phonevr\/viritualisres.phonevr.GameActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.os.Handler.dispatchMessage(Handler.java:106)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.os.Looper.loop(Looper.java:223)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.ActivityThread.main(ActivityThread.java:7660)
01-26 21:49:43.169 E\/ACRA    (23308): 	at java.lang.reflect.Method.invoke(Native Method)
01-26 21:49:43.169 E\/ACRA    (23308): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-26 21:49:43.169 E\/ACRA    (23308): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-26 21:49:43.169 E\/ACRA    (23308): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference
01-26 21:49:43.169 E\/ACRA    (23308): 	at com.android.internal.policy.PhoneWindow.getInsetsController(PhoneWindow.java:3880)
01-26 21:49:43.169 E\/ACRA    (23308): 	at viritualisres.phonevr.GameActivity.setImmersiveSticky(GameActivity.kt:236)
01-26 21:49:43.169 E\/ACRA    (23308): 	at viritualisres.phonevr.GameActivity.onCreate(GameActivity.kt:91)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.Activity.performCreate(Activity.java:8000)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.Activity.performCreate(Activity.java:7984)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
01-26 21:49:43.169 E\/ACRA    (23308): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
01-26 21:49:43.169 E\/ACRA    (23308): 	... 11 more
01-26 21:49:43.184 D\/CompatibilityChangeReporter(23308): Compat change id reported: 149924527; UID 10214; state: ENABLED
01-26 21:49:43.184 D\/CompatibilityChangeReporter(23308): Compat change id reported: 132649864; UID 10214; state: DISABLED

Issue reported by @barkely128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issued fixed
Projects
None yet
Development

No branches or pull requests

1 participant