microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.63k stars 1.73k forks source link

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setVisibility(int)' on a null object reference #473

Open jeekajoo opened 6 years ago

jeekajoo commented 6 years ago

Hi,

fr.paris.android.signalement is crashing at startup:

01-21 17:09:31.846  29017    29017   com.accenture.dans..  I  onUpdateLocation: adresse ok
01-21 17:09:31.853  29017    29017         AndroidRuntime  D  Shutting down VM
01-21 17:09:31.855  29017    29065                 OkHttp  D  --> POST https://teleservices.paris.fr/sira/rest/sira/signalement/api http/1.1
01-21 17:09:31.855  29017    29065                 OkHttp  D  Content-Type: application/x-www-form-urlencoded
01-21 17:09:31.855  29017    29065                 OkHttp  D  Content-Length: 165
01-21 17:09:31.855  29017    29065                 OkHttp  D  jsonStream=%5B%7B%22position%22%3A%7B%22latitude%22%3A48.8616943359375%2C%22longitude%22%3A2.3782265186309814%7D%2C%22request%22%3A
                                                            %22getIncidentsByPosition%22%7D%5D
01-21 17:09:31.855  29017    29065                 OkHttp  D  --> END POST (165-byte body)
01-21 17:09:31.920  29017    29017      UncaughtException  E  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setVisibility(int)' on a null object reference
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.accenture.dansmarue.ui.fragments.MapParisFragment.initLocationButton(MapParisFragment.java:279)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.accenture.dansmarue.ui.fragments.MapParisFragment.onMapReady(MapParisFragment.java:166)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.google.android.gms.maps.zzab.zza(Unknown Source)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.google.android.gms.maps.internal.zzaq.onTransact(Unknown Source)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at android.os.Binder.transact(Binder.java:499)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.google.android.gms.maps.internal.IOnMapReadyCallback$Stub$Proxy.onMapReady(IOnMapReadyCallback.java:79)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at org.microg.gms.maps.MapViewImpl$1.run(MapViewImpl.java:117)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at android.os.Handler.handleCallback(Handler.java:751)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at android.os.Handler.dispatchMessage(Handler.java:95)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at android.os.Looper.loop(Looper.java:154)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at android.app.ActivityThread.main(ActivityThread.java:6171)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at java.lang.reflect.Method.invoke(Native Method)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
01-21 17:09:31.920  29017    29017      UncaughtException  E  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  FATAL EXCEPTION: main
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  Process: fr.paris.android.signalement, PID: 29017
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setVisibility(int)' on a null object reference
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.accenture.dansmarue.ui.fragments.MapParisFragment.initLocationButton(MapParisFragment.java:279)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.accenture.dansmarue.ui.fragments.MapParisFragment.onMapReady(MapParisFragment.java:166)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.google.android.gms.maps.zzab.zza(Unknown Source)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.google.android.gms.maps.internal.zzaq.onTransact(Unknown Source)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at android.os.Binder.transact(Binder.java:499)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.google.android.gms.maps.internal.IOnMapReadyCallback$Stub$Proxy.onMapReady(IOnMapReadyCallback.java:79)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at org.microg.gms.maps.MapViewImpl$1.run(MapViewImpl.java:117)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at android.os.Handler.handleCallback(Handler.java:751)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at android.os.Handler.dispatchMessage(Handler.java:95)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at android.os.Looper.loop(Looper.java:154)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at android.app.ActivityThread.main(ActivityThread.java:6171)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at java.lang.reflect.Method.invoke(Native Method)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
01-21 17:09:31.921  29017    29017         AndroidRuntime  E  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
01-21 17:09:31.923   856      6541        ActivityManager  W  Force finishing activity fr.paris.android.signalement/com.accenture.dansmarue.ui.activities.WelcomeMapActivity

Is there anything we can do to avoid it to crash?

OS: Omnirom 7.1.2 Phone: Nexus 5X (bullhead) microg version: 0.2.4-108+g464d454d App tested: fr.paris.android.signalement (Dans Ma Rue) version 2.0.3

Thanks. J.

MOVZX commented 6 years ago

Google Maps API is missing...

jeekajoo commented 6 years ago

What do you mean, on my side? or missing in microg generally?

MOVZX commented 6 years ago

It needs Google Maps API, you can get the framework & XML from Open GApps package.

jeekajoo commented 6 years ago

well that means stuff that I don't want running on my phone (play services), right?

ale5000-git commented 6 years ago

I'm not sure if it is the problem mentioned by MOVZX but in case it is then there is also the microG version of the Maps API v1 here.