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

TextBoxWidget: fix crash on hold after end of text #5689

Merged
merged 1 commit into from Dec 14, 2019

Conversation

@poire-z
Copy link
Contributor

poire-z commented Dec 14, 2019

Fix crash (witnessed when swiping quickly to change dict/wiki results and a swipe registers as hold and does text selection):

./luajit: frontend/ui/widget/textboxwidget.lua:1751: bad argument #1 to 'getSelectedWords' (index out of range)
stack traceback:
    [C]: in function 'getSelectedWords'
    frontend/ui/widget/textboxwidget.lua:1751: in function 'handleEvent'
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    frontend/ui/widget/container/widgetcontainer.lua:106: in function 'handleEvent'
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    frontend/ui/widget/container/widgetcontainer.lua:106: in function 'handleEvent'
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    frontend/ui/widget/container/widgetcontainer.lua:106: in function 'handleEvent'
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    frontend/ui/widget/container/widgetcontainer.lua:106: in function 'handleEvent'
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    ...
    frontend/ui/widget/container/widgetcontainer.lua:88: in function 'propagateEvent'
    frontend/ui/widget/container/widgetcontainer.lua:106: in function 'handleEvent'
    frontend/ui/widget/container/inputcontainer.lua:259: in function 'handleEvent'
    frontend/ui/uimanager.lua:733: in function 'sendEvent'
    frontend/ui/uimanager.lua:202: in function '__default__'

This change is Reviewable

@poire-z poire-z added the bug label Dec 14, 2019
@poire-z poire-z added this to the 2019.12 milestone Dec 14, 2019
@Frenzie Frenzie merged commit ea67b9b into koreader:master Dec 14, 2019
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
Details
@poire-z poire-z deleted the poire-z:textbox_fix branch Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.