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

on_stop dispatched twice when calling app.stop() #2397

Open
kived opened this issue Aug 11, 2014 · 3 comments · May be fixed by #8736
Open

on_stop dispatched twice when calling app.stop() #2397

kived opened this issue Aug 11, 2014 · 3 comments · May be fixed by #8736
Labels
Component: core-providers kivy/core Type: Bug A bug or something not working as intended

Comments

@kived
Copy link
Contributor

kived commented Aug 11, 2014

app.stop() dispatches the on_stop event, then calls stopTouchApp() which does the same (via EventLoop.stop()).

Workaround is to call stopTouchApp(), but that requires an import in kv.

import kivy
kivy.require('1.8.1')

from kivy.app import App
from kivy.lang import Builder

root = Builder.load_string('''
#:import stopTouchApp kivy.base.stopTouchApp
Button:
    text: 'Exit'
    on_release: stopTouchApp()
    #on_release: app.stop()
''')

class TestApp(App):
    def build(self):
        return root

    def on_stop(self):
        print 'stopping'

if __name__ == '__main__':
    TestApp().run()

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@dessant dessant added this to the 1.9.2 milestone Oct 11, 2015
@stale
Copy link

stale bot commented Oct 7, 2017

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 stale label Oct 7, 2017
@KeyWeeUsr KeyWeeUsr removed the stale label Oct 14, 2017
@Lauszus
Copy link
Contributor

Lauszus commented Mar 10, 2020

FYI I just hit this bug in my app.

@veefore
Copy link

veefore commented May 12, 2020

Still have the issue.

@matham matham removed this from the 2.0.0 milestone Oct 28, 2020
@Julian-O Julian-O added the Type: Bug A bug or something not working as intended label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: core-providers kivy/core Type: Bug A bug or something not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants