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

ArrayIndexOutOfBoundsException #113

Closed
icetum15 opened this issue Sep 3, 2018 · 2 comments
Closed

ArrayIndexOutOfBoundsException #113

icetum15 opened this issue Sep 3, 2018 · 2 comments

Comments

@icetum15
Copy link

icetum15 commented Sep 3, 2018

Sensor: GPS / ATGM332D-5N
Board: raspberry pi 3 model B
System: things 1.0.0

When I call OnNmeaMessageListener will occur error, Please check it, Thanks :)

01-01 00:44:31.922 2257-2257/com.test.anfu.gpsthings D/vndksupport: Loading /vendor/lib/hw/[email protected] from current namespace instead of sphal namespace.
01-01 00:44:32.700 2257-2257/? V/apple: NMEA: GNGGA,123338.288,,,,,0,00,25.5,,,,,,
01-01 00:44:32.724 2257-2257/? V/apple: NMEA: GNGLL,,,,,123338.288,V,M
01-01 00:44:32.775 2257-2257/? V/apple: NMEA: GPGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5
01-01 00:44:32.815 2257-2257/? V/apple: NMEA: BDGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5
01-01 00:44:32.883 2257-2257/? D/AndroidRuntime: Shutting down VM

--------- beginning of crash
01-01 00:44:32.897 2257-2257/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.test.anfu.gpsthings, PID: 2257
java.lang.ArrayIndexOutOfBoundsException: length=19; index=19
at com.google.android.things.contrib.driver.gps.NmeaParser.handleSatelliteData(NmeaParser.java:198)
at com.google.android.things.contrib.driver.gps.NmeaParser.processMessageFrame(NmeaParser.java:101)
at com.google.android.things.contrib.driver.gps.NmeaGpsModule.handleFrameEnd(NmeaGpsModule.java:200)
at com.google.android.things.contrib.driver.gps.NmeaGpsModule.processBuffer(NmeaGpsModule.java:169)
at com.google.android.things.contrib.driver.gps.NmeaGpsModule.readUartBuffer(NmeaGpsModule.java:154)
at com.google.android.things.contrib.driver.gps.NmeaGpsModule.access$000(NmeaGpsModule.java:35)
at com.google.android.things.contrib.driver.gps.NmeaGpsModule$1.onUartDeviceDataAvailable(NmeaGpsModule.java:132)
at com.google.android.things.pio.UartDeviceImpl$UartDeviceCallbackDispatch.dispatchInterruptEvent(UartDeviceImpl.java:250)
at com.google.android.things.pio.CallbackDispatch.onFileDescriptorEvents(CallbackDispatch.java:149)
at android.os.MessageQueue.dispatchEvents(MessageQueue.java:284)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-01 00:44:32.928 2257-2257/? I/Process: Sending signal. PID: 2257 SIG: 9

@devunwired
Copy link
Contributor

Please verify that you are using the latest v1.1 of the driver:

dependencies {
    implementation 'com.google.android.things.contrib:driver-gps:1.1'
}

@icetum15
Copy link
Author

icetum15 commented Sep 4, 2018

Thanks,It's ok when I use the latest version.

@Fleker Fleker closed this as completed Sep 4, 2018
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

3 participants