Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

GUI crashes with freePtr when stepping through code on Windows 8

Abierto
#4 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
desktop, devtools

Línea de trabajo

Comience reproduciendo el fallo mientras recorre el código paso a paso en Windows 8 y, a continuación, siga cómo el depurador invoca MainWindow.on_stack y MainWindow.on_line en relación con el bucle de eventos de Tk. Revise el flujo de debugger_update basado en Queue propuesto y verifique que la ejecución paso a paso finaliza sin el error TclStackFree.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
256
Forks
35
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de beeware/bugjar

Todos los issues de beeware/bugjar

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.