[Tkabber] Tcl/Tk problem on Windows
Thu, 27 Feb 2003 20:30:23 +0100
I've used Tkabber on Windows (xp and 98SE) for a while, and have experience=
d a really annoying problem. Every single version of ActiveStateTCL i've te=
sted has the problem. I've found a solution, but it involves modifying Tk s=
ource code and recompiling.
NOTE: it's not Tkabber fault, it's TK and Windows problem, afaik.
So, I'd like to know other Windows Tkabber users experiences, if they have =
found such a problem and want a solution, or found another solution. Or if =
they have never found such a problem, how can it be, as I can't evade it wi=
thout the source code modification.
2. The problem itself
'Wish' sometimes gives a panic error:
'Tried to free a color that isn=B4t allocated'
while Tkabber is running. Of course, Tkabber gets closed.
3. What happens
Tk allocates its colors in a colormap, and when a contact changes its state=
, the color his JID is displayed must change.
If Windows has made a colormap switch during this state-change,
Tk can=B4t find the correct colors and crashes (or something like this).
4. How to crash Tk using Tkabber on Windows
A. Start Tkabber, login into your account. There is a contact 'away', for e=
B. Start and old Ms-Dos program, and make it fullscreen. I've used Zdaemon =
(a Doom video game modification :) ), as we have to use a program that chan=
ges colormap: a game.
C. While you are on this Ms-Dos fullscreen screen, the contact that was 'aw=
ay' becomes 'available', 'xaway' or 'busy'.
D. You exit the Ms-Dos app, and return to the desktop. 'Wish' should show t=
he error message, and close Tkabber.
5. A Solution
Edit 'tk8.4.1/win/tkWinColor.c' and comment lines #465 and #466:
panic("Tried to free a color that isn't allocated.");
Now compile, and use the wish84.exe and tk84.dll generated.
6. For future
It seems this problem is known since at least 1997, so no official solution=
seems to be in the works :(