Crash when attempting to open a cache from a link.
See original GitHub issueBug description
Crash when clicking on link http://coord.info/GC6TW0V from an email. This cache was already stored in the app as active, but the email was an archive notification.
Reproduce
Steps to reproduce the problem
Click on link.
Actual result after these steps
Crash.
Expected result after these steps
App should open cache details.
c:geo version
2021.07.06-RC
Reproducible
No. It crashed on two seperate attempts. Then I brought the app to foreground and subsequent attempt was successful.
System information
Device:
Device type: Pixel 3 XL (crosshatch, google)
Available processors: 8
Android version: 11
Android build: RQ3A.210605.005
Screen resolution: 1440x2621px (411x748dp)
Sailfish OS detected: false
Google Play services: disabled - 21.21.16 (150400-378233385)
HW acceleration: enabled (default state)
Sensor and location:
Low power mode: active
Compass capabilities: yes
Rotation vector sensor: present
Orientation sensor: present
Magnetometer & Accelerometer sensor: present
Direction sensor used: rotation vector
Program settings:
Hide caches: own/
Hide waypoints: -
Set language: en_US (system default)
System date format: M/d/yy
Debug mode active: no
Live map mode: true
OSM multi-threading: true / threads: 4
Global filter: display all caches
Last backup: May 6, 5:00 AM
Routing mode: Walk
Settings: v5, Count:151
Map: OpenStreetMap.org
Id: cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider$OsmMapSource
Atts: © OpenStreetMap DE, map data OpenStreetMap contributors
Theme: Elevate.zip:Elements.xml
Services:
Geocaching sites enabled: geocaching.com: Logged in (Login OK) / PREMIUM Geocaching.com Adventure Lab
Geocaching.com date format: M/d/yyyy
Routing: internal / BRouter installed: true
Installed c:geo plugins: none
Permissions & paths:
Fine location permission: granted
Write external storage permission: granted
System internal c:geo dir: /data/user/0/cgeo.geocaching (19.7 GB free) v2 internal isDir(6 entries)
Legacy User storage c:geo dir: /storage/emulated/0/cgeo (19.7 GB free) v2 external non-removable isDir(7 entries)
Geocache data: /storage/emulated/0/Android/data/cgeo.geocaching/files/GeocacheData (19.7 GB free) v2 external non-removable isDir(3371 entries)
Internal theme sync (is turned off): /data/user/0/cgeo.geocaching/MapThemeData (19.7 GB free) v2 internal isDir(0 entries)
Public Folders: #11
BASE: /cgeo (User-Defined)[/cgeo[DOCUMENT#0:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo, Av:true, files:>=48, dirs:>=9, totalFileSize:>=293.3 MB, free space: 19.7 GB, files on device: 13193728)
OFFLINE_MAPS: /GCDroid/maps (User-Defined)[/GCDroid/maps[DOCUMENT#0:p-content://com.android.externalstorage.documents/tree/primary%3AGCDroid%2Fmaps::]] (Uri: content://com.android.externalstorage.documents/tree/primary%3AGCDroid%2Fmaps/document/primary%3AGCDroid%2Fmaps, Av:true, files:4, dirs:1, totalFileSize:1.4 GB, free space: 19.7 GB, files on device: 13193728)
OFFLINE_MAP_THEMES: /GCDroid/maps/_themes (Default)[/GCDroid/maps/_themes[PERSISTABLE_FOLDER(OFFLINE_MAPS)#1:p-content://com.android.externalstorage.documents/tree/primary%3AGCDroid%2Fmaps::/_themes]] (Uri: content://com.android.externalstorage.documents/tree/primary%3AGCDroid%2Fmaps/document/primary%3AGCDroid%2Fmaps%2F_themes, Av:true, files:2, dirs:0, totalFileSize:467.3 KB, free space: 19.7 GB, files on device: 13193728)
LOGFILES: /cgeo/logfiles (Default)[/cgeo/logfiles[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/logfiles]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Flogfiles, Av:true, files:1, dirs:0, totalFileSize:56.1 KB, free space: 19.7 GB, files on device: 13193728)
GPX: /cgeo/gpx (Default)[/cgeo/gpx[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/gpx]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Fgpx, Av:true, files:43, dirs:0, totalFileSize:72.9 MB, free space: 19.7 GB, files on device: 13193728)
BACKUP: /cgeo/backup (Default)[/cgeo/backup[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/backup]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Fbackup, Av:true, files:4, dirs:2, totalFileSize:220.3 MB, free space: 19.7 GB, files on device: 13193728)
FIELD_NOTES: /cgeo/field-notes (Default)[/cgeo/field-notes[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/field-notes]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Ffield-notes, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 19.7 GB, files on device: 13193728)
SPOILER_IMAGES: /cgeo/GeocachePhotos (Default)[/cgeo/GeocachePhotos[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/GeocachePhotos]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2FGeocachePhotos, Av:true, files:>=0, dirs:>=15, totalFileSize:>=0 B, free space: 19.7 GB, files on device: 13193728)
ROUTING_BASE: /cgeo/routing (Default)[/cgeo/routing[PERSISTABLE_FOLDER(BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/routing]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Frouting, Av:true, files:8, dirs:1, totalFileSize:51.8 MB, free space: 19.7 GB, files on device: 13193728)
ROUTING_TILES: /cgeo/routing/segments4 (Default)[/cgeo/routing/segments4[PERSISTABLE_FOLDER(ROUTING_BASE)#1:p-content://com.android.externalstorage.documents/tree/primary%3Acgeo::/routing/segments4]] (Uri: content://com.android.externalstorage.documents/tree/primary%3Acgeo/document/primary%3Acgeo%2Frouting%2Fsegments4, Av:true, files:1, dirs:0, totalFileSize:51.7 MB, free space: 19.7 GB, files on device: 13193728)
TEST_FOLDER: [Legacy]/data/user/0/cgeo.geocaching/files/unittest (Default)[/data/user/0/cgeo.geocaching/files/unittest[FILE#1:p-file:///data/user/0/cgeo.geocaching/files::/unittest]] (Uri: file:///data/user/0/cgeo.geocaching/files/unittest, Av:true, files:0, dirs:0, totalFileSize:0 B, free space: 19.7 GB, files on device: -1)
Map render theme path: Elevate.zip:Elements.xml
PersistedDocumentUris: #1
TRACK: null
Persisted Uri Permissions: #2
content://com.android.externalstorage.documents/tree/primary%3AGCDroid%2Fmaps (Mar 30, 7:53 PM):RW
content://com.android.externalstorage.documents/tree/primary%3Acgeo (Mar 30, 7:52 PM):RW
Database: /data/user/0/cgeo.geocaching/databases/data (v95, Size:120.2 MB) on system internal storage
Screenshots
07-07 15:06:17.979 25799 25799 E AndroidRuntime: FATAL EXCEPTION: main 07-07 15:06:17.979 25799 25799 E AndroidRuntime: Process: cgeo.geocaching, PID: 25799 07-07 15:06:17.979 25799 25799 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{cgeo.geocaching/cgeo.geocaching.CacheDetailActivity}: java.lang.NullPointerException: Attempt to invoke virtual method ‘io.reactivex.rxjava3.core.Observable io.reactivex.rxjava3.core.Observable.observeOn(io.reactivex.rxjava3.core.Scheduler)’ on a null object reference 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7664) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘io.reactivex.rxjava3.core.Observable io.reactivex.rxjava3.core.Observable.observeOn(io.reactivex.rxjava3.core.Scheduler)’ on a null object reference 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.sensors.GeoDirHandler.start(GeoDirHandler.java:102) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.sensors.GeoDirHandler.start(GeoDirHandler.java:85) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.CacheDetailActivity.startOrStopGeoDataListener(CacheDetailActivity.java:399) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.CacheDetailActivity.lambda$onCreate$0(CacheDetailActivity.java:336) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.CacheDetailActivity.lambda$onCreate$0$CacheDetailActivity(Unknown Source:0) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.-$$Lambda$CacheDetailActivity$8RiEoiH9d2V4Akug-ZG4XuRm9d0.call(Unknown Source:4) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.activity.TabbedViewPagerActivity$1.onPageSelected(TabbedViewPagerActivity.java:88) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.CompositeOnPageChangeCallback.onPageSelected(CompositeOnPageChangeCallback.java:73) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.CompositeOnPageChangeCallback.onPageSelected(CompositeOnPageChangeCallback.java:73) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.ScrollEventAdapter.dispatchSelected(ScrollEventAdapter.java:432) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.ScrollEventAdapter.notifyProgrammaticScroll(ScrollEventAdapter.java:320) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.ViewPager2.setCurrentItemInternal(ViewPager2.java:652) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.ViewPager2.setCurrentItem(ViewPager2.java:607) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at androidx.viewpager2.widget.ViewPager2.setCurrentItem(ViewPager2.java:591) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.activity.TabbedViewPagerActivity.createViewPager(TabbedViewPagerActivity.java:52) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at cgeo.geocaching.CacheDetailActivity.onCreate(CacheDetailActivity.java:331) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7994) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7978) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404) 07-07 15:06:17.979 25799 25799 E AndroidRuntime: … 11 more
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
PR #11143 will fix this
maybe somehow related to fragment lifecycle? Recreating fragments, but not fully instantiating all contents? (I’m still not 100% confident that my migration of cache pages to tabbed viewpager covers all edge cases…)