x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Android app crashes on startup NullPointerException VerifyOBBOnStartUp

Hi,

Steps to reproduce the issue

  1. Opens the game for the first time after installation, it verifies OBB and opens the game just fine.

  2. I exit normally and totally close the application from Android then re-open again, it crashes after showing the splash screen.

  3. To make it work again, I must delete the application and re-install it again.

  4. Got the exception from logcat as following

    07-26 07:53:09.634: E/AndroidRuntime(27128): FATAL EXCEPTION: main 07-26 07:53:09.634: E/AndroidRuntime(27128): Process: xyz.edhash.games.bumpex2.release, PID: 27128 07-26 07:53:09.634: E/AndroidRuntime(27128): java.lang.RuntimeException: Unable to start activity ComponentInfo{xyz.edhash.games.bumpex2.release/xyz.edhash.games.bumpex2.release.DownloaderActivity}: java.lang.NullPointerException: Attempt to read from field 'boolean com.epicgames.ue4.GameActivity.VerifyOBBOnStartUp' on a null object reference 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread.access$800(ActivityThread.java:155) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.os.Handler.dispatchMessage(Handler.java:102) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.os.Looper.loop(Looper.java:135) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread.main(ActivityThread.java:5343) 07-26 07:53:09.634: E/AndroidRuntime(27128): at java.lang.reflect.Method.invoke(Native Method) 07-26 07:53:09.634: E/AndroidRuntime(27128): at java.lang.reflect.Method.invoke(Method.java:372) 07-26 07:53:09.634: E/AndroidRuntime(27128): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 07-26 07:53:09.634: E/AndroidRuntime(27128): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 07-26 07:53:09.634: E/AndroidRuntime(27128): Caused by: java.lang.NullPointerException: Attempt to read from field 'boolean com.epicgames.ue4.GameActivity.VerifyOBBOnStartUp' on a null object reference 07-26 07:53:09.634: E/AndroidRuntime(27128): at xyz.edhash.games.bumpex2.release.DownloaderActivity.f(Unknown Source) 07-26 07:53:09.634: E/AndroidRuntime(27128): at xyz.edhash.games.bumpex2.release.DownloaderActivity.onCreate(Unknown Source) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.Activity.performCreate(Activity.java:6010) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129) 07-26 07:53:09.634: E/AndroidRuntime(27128): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) 07-26 07:53:09.634: E/AndroidRuntime(27128): ... 10 more

What I tried is,

  • Disabling verify OBB on startup and it also failed with same exception.

  • Packaging development version instead of shipping, also failed.

  • Installing it via Google Play or by .bat file, it fails in both.

  • Disabling the internet connection from the phone while opening up the game the first time after installation, this results on opening up the game successfully every time until I turn on the internet connection again it then crashes on the second attempt and keep on crashing ever since until I re-install again.

Product Version: UE 4.16
Tags:
more ▼

asked Jul 26 '17 at 05:55 AM in Packaging & Deployment

avatar image

hossam.ahamid
6 2 5 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi,

Yes, I was able to fix it by removing the Google Cloud Messaging SenderID value that is in Google Play Service configurations in project settings and keeping it blank to disable it. I had a valid value in it before but don't use it anyway, so I don't have this crash any more after keeping it blank to disable it which is pretty weird to me actually. alt text

Thanks a lot for your support.

crashfix.png (30.2 kB)
more ▼

answered Aug 03 '17 at 02:22 AM

avatar image

hossam.ahamid
6 2 5 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi hossam.ahamaid,

Check your Android manifest file and see if there is a meta data for bVerifyOBBOnStartUp and set it to false. I think that your android app is trying to read this variable and it is not finding it anywhere. In my AndroidManifest.xml, I have something like this:

more ▼

answered Jul 26 '17 at 06:08 PM

avatar image

d0d0
482 17 9 18

avatar image hossam.ahamid Jul 26 '17 at 09:48 PM

I have already tried checking Disable verify OBB on start, I also tried your solution setting bVerifyOBBOnStartUp to false in AndroidManifest.xml in [Project]\Intermediate\Android\APK but still facing the same issue.

avatar image d0d0 Jul 26 '17 at 10:47 PM

Hi,

 07-26 07:53:09.634: E/AndroidRuntime(27128): FATAL EXCEPTION: main 07-26 07:53:09.634: E/AndroidRuntime(27128): Process: xyz.edhash.games.bumpex2.release, PID: 27128 07-26 07:53:09.634: E/AndroidRuntime(27128): java.lang.RuntimeException: Unable to start activity ComponentInfo{xyz.edhash.games.bumpex2.release/xyz.edhash.games.bumpex2.release.DownloaderActivity}: java.lang.NullPointerException: Attempt to read from field 'boolean com.epicgames.ue4.GameActivity.VerifyOBBOnStartUp' on a null object reference 07-26 07:53:09.634: 

Your error message tells me that it is unable to start Downloader Activity because Downloader Activity is trying to read this variable com.epicgames.ue4.GameActivity.VerifyOBBOnStartUp from Game Activity. Game Activity read this variable from the Manifest file.

Here is the code from DownloaderActivity.java where it tries to read the variable from GameActivity.java :

     private void ProcessOBBFiles()
     {
         if(GameActivity.Get().VerifyOBBOnStartUp && !expansionFilesUptoData()) {
                 validateXAPKZipFiles();
         } else {
                 OutputData.putExtra(GameActivity.DOWNLOAD_RETURN_NAME, GameActivity.DOWNLOAD_FILES_PRESENT);        
                 setResult(RESULT_OK, OutputData);
                 finish();
                 overridePendingTransition(R.anim.noaction, R.anim.noaction);
         }
     }

This chain from DownloaderActivity -> GameActivity.java -> AndroidManifest.xml where it reads bVerifyObbOnStartUp is broken. I would still bet that this is where the error lies.

Also can you check your actual manifest file thats on your android phone and confirm that the meta data is present ?

Thanks

avatar image hossam.ahamid Jul 27 '17 at 01:49 AM

Hi,

Yes, I can get that it fails here but what I can't get is why it is failing although everything should be normal with the obb, I even created another new project and copied the maps into it but still both projects fail with the same error. Also tried to change the package name..

I checked the manifest file on the device itself and all metadata are present.

Much appreciated.

avatar image d0d0 Jul 27 '17 at 10:14 PM

Hi,

One last thing...after this I am out of ideas ....

How come your package doesn't start with 'com' ? Your current package name says 'xyz.edhash.games.bumpex2.release.DownloaderActivity'... is this legal ? Does your GameActivity reside in a package 'com.epicgames.ue4' ?

Thanks d0d0

avatar image hossam.ahamid Jul 27 '17 at 11:14 PM

My domain is .xyz and not .com that is why I use .xyz instead. I think GameActivity class resides inside com.epicgames.ue4 as it is developed by epic games in unreal engine and not by me.

avatar image d0d0 Jul 28 '17 at 01:53 AM

Yes, GameActivity.java resides inside com.epicgames.ue4. Also you did set the variable bVerifyObbOnStartUp from the Project Settings tab as shown in the picture. I also assume that the package names are mentioned correctly in the activity files.

The only other option is to set a breakpoint on the line where this variable is being read and see whats going on.

ProjectSettings

avatar image d0d0 Aug 02 '17 at 10:53 AM

Hi, were you able to resolve this issue?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question