vit-project / vit

VIT is a lightweight, fast, curses-based front end to Taskwarrior
MIT License
492 stars 51 forks source link

SIGUSR1 breaks vit #329

Closed davidoskky closed 1 year ago

davidoskky commented 2 years ago

Describe the bug When I send SIGUSR1 to update the vit interface, if tasks have been added or removed from taskwarrior, vit crashes. If no tasks have been added or removed, vit does not crash.

To Reproduce start vit use taskwarrior directly to add a task kill -s 10 $PID_VIT

Expected behavior The interface of vit updates and the new task is shown

Test case If reproducing your issue requires any TaskWarrior setup, please produce a test case script.

vit version: 2.2.0 (installed through pip)

thehunmonkgroup commented 2 years ago

Please try to reproduce with the development version of VIT: https://github.com/vit-project/vit/blob/2.x/DEVELOPMENT.md

If you can reproduce there, then include a backtrace of the crash.

davidoskky commented 2 years ago

I can reproduce on the latest commit. Could you please provide guidance on how to get the backtrace?

There is no output on the terminal, except: "User defined signal 1" and it goes back to the terminal.

thehunmonkgroup commented 2 years ago

If VIT is actually crashing, it should dump a backtrace to your terminal.

thehunmonkgroup commented 2 years ago

I can also report that I cannot reproduce your issue, running latest VIT development.

davidoskky commented 2 years ago

There is no dump on the terminal. Vit outputs User defined signal 1 and closes. The exit code is 138.

thehunmonkgroup commented 2 years ago

Without a backtrace and not being able to reproduce, there's not a whole lot I can do.

It's more likely this is an issue with your setup, and not with VIT, or that you have some non-standard edge case that is getting hit.

The next step would be to use an entirely fresh TaskWarrior/VIT install, with a clean config and database, and see if you can reproduce in that environment. There's a script to help with that, that will set up a temporary install within the shell you run the script in: https://github.com/vit-project/vit/blob/2.x/scripts/generate-dummy-install.sh

davidoskky commented 2 years ago

I have tried with clean config and database and the same problem appears. I am not running any particularly strange setup. Fedora 36, bash, gnome terminal / konsole, linux kernel 5.18, taskwarrior 2.5.3

thehunmonkgroup commented 2 years ago

I'm not really sure there's any more assistance we can provide. The error you're reporting is not reproducible, it's not producing a backtrace, and you're not able to isolate a reason why it's happening.

I'll leave this issue open for now, in case you run across any additional data.

davidoskky commented 2 years ago

Alright, I understand. If there is any action I could perform to debug this, let me know.

awilkins commented 1 year ago

Also seeing this,

Ubuntu 20.04 vit 2.2.0 task 2.6.2

I'm guessing this is because there has been no release of vit since this feature was added : the signal handler is introduced in revision 10c67 and version 2.2.0 is tagged three revisions before this. Versions installed from a package manager (including pip) won't have this feature.

I can confirm that it works fine from the source tree as of the HEAD of 2.x

python -m vit.command_line
thehunmonkgroup commented 1 year ago

https://pypi.org/project/vit/2.3.0/

awilkins commented 1 year ago

Many thanks!