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

App is crashing - NullPointerException: Attempt to invoke virtual method 'float java.lang.Float.floatValue()' on a null object reference #2179

Open
jakub-oone opened this issue Oct 18, 2024 · 1 comment

Comments

@jakub-oone
Copy link

Hello Chris,

we got the error "Attempt to invoke virtual method 'float java.lang.Float.floatValue()' on a null object reference"

Stack trace:
NullPointerException
Attempt to invoke virtual method 'float java.lang.Float.floatValue()' on a null object reference

com.transistorsoft.locationmanager.service.StopTimeoutEvaluator in a at line 1
com.transistorsoft.locationmanager.service.PolygonGeofencingService in c at line 2
com.transistorsoft.locationmanager.service.PolygonGeofencingService in a at line 2
com.transistorsoft.locationmanager.service.PolygonGeofencingService$a in run at line 87
java.util.concurrent.ThreadPoolExecutor in runWorker at line 1145
java.util.concurrent.ThreadPoolExecutor$Worker in run at line 644
java.lang.Thread in run at line 1012

Could you please look at this?

Your Environment

  • Plugin version: 4.17.2
  • Platform: Android
  • OS version: Android 12
  • Device manufacturer / model: Redmi / M2003J15SC (SP1A.210812.016)
  • React Native version (react-native -v): 0.73.7
  • Plugin config
const state:State = await BackgroundGeolocation.ready({
     desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_MEDIUM,
    distanceFilter: 20,
    reset: true,
    debug: false,
    stopOnTerminate: false,
    stopOnStationary: false,
    startOnBoot: true,
    enableHeadless: true,
    maxDaysToPersist: 2,
    geofenceProximityRadius: 50000,
    geofenceInitialTriggerEntry: true,
    preventSuspend: true,
    disableLocationAuthorizationAlert: true,
    locationAuthorizationRequest: 'Always',
    useSignificantChangesOnly: false,
    geofenceModeHighAccuracy: false,
    logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
    });

Expected Behavior

App is not crashing

Actual Behavior

App is crashing

Steps to Reproduce

  1. Add some geofences to BackgroundGeolocation.addGeofences(geofences)
  2. Start monitore polygone
  3. App crash after some time (randomly)

Context

Debug logs

Logs
PASTE_YOUR_LOGS_HERE
@christocracy
Copy link
Member

I think I see what's causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants