Trc attendance crash when open csv and txt file

in #utopian-io6 years ago

PROJECT INFO
repositories :https://github.com/DrDab/TrcAttendance-Android
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

download trcattendance from github release

install the app

launch the app

click the dot in the top right of the app

chose open file

click on txt file or csv file and look if the app will crashed

device: android 6.0

browser : trc attendance : v1.0 beta 3

BUG RECORDING
proof of work done
https://github.com/DrDab/TrcAttendance-Android/issues/2



LOG CAT FILE

at java.util.Scanner.nextLine(Scanner.java:1363) at attendance.AttendanceLog.(AttendanceLog.java:58) at com.team3543.trcattendance_android.DataStore.loadCSV(DataStore at com.team3543.trcattendance_android.MainActivity$4.fileSelected at com.team3543.trcattendance_android.FileChooser$1.onItemClick(F at android.widget.AdapterView.performItemClick(AdapterView.java:3 at android.widget.AbsListView.performItemClick(AbsListView.java:1 at android.widget.AbsListView$PerformClick.run(AbsListView.java:3 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 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2103) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2132) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDi at com.android.internal.policy.impl.PhoneWindow.superDispatchTouc at android.app.Dialog.dispatchTouchEvent(Dialog.java:789) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatc at android.view.View.dispatchPointerEve