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

[GTK] Cash on multiple window open/clos #543

Closed
Fizzadar opened this issue Jun 7, 2020 · 4 comments
Closed

[GTK] Cash on multiple window open/clos #543

Fizzadar opened this issue Jun 7, 2020 · 4 comments

Comments

@Fizzadar
Copy link
Contributor

Fizzadar commented Jun 7, 2020

Specification

  • pywebview version: 3.2
  • platform / version: GTK/Ubuntu 18+20

Description

Application crashing when opening/closing a window over and over or in a short timeframe:

import webview

html = '<button onClick="pywebview.api.cycleWindows()">Click me!</button>'

WINDOWS = {}

class Api:
    def cycleWindows(self):
        other_window = WINDOWS.get('other')
        if other_window:
            other_window.destroy()

        # sleep(1)
        # WINDOWS['main'].evaluate_js('window.location.reload();')
        other = webview.create_window('windowyes', html='<h1>window</h1>', x=0, y=0)
        WINDOWS['other'] = other

if __name__ == '__main__':
    api = Api()
    window = webview.create_window('API example', html=html, js_api=api)
    WINDOWS['main'] = window
    webview.start()

This works fine on Mac/Cocoa, but pressing the button repeatedly when using GTK/Linux causes a segfault almost immediately. If you enable the 1s sleep before reloading the problem goes away. Am going to continue investigating this!

Practicalities

  • YES I am willing to work on this issue myself.
  • NO I am prepared to support this issue financially.
@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Aug 26, 2020
@r0x0r r0x0r removed the stale label Aug 26, 2020
@Ksengine
Copy link
Contributor

web dont want to fix it

@r0x0r
Copy link
Owner

r0x0r commented Nov 13, 2020

@Fizzadar
I could not reproduce it with the latest pygojbect on Ubuntu 20.04.1

@Fizzadar
Copy link
Contributor Author

@r0x0r thank you for checking - also cannot reproduce on the latest versions/Ubuntu20 👍

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

3 participants