gree / gree/unity-webview

can't run in android platform, report null pointer error, how to fix it

Open
#355 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

09-18 11:09:58.346 16305-16305/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.star.webviewtest, PID: 16305
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 5.6.1p4
Device model : samsung SM-N920S
Device fingerprint: samsung/noblelteskt/noblelteskt:7.0/NRD90M/N920SKSU2DQL1:user/release-keys

                                               Caused by: java.lang.RuntimeException: Unable to resume activity {com.star.webviewtest/net.gree.unitywebview.CUnityPlayerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.unity3d.player.k.b(boolean)' on a null object reference
                                                   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3791)
                                                   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3832)
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2994)
                                                   at android.app.ActivityThread.-wrap14(ActivityThread.java)
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
                                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                                   at android.os.Looper.loop(Looper.java:154)
                                                   at android.app.ActivityThread.main(ActivityThread.java:6682)
                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
                                                Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.unity3d.player.k.b(boolean)' on a null object reference
                                                   at com.unity3d.player.UnityPlayer.resume(Unknown Source)
                                                   at com.unity3d.player.UnityPlayerActivity.onResume(Unknown Source)
                                                   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1277)
                                                   at android.app.Activity.performResume(Activity.java:7088)
                                                   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3768)
                                                   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3832) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2994) 
                                                   at android.app.ActivityThread.-wrap14(ActivityThread.java) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:154) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:6682) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash on Android with Unity 5.6.1p4 and inspect the stack trace from CUnityPlayerActivity.onResume through UnityPlayer.resume. Start by checking the Android activity lifecycle and the initialization associated with the reported null object. Done means the application resumes without the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, unity
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.