Re: [R] tcltk crashes with bad color with text widget

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue 17 Oct 2006 - 12:28:36 GMT

On 10/16/2006 10:47 PM, Alex Couture-Beil wrote:
> Hello
>
> I have been playing with tcl/tk in R 2.4.0 on windows XP and have
> managed to crash R by supplying tcl/tk with an incorrect color.
> Is this a bug? is there a way for me to test the color to see if it is a
> valid tcl/tk color, to avoid this?
>
> tt=tktoplevel()
> tklabel(parent=tt, text="hello world", foreground="reed")
> Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"),
> class = "tclObj") :
> [tcl] unknown color name "reed".
> An error is displayed as one would expect, however when I try
> tktext(parent=tt, foreground="blaaack")
> R crashes, rather than displaying an error as tklabel did.
>
> This, however, does not happen on my FreeBSD machine, which displays an
> error similar to the one for tklabel and does not crash.

A little bit more information: I traced through the TK code, and it does recognize the error and tries to deal with it, but in the process of destroying the partially created text widget, it dies. I think this is a TK bug rather than an R bug; I don't know a good workaround.

Duncan Murdoch

> Thanks for any help,
> Alex Couture-Beil
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 17 22:32:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 17 Oct 2006 - 13:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.