DrDab / TrcAttendance-Android

An Android port of the TRC Attendance app for FRC meeting attendance logging
http://www.titanrobotics.com/
MIT License
1 stars 0 forks source link

crash when try to open csv file #2

Closed muhammadarif1 closed 6 years ago

DrDab commented 6 years ago

Can you please post a Logcat stack trace of the crash? Try reproducing the crash again with ADB Logcat on. Thank you 🙂

DrDab commented 6 years ago

Adding on, was the CSV file generated by the Attendance app? The app only parses CSV files that share a common format the app's common library uses.

muhammadarif1 commented 6 years ago

EXPECTED BEHAVIOR

the user should be able to open csv file or txt file. or if the file extension is incorrect the file can not open and display a dialog if the file is not supported without causing this application to crash

ACTUAL BEHAVIOR

when I want to open a file in the form of txt and csv this app crashes and stops working

HOW TO REPRODUCE

bug recording

https://youtu.be/oWH6LFTZRsc

LOG CAT FILE


Process: com.team3543.trcattendance_android, PID: 13060
java.util.NoSuchElementException
    at java.util.Scanner.nextLine(Scanner.java:1363)
    at attendance.AttendanceLog.<init>(AttendanceLog.java:58)
    at com.team3543.trcattendance_android.DataStore.loadCSV(DataStore.java:210)
    at com.team3543.trcattendance_android.MainActivity$4.fileSelected(MainActivity.java:227)
    at com.team3543.trcattendance_android.FileChooser$1.onItemClick(FileChooser.java:71)
    at android.widget.AdapterView.performItemClick(AdapterView.java:305)
    at android.widget.AbsListView.performItemClick(AbsListView.java:1163)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3181)
    at android.widget.AbsListView.onTouchUp(AbsListView.java:4008)
    at android.widget.AbsListView.onTouchEvent(AbsListView.java:3773)
    at android.view.View.dispatchTouchEvent(View.java:8484)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2432)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2103)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2438)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2438)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2438)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2438)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2424)
    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1768)
    at android.app.Dialog.dispatchTouchEvent(Dialog.java:789)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2385)
    at android.view.View.dispatchPointerEve```
DrDab commented 6 years ago

Thank you for the report! I will be adding support to display an error message in case such an exception is caught. 👍

muhammadarif1 commented 6 years ago

can you labelled is as a bug

DrDab commented 6 years ago

Done!

DrDab commented 6 years ago

Problem should be solved as of commit 099e2ff.