Menu

#411 Axis warning from tcl8.6

future-release
closed-fixed
nobody
None
5
2015-03-26
2015-01-04
No

Axis gets tcl errors in Debian Jessie, with tcl 8.6.2+dfsg-1.

Build 2.6 (i used commit cbca1a21) for run-in-place, start sim/axis/axis.ini, hit F1 to reset the Estop, hit F2 to turn the machine on, and it prints this error:

TCL error in asynchronous code:
wrong # args: should be ".toolbar.program_step cmd ?arg ...?"
    while executing
".toolbar.program_step"
    invoked from within
"if {$::last_interp_state != $::INTERP_IDLE || $::last_task_state != $::task_state} {
                #puts "abount to squawk"
                set_mode_from_tab
           ..." 
    (procedure "update_state" line 45)
    invoked from within
"update_state"
    ("after" script)
Shutting down and cleaning up LinuxCNC...

This exact code runs just fine with tcl 8.4 and 8.5 in pre-Jessie versions of Debian.

Discussion

  • Sebastian Kuzminsky

    aspect and miguel on #tcl had some helpful advise

    miguel said:

    does linuxcnc use any C code, or C extension? Tcl8.6 has big
    changes that are not visible to scripts or "correct" C extensions
    (modulo bugs, of course), but that misbehave for some undocumented
    idioms that previously ran fine
    so the problem is likely caused by C code that runs afoul of the nre

     
  • Sebastian Kuzminsky

    We build two tcl extensions (i'm counting things that match tcl/*.so) from C code:

     
  • Sebastian Kuzminsky

    axis does not load tcl/hal.so, but it does load tcl/linuxcnc.so.

    The main axis script is written in python, and it imports lib/python/rs274/options.py, which sources tcl/linuxcnc.tcl into the tk root window, and linuxcnc.tcl loads tcl/linuxcnc.so.

    But apparently axis doesn't actually use linuxcnc.so, at least not for the early parts i tested. I can comment out the line in tcl/linuxcnc.tcl that loads tcl/linuxcnc.so, and rm tlc/*.so, and axis starts up without complaint.

    And it still prints that tcl warning when i hit F1, F2....

    So it is something else that is going on here.

     
  • Sebastian Kuzminsky

    Matche (W. Martinjak) says:

    Putting a simple statement at the first line in the proc update_state.
    At least it works for me.
    And my conclusion is the same as yours.... I have no idea why. :-)

    Michael Büsch supplied the patch attached to this comment (which implements this suggestion) and reports that it works for him too.

     
  • Jeff Epler

    Jeff Epler - 2015-03-24

    Debian experimental libtcl8.6=8.6.4+dfsg-1 also does not exhibit this problem. However, since this version is not likely to be in Debian Jessie when it is released, I intend to apply a "shake a stick at the problem" fix to 2.6 and up

     
  • Jeff Epler

    Jeff Epler - 2015-03-26
    • status: open --> closed-fixed