Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Itcl 3.4 crashes on 8.6

Closed / Duplicate80a9c35bc3de896789ab0fd98c0b9d25114c1390Created 12 years agoUpdated 12 years ago
Descriptionplain2014-07-15 23:23:22
Here's a minimal sample:


[steve@localhost ~]$ tclsh
% info pa
8.6.1
% package require Itcl
3.4
% itcl::class x { private method y {} {} }
Segmentation fault
akuplain2014-07-15 23:38:54
AFAIK Itcl 3.4 is not for use with 8.6.
IIRC the bundled package should be Itcl 4.x.
The auto_path or something might be wrong to see the old Itcl ?!
anonymousplain2014-07-15 23:51:28
I filed this based on Don's remark on c.l.t:

"Itcl 4 is preferred for Tcl 8.6, sure, but Itcl 3.4.1 ought to continue to work, and if it does not, there's a good chance there's a regression bug in Tcl itself we would very very very much like to know about."
anonymousplain2014-07-15 23:53:12
Also, just an FYI, 3.4 is still bundled with Activestate.  Because the 4-version is actually a beta version (4.07b), Tcl prefers 3.4...
akuplain2014-07-16 00:16:35
Just checked, and you are right, the Itcl 3.4 is in the seed teapot of the AT 8.6.1 distribution. That has to be addressed by us (AS). This is likely a build problem with AT. Please file a bug about that with us at AS.

Regarding dgp's "Itcl 3.4.1 ought to continue to work" AFAIK it _cannot_ work with 8.6 because Itcl is one of the packages which reach deep into core internals, and the 8.6 internals are sufficiently different (re variable structures I believe) to break the 3.x series.

And Itcl 4.x dev was started to address that.
dgpplain2014-07-16 11:51:51
What I can say for sure is that the tip
of the itcl3 branch builds and runs against
the trunk of Tcl and passes the complete Itcl
test suite.  I doubt that can be true if the
two are so fundamentally incompatible in 
their internals.

Furthermore, on those tips I cannot reproduce
your demo:

$ make shell
% package require Itcl 3
3.4
% info pa
8.6.1
% itcl::class x { private method y {} {} }
%                                      

This may well be an already fixed bug, and all
that's needed is to release and/or use the latest
release.
msoferplain2014-07-16 12:10:41
AFAIR itcl3 should have no problems with tcl8.6. The adaptation for VARREFORM that aku hints at was done for 8.5.

I recall that, at AS inistence on being able to generate an itcl binary that would run both against 8.4 and 8.5, I added some spooky code to itcl3 that would detect at runtime which was present. I can imagine that that unholy mess may be the cause of this bug. Especially since a normal build doesn't show the symptoms, according to dgp.
msoferplain2014-07-16 12:24:11
I recalled wrongly: the nasty adaptation is present when building against tcl8.4 headers, allowing that binary to run also on 8.5. 
The adaptation in question is at http://core.tcl.tk/itcl/ci/3f5de3c16d2e10431799fda4b642c82ee44a91c5?sbs=1
jan.nijtmanswiki2014-07-16 12:29:06

I think it's this bug: http://sourceforge.net/p/incrtcl/bugs/213/

which is fixed in Itcl 3.4.1 here: http://core.tcl.tk/itcl/info/cc1cf10c58

dgp Closed ticket [80a9c35bc3]. [History diff]2014-07-16 15:26:06
akuplain2014-07-16 16:54:31
Ok, my knowledge re compat of itcl 3.x with Tcl 8.6.x is clearly out of date and bogus ... When I am done with our Enterprise builds and unfreeze the local repos I will have a look at our state of Itcl and update as necessary.
Log in (anonymous is fine) to add a comment.