python3 tkinter filedialog has memory fault

Bug #1557196 reported by Fred Brasch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

The following code

from tkinter import Tk,filedialog

count = 0
while count < 3:
    root = Tk()
    filename = filedialog.askopenfilename()
    #filename = filedialog.askdirectory()
    #color = colorchooser.askcolor()
    #msg = messagebox.showinfo(message = "hello mb")
    print("dialog closed")
    root.destroy()
    count += 1
    print("count",count)

gives a alloc: invalid block error and halts on an rpi 3 running Jessie. It works fine on a windows 7 PC, i.e. root can be repetitively created and destroyed. The choosecolor and message box dialogs work as expected on both platforms.

I have installed python3-dev and matplotlib python related packages in addition to the python3 that came with raspbian, but as far as I know, that shouldn't matter.

the exact output from running python3 testtk.py is

dialog closed
count 1
alloc: invalid block: ox1ff23b8: 38 1
Aborted

The information after invalid block: changes everytime it's run.

Running within Idle3 has the same behavior though error output.

A less rigorous investigation makes me think python2 may have the same problem.

REPL says
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux

Revision history for this message
Fred Brasch (gnc289) wrote :

Running within Idle3 has the same behavior though NO error output.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.