Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

GUI crashes with freePtr when stepping through code on Windows 8

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
desktop, devtools

Direzione di ricerca

Iniziate riproducendo il crash mentre eseguite il codice passo passo su Windows 8, quindi tracciate il modo in cui il debugger invoca MainWindow.on_stack e MainWindow.on_line in relazione al ciclo degli eventi Tk. Esaminate il flusso debugger_update proposto basato su Queue e verificate che l’esecuzione passo passo termini senza l’errore TclStackFree.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When playing with testing bugjar on Windows 8 I discovered that the UI component will consistenly crash with the following error on the console.

TclStackFree: incorrect freePtr. Call out of sequence?

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Based on this link, it seems that this error is caused by more than one thread accessing the tk event loop.

My hypothesis is that the Debugger is invoking callbacks such as MainWindow.on_stack and MainWindow.on_line from the non tk event thread.

Below is an attempt to rectify this situation using the python Queue object.

class MainWindow(object):
    def __init__(self, root, debugger):

        # <snip>------------

        self.queue = Queue.Queue()
        self.root.after(200, self.debugger_update)

        debugger.start()

    def debugger_update(self):
        try:
            while 1:
                func_name, args = self.queue.get_nowait()
                handler = getattr(self, func_name)
                handler(*args)
        except Queue.Empty:
            pass
        self.root.after(100, self.debugger_update)

    # <snip>------------

    def on_stack(self, stack):
        self.queue.put(('_on_stack', (stack,),))

    def _on_stack(self, stack):
        # <snip>------------

Using the above setup, I have found that I am able to step through the code without encountering the same freePtr issue.

Lingua principale
Python
Stelle
256
Fork
35
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di beeware/bugjar

Tutte le issue di beeware/bugjar

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.