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

report generation does not honor event order #22

Closed
mathisdt opened this issue Sep 3, 2017 · 2 comments
Closed

report generation does not honor event order #22

mathisdt opened this issue Sep 3, 2017 · 2 comments

Comments

@mathisdt
Copy link
Owner

mathisdt commented Sep 3, 2017

The report generation mechanism seems to have problems with the order in which events are interpreted if at any time a week's sum is negative.

Also see #21.

@mathisdt
Copy link
Owner Author

mathisdt commented Sep 3, 2017

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalArgumentException: sum of a week may not be negative
at org.zephyrsoft.trackworktime.model.Week.setSum(Week.java:65)
at org.zephyrsoft.trackworktime.timer.TimerManager.updateWeekSum(TimerManager.java:598)
at org.zephyrsoft.trackworktime.timer.TimerManager.createEvent(TimerManager.java:581)
at org.zephyrsoft.trackworktime.database.DAO.restoreFromReader(DAO.java:759)
at org.zephyrsoft.trackworktime.WorkTimeTrackerActivity$15.doInBackground(WorkTimeTrackerActivity.java:1036)
at org.zephyrsoft.trackworktime.WorkTimeTrackerActivity$15.doInBackground(WorkTimeTrackerActivity.java:1021)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 4 more
java.lang.IllegalArgumentException: sum of a week may not be negative
at org.zephyrsoft.trackworktime.model.Week.setSum(Week.java:65)
at org.zephyrsoft.trackworktime.timer.TimerManager.updateWeekSum(TimerManager.java:598)
at org.zephyrsoft.trackworktime.timer.TimerManager.createEvent(TimerManager.java:581)
at org.zephyrsoft.trackworktime.database.DAO.restoreFromReader(DAO.java:759)
at org.zephyrsoft.trackworktime.WorkTimeTrackerActivity$15.doInBackground(WorkTimeTrackerActivity.java:1036)
at org.zephyrsoft.trackworktime.WorkTimeTrackerActivity$15.doInBackground(WorkTimeTrackerActivity.java:1021)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

@mathisdt
Copy link
Owner Author

A week's sum is not calculated this way anymore.

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

1 participant