DrDab/TrcAttendance-Android

crash when try to open csv file

muhammadarif1 opened this issue · 7 comments

crash when try to open csv file
DrDab commented

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

DrDab commented

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.

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

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

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

can you labelled is as a bug

DrDab commented

Done!

DrDab commented

Problem should be solved as of commit 099e2ff.