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

Autokey 0.95.5-1 badly broken #254

Closed
xircon opened this issue Feb 8, 2019 · 10 comments
Closed

Autokey 0.95.5-1 badly broken #254

xircon opened this issue Feb 8, 2019 · 10 comments

Comments

@xircon
Copy link

xircon commented Feb 8, 2019

Classification:

Bug

Reproducibility:

Always

Version

0.95.5-1

Used GUI (Gtk, Qt, or both):
Gtk

Installed via: Aur

Linux Distribution:
Manjaro

Summary

Summary of the problem.

Something is very wrong, autokey is randomly triggering hotkeys, wrong hotkeys, solved by going back to 0.94.4

Notes

also experienced by members of the autokey google group (Joe).

@luziferius
Copy link
Collaborator

Yeah, I got the notice, thanks for submitting an issue here.

I tried to reproduce it on my machines, but both the GTK and Qt GUI behave on my systems.

Can you help me to isolate this issue? If yes, you’ll be a great help to get this fixed up.

You’ll need git installed (you probably have, if you install from the AUR) and spend a bit of time.

Shell commands:

$ git clone https://github.com/autokey/autokey.git
$ cd autokey/lib

First exit autokey, if it is running.
Look at the commit history, here: https://github.com/autokey/autokey/commits/master
There, you’ll see several commits like Merge branch 'bugfix/issue_223' .
For each of those merge commits, until you reach Release v0.95.4, take the commit hash (either from the URL, or from below the blue browse files button, when you click the commit headline on the GitHub page) and do this:

$ git checkout commit_hash   # Replace commit_hash with the actual hash, like c260a412a71af412afff36e23f85d4a9d47792be
$ python3 -m autokey.gtkui   # Start AutoKey from the local repository, at the given commit. You can supply additional command line arguments, like -l or -c, if you wish

Then try to reproduce the issue. If it still happens, exit autokey and proceed with the next merge commit.
If the issue disappears, you found the offending commits. Please report back, which of the bugfixes introduces the new issue.

If you wish, you may then proceed by going through the individual commits of the offending bugfix, using the same procedure. But tracking it down to the merge commit should be sufficient.

@ronjouch
Copy link

ronjouch commented Feb 9, 2019

Same issues as those reported by @xircon. Like them, 0.95.5-1 / Gtk / AUR / Arch / Reverting. @luziferius I'll bisect and report here.

@ronjouch
Copy link

ronjouch commented Feb 9, 2019

I looooove git bisect. @luziferius, d0cf72a is the culprit commit.

commit d0cf72a136a18c3715cd202c77087f8fd4f83c9c
Author: Thomas Hess <thomas.hess@udo.edu>
Date:   Sat Dec 8 14:54:51 2018 +0100

    Fix case folding for abbreviations containing upper case letters.
    
    Fixes #197

@luziferius
Copy link
Collaborator

luziferius commented Feb 9, 2019

@ronjouch Thank you! Do you have a Phrase with ignore case option activated?

Edit: You don’t have to provide data, see below.

@luziferius
Copy link
Collaborator

I got a reproduction. Steps to reproduce:

  • Create a phrase, content doesn’t matter, leave at default.
  • Add an abbreviation, choose any abbreviation string, I used eueueu.
  • Tick BOTH Ignore case AND Trigger immediately.
  • Save
  • Try to type anything. All key presses trigger the phrase

Each option ticked above works on it’s own. But combining them breaks.

@luziferius
Copy link
Collaborator

luziferius commented Feb 9, 2019

Ok, I think it is fixed. First, I added test cases for this, see the test cases commit linked above.
It slipped through the existing tests, because it only triggers on single character input, i.e. it can only trigger, if the input queue contains a single character only. The tests did not cover this case, but only tested the functionality on multi-character inputs.

The second commit linked above should fix it. The new tests now pass, and I can’t reproduce it any longer on my machine. Explanation what happened: https://gitter.im/autokey/autokey?at=5c5edb595095f6660cc52b2c

@xircon @ronjouch
Can you check out the bugfix branch https://github.com/autokey/autokey/tree/bugfix/issue_254 and verify if it works for you?

This will be released as a new version as soon as I get at least one confirmation.

@ronjouch
Copy link

ronjouch commented Feb 9, 2019

@luziferius awesome work 🙂. I confirm branch bugfix/issue_254 works for me:

  1. No more expanding at first keypress.
  2. Expansions work as expected.

Thanks again for the fast and efficient maintenance!

@luziferius
Copy link
Collaborator

@ronjouch Thanks for confirming. Version 0.95.6 containing the fix is released.

@ronjouch
Copy link

ronjouch commented Feb 9, 2019

@ronjouch Thanks for confirming. Version 0.95.6 containing the fix is released.

Awesome. I flagged the aur package as out of date.

@xircon
Copy link
Author

xircon commented Feb 9, 2019

Thankyou, had a busy day.
Working PKGBUILD for anyone who needs it:

# Maintainer: Dmitry Kharitonov <darksab0r@gmail.com>
# Contributor: Dave Blair <mail@dave-blair.de>

pkgname=autokey-py3
pkgver=0.95.6
pkgrel=1
pkgdesc="Python 3 port of AutoKey, a desktop automation utility for Linux and X11 with new features."
url="https://github.com/autokey/autokey"
depends=('python' 'wmctrl' 'hicolor-icon-theme' 'python-dbus' 'python-pyinotify'
  'zenity' 'xautomation' 'imagemagick' 'xorg-xwd' 'python-xlib' 'python-six'
  'python-gobject' 'gtksourceview3' 'libnotify' 'libappindicator-gtk3'
  'gtk-update-icon-cache')
makedepends=('python-setuptools')
optdepends=('kdialog: for Qt interface'
            'python-pyqt5: for Qt interface'
            'python-qscintilla-qt5: for Qt interface'
            'qt-at-spi: to work with KDE/Qt applications'
            'python-atspi: for ATSPI in Gtk interface')
conflicts=('autokey' 'autokey-gtk' 'autokey-data')
license=('GPL3')
arch=('any')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/autokey-py3/autokey/archive/v${pkgver}.tar.gz")
sha256sums=('d02aa25107c652d6eb960be0e7722bcc07d997a41fbf06b29babc0389ce3ee0d')

package() {
    cd "$srcdir/autokey-${pkgver}"
    python setup.py install --root="$pkgdir" --optimize=1 
}

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

3 participants