|
List Info
Thread: My (small) program crashes on windows and linux. Why?
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-14 12:06:07 |
Hi,
I was playing with tkinter, at the same time enjoying the
olympics. I
thought I'd try to create a program for keeping scores of
the
speed-skating. However, under windows I got into a crash,
with the helpful
"Send crash-report". I tried to change this into
a smaller program that
still crashes, but whatever I change, it stops crashing.
Under linux it also coredumps, but then when you close the
window.
Since it's python, and crashes shouldn't happen, I thought
I'd attach the
whole program (it's 82 lines). The strange thing is, if
the 'SkateWindow'
is started with a distance < 10000, it runs allright.
With 10km, the window is wider than my screen, but changing
line 29
self.distances = range(start,distance+1, 400)
into
self.distances = range(start,distance+1, 800)
reduces the number of columns, but not the crash.
Any ideas?
Regards,
Chris Niekel
--
I've been down so long, if I'd cheer up, I'd still be
depressed.
- Lisa Simpson, Moanin' Lisa Blues.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-14 12:58:19 |
Chris Niekel wrote:
> for d in self.distances:
> e = Tkinter.Entry(frame,width='8')
> e.grid(row=rowcount, column=d)
>
>
>
I think the values for the column param are too high.
Tkinter cannot
handle them. You do this twice in your code. they are
supposed to work
as "weights". if you just use an numeric
according to the index of the
current entry in self.distances it works...
cheers
bye
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-14 14:07:07 |
On Tue, Feb 14, 2006 at 01:58:19PM +0100, Amanjit Gill
wrote:
> Chris Niekel wrote:
>
> > for d in self.distances:
> > e = Tkinter.Entry(frame,width='8')
> > e.grid(row=rowcount, column=d)
> >
> >
> >
> I think the values for the column param are too high.
Tkinter cannot
> handle them. You do this twice in your code. they are
supposed to work
> as "weights". if you just use an numeric
according to the index of the
> current entry in self.distances it works...
Indeed, changing it to column=d/100 works as well. column
and row should
be < 9999, otherwise it crashes. Not a real problem
ofcourse.
I knew the numbers are weights, that's why I didn't bother
to scale them
and just used the numbers I already have available.
Regards,
Chris
--
I've been down so long, if I'd cheer up, I'd still be
depressed.
- Lisa Simpson, Moanin' Lisa Blues.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-14 21:44:22 |
Chris Niekel wrote:
> Indeed, changing it to column=d/100 works as well.
column and row should
>
>be < 9999, otherwise it crashes. Not a real problem
ofcourse.
>
>I knew the numbers are weights, that's why I didn't
bother to scale them
>and just used the numbers I already have available.
>
>
Hi there, I took a look at the Tk sourcecode, its limited by
default .. see
http://cvs.sourceforge.net/viewcv
s.py/tktoolkit/tk/generic/tkGrid.c?view=markup
//* * Data structures are allocated dynamically to support
arbitrary
sized * tables. However, the space is proportional to the
highest
numbered slot * with some non-default property. This limit
is used to
head off mistakes and * denial of service attacks by
limiting the amount
of storage required. *//
#*define* MAX_ELEMENT 10000
and
.\tkGrid.c:2216:
if (slot < 0 || slot >= MAX_ELEMENT) {
return TCL_ERROR;
}
Cheers,
Amanjit
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-15 06:29:05 |
On Tue, Feb 14, 2006 at 10:44:22PM +0100, Amanjit Gill
wrote:
> Chris Niekel wrote:
> >Indeed, changing it to column=d/100 works as well.
column and row should
> >
> >be < 9999, otherwise it crashes. Not a real
problem ofcourse.
> Hi there, I took a look at the Tk sourcecode, its
limited by default .. see
>
> http://cvs.sourceforge.net/viewcv
s.py/tktoolkit/tk/generic/tkGrid.c?view=markup
>
> //* * Data structures are allocated dynamically to
support arbitrary
> sized * tables. However, the space is proportional to
the highest
> numbered slot * with some non-default property. This
limit is used to
> head off mistakes and * denial of service attacks by
limiting the amount
> of storage required. *//
> #*define* MAX_ELEMENT 10000
>
> and
>
> .\tkGrid.c:2216:
> if (slot < 0 || slot >= MAX_ELEMENT) {
> return TCL_ERROR;
> }
Should I have discovered the TCL_ERROR somewhere then? Is
that propagated
through Tkinter? The grid-examples don't use it.
Since Tcl/tk seems to set the limit, and return an error,
I'd think it's a
bug in Tkinter to crash for it. An exception raised at the
right time would
be nice. I
I've submitted a bug-report for the crash (and fixed my
code).
> Cheers,
> Amanjit
Thanks for your help!
Chris Niekel
--
I've been down so long, if I'd cheer up, I'd still be
depressed.
- Lisa Simpson, Moanin' Lisa Blues.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-15 13:25:37 |
If you file a bug anywhere, you should file it against the
Tk library,
not Python. This crash is reproduced by the following Tcl
script:
label .l
grid .l -row 10 -column 10000
update
after 1000 destroy .
As far as I know, the proper place to report bugs in Tk is
the "Bugs"
tab of http://sour
ceforge.net/projects/tktoolkit
Jeff
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-15 15:31:10 |
On Wed, Feb 15, 2006 at 07:25:37AM -0600, jepler unpythonic.net wrote:
.
.
.
> If you file a bug anywhere, you should file it against
the Tk library,
> not Python. This crash is reproduced by the following
Tcl script:
> label .l
> grid .l -row 10 -column 10000
> update
> after 1000 destroy .
>
> As far as I know, the proper place to report bugs in Tk
is the "Bugs"
> tab of http://sour
ceforge.net/projects/tktoolkit
.
.
.
Yes!
Nice work. My Mac OS X 8.4.10 dies after the [update],
without needing
the [after 1000 destroy .].
Yes, <URL: http://sour
ceforge.net/projects/tktoolkit > is a good place
to report the issue. The Tk folks promise it'll get prompt
attention.
For now, I leave it to you to file. Feel free to send me a
copy when
you do so.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
| My (small) program crashes on windows
and linux. Why? |

|
2006-02-16 06:51:37 |
On Wed, Feb 15, 2006 at 03:31:10PM +0000, Cameron Laird
wrote:
> On Wed, Feb 15, 2006 at 07:25:37AM -0600, jepler unpythonic.net wrote:
> > If you file a bug anywhere, you should file it
against the Tk library,
> > not Python.
Too late. I've appended a note saying it's in tk. Didn't
know if I was
supposed to close it myself.
> Nice work. My Mac OS X 8.4.10 dies after the [update],
without needing
> the [after 1000 destroy .].
My linux crashes before the update.
> Yes, <URL: http://sour
ceforge.net/projects/tktoolkit > is a good place
> to report the issue. The Tk folks promise it'll get
prompt attention.
> For now, I leave it to you to file. Feel free to send
me a copy when
> you do so.
I've submitted it there as well, requestID 1432666,
http://so
urceforge.net/tracker/index.php?func=detail&aid=1432666&
amp;group_id=12997&atid=112997
Regards,
Chris Niekel
--
I've been down so long, if I'd cheer up, I'd still be
depressed.
- Lisa Simpson, Moanin' Lisa Blues.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
a>
|
|
[1-8]
|
|