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

Random crash Win10 #288

Closed
pcuci opened this issue Apr 5, 2019 · 5 comments
Closed

Random crash Win10 #288

pcuci opened this issue Apr 5, 2019 · 5 comments

Comments

@pcuci
Copy link

pcuci commented Apr 5, 2019

AW shuts down after a while, then I can't bring it back up by hand (seems to work on initial startup, I'm on Win 10, aw v0.8.0b8)

image

Logs

Not much I could find:

2019-03-30 16:02:34 [INFO ]: Starting module aw-server  (aw_qt.manager:46)
2019-03-30 16:02:34 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:46)
2019-03-30 16:02:34 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:46)
2019-03-30 16:02:34 [INFO ]: Creating trayicon...  (aw_qt.trayicon:150)
2019-03-31 08:54:45 [WARNING]: Tried to stop module aw-watcher-window, but it wasn't running  (aw_qt.manager:84)
2019-03-31 09:03:11 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:46)

Might be related to #85 ?

@pcuci
Copy link
Author

pcuci commented Apr 5, 2019

image

3GiB worth of logs(!) in ~/AppData/Local/activitywatch/activitywatch/Logs/aw-server/aw-server_2019-03-17T11-09-47.log

...
Traceback (most recent call last):
  File "site-packages\flask\app.py", line 1813, in full_dispatch_request
  File "site-packages\flask\app.py", line 1799, in dispatch_request
  File "site-packages\flask_restplus\api.py", line 325, in wrapper
  File "site-packages\flask\views.py", line 88, in view
  File "site-packages\flask_restplus\resource.py", line 44, in dispatch_request
  File "aw_server\rest.py", line 226, in post
  File "aw_server\api.py", line 28, in g
  File "aw_server\api.py", line 209, in heartbeat
  File "site-packages\aw_datastore\datastore.py", line 132, in replace_last
  File "site-packages\aw_datastore\storages\peewee.py", line 158, in replace_last
  File "site-packages\aw_datastore\storages\peewee.py", line 154, in _get_last
  File "site-packages\peewee.py", line 6213, in get
aw_datastore.storages.peewee.EventModelDoesNotExist: <Model: EventModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."bucket_id", "t1"."timestamp", "t1"."duration", "t1"."datastr" FROM "eventmodel" AS "t1" WHERE ("t1"."bucket_id" = ?) ORDER BY "t1"."timestamp" DESC LIMIT ? OFFSET ?
Params: [2, 1, 0]
2019-03-21 20:38:53 [INFO ]: 500 (127.0.0.1): POST /api/0/buckets/aw-watcher-window_Paul-XPS/heartbeat?pulsetime=2.0 HTTP/1.1  (flask:25)
2019-03-21 20:38:53 [ERROR]: Exception on /api/0/buckets/aw-watcher-window_Paul-XPS/heartbeat [POST]  (flask.app:1761)
Traceback (most recent call last):
  File "site-packages\peewee.py", line 6208, in get
  File "site-packages\peewee.py", line 3883, in __getitem__
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\flask\app.py", line 1813, in full_dispatch_request
  File "site-packages\flask\app.py", line 1799, in dispatch_request
  File "site-packages\flask_restplus\api.py", line 325, in wrapper
  File "site-packages\flask\views.py", line 88, in view
  File "site-packages\flask_restplus\resource.py", line 44, in dispatch_request
  File "aw_server\rest.py", line 226, in post
  File "aw_server\api.py", line 28, in g
  File "aw_server\api.py", line 209, in heartbeat
  File "site-packages\aw_datastore\datastore.py", line 132, in replace_last
  File "site-packages\aw_datastore\storages\peewee.py", line 158, in replace_last
  File "site-packages\aw_datastore\storages\peewee.py", line 154, in _get_last
  File "site-packages\peewee.py", line 6213, in get
aw_datastore.storages.peewee.EventModelDoesNotExist: <Model: EventModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."bucket_id", "t1"."timestamp", "t1"."duration", "t1"."datastr" FROM "eventmodel" AS "t1" WHERE ("t1"."bucket_id" = ?) ORDER BY "t1"."timestamp" DESC LIMIT ? OFFSET ?
Params: [2, 1, 0]
2019-03-21 20:38:53 [INFO ]: 500 (127.0.0.1): POST /api/0/buckets/aw-watcher-window_Paul-XPS/heartbeat?pulsetime=2.0 HTTP/1.1  (flask:25)

@ErikBjare
Copy link
Member

Huh, I have absolutely no clue what is going wrong here. Do you have any idea @johan-bjareholt?

@ErikBjare
Copy link
Member

I'm not sure how to replicate this. Looks like the heartbeat can't find the most recent event when replacing the event, but it already got a last_event on line 209 in api.py, which is pretty weird.

Can you temporarily move the data folder and then try running again? If that doesn't help, try clearing the client queues.

If you don't know where to find those directories, we use: https://pypi.org/project/appdirs/ (we still haven't written the paths in the docs, sorry)

You didn't do something special that could have caused it? Just normal operation?

@stale
Copy link

stale bot commented Feb 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the !wontfix label Feb 15, 2020
@stale
Copy link

stale bot commented Aug 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants