Menu

#395 Archer crashes on ::hv3::formmanager

open
nobody
5
2023-03-10
2021-05-18
No

Hello!
Taking the plunge with BRL-CAD. Thank you, thank you. I am reporting a bug I see on Ubuntu 20.04/archer, both in the binary download, and the build from source code. I want to help get it working here.

System:
In short, 2 CPU VMware Fusion, 4GB, Ubuntu 20.04. Details are in the attached sysinfo.txt

Console messages (same for downloaded and for my build):

(base) cuz@ubuntu:~/Downloads/brlcad-7.32.2$ ./build/bin/archer 
invalid command name "::hv3::formmanager"

Unexpected error encountered while running Archer.
Aborting.

NOTE:
Build went down perfectly on Ubuntu 20.04 once I ran:
sudo apt-get install xorg-dev
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
...
sudo make install
All tests look okay, make check, test, etc. on my build. mged launches okay.
/usr/brlcad/rel-7.32.2/bin is in PATH:
(base) cuz@ubuntu:~/Downloads/brlcad-7.32.2/build$ echo $PATH /home/cuz/zx/bin:/home/cuz/zx/bin:/home/cuz/anaconda3/bin:/home/cuz/anaconda3/condabin:/home/cuz/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/cuz/julia-1.6.0-rc1/bin:/home/cuz/bin:/usr/brlcad/rel-7.32.2/bin:/home/cuz/julia-1.6.0-rc1/bin:/home/cuz/bin
GDB output:
(I set a breakpoint on 'exit' so we can see stack trace)

(base) cuz@ubuntu:~/Downloads/brlcad-7.32.2/build$ gdb archer
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
...
Reading symbols from archer...
(gdb) run
Starting program: /usr/brlcad/rel-7.32.2/bin/archer 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff1e72700 (LWP 265698)]
invalid command name "::hv3::formmanager"

Unexpected error encountered while running Archer.
Aborting.
[Thread 0x7ffff1e72700 (LWP 265698) exited]
[Inferior 1 (process 265691) exited with code 01]
(gdb) b _exit
Breakpoint 1 at 0x7ffff7e94290: file ../sysdeps/unix/sysv/linux/_exit.c, line 27.
(gdb) run
Starting program: /usr/brlcad/rel-7.32.2/bin/archer 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff1e72700 (LWP 265702)]
invalid command name "::hv3::formmanager"

Unexpected error encountered while running Archer.
Aborting.
[Thread 0x7ffff1e72700 (LWP 265702) exited]

Thread 1 "archer" hit Breakpoint 1, __GI__exit (status=status@entry=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
27  ../sysdeps/unix/sysv/linux/_exit.c: No such file or directory.
(gdb) bt
#0  __GI__exit (status=status@entry=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
#1  0x00007ffff7df7b42 in __run_exit_handlers (status=status@entry=1, listp=<optimized out>, run_list_atexit=run_list_atexit@entry=true, 
    run_dtors=run_dtors@entry=true) at exit.c:132
#2  0x00007ffff7df7be0 in __GI_exit (status=status@entry=1) at exit.c:139
#3  0x00007ffff7c3fdb5 in Tcl_Exit (status=1) at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclEvent.c:995
#4  0x00007ffff7bc7407 in Tcl_ExitObjCmd (dummy=<optimized out>, interp=<optimized out>, objc=<optimized out>, objv=<optimized out>)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclCmdAH.c:1057
#5  0x00007ffff7bb7f52 in TclNRRunCallbacks (interp=interp@entry=0x55555560fe60, result=0, rootPtr=0x0)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4492
#6  0x00007ffff7bb7fd5 in Tcl_EvalObjv (interp=interp@entry=0x55555560fe60, objc=objc@entry=3, objv=objv@entry=0x55555561d760, flags=flags@entry=2097168)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:4215
#7  0x00007ffff7bb944c in TclEvalEx (interp=interp@entry=0x55555560fe60, 
    script=0x555555d95070 "#", ' ' <repeats 16 times>, "A R C H E R _ I N I T . T C L\n# BRL-CAD\n#\n# Copyright (c) 2002-2021 United States Government as represented by\n# the U.S. Army Research Laboratory.\n#\n# This library is free software; "..., numBytes=<optimized out>, flags=flags@entry=0, 
    line=<optimized out>, line@entry=1, clNextOuter=clNextOuter@entry=0x0, 
    outerScript=0x555555d95070 "#", ' ' <repeats 16 times>, "A R C H E R _ I N I T . T C L\n# BRL-CAD\n#\n# Copyright (c) 2002-2021 United States Government as represented by\n# the U.S. Army Research Laboratory.\n#\n# This library is free software; "...)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclBasic.c:5361
#8  0x00007ffff7c7e219 in Tcl_FSEvalFileEx (encodingName=<optimized out>, pathPtr=0x5555556f2330, interp=0x55555560fe60)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:1824
#9  Tcl_FSEvalFileEx (interp=0x55555560fe60, pathPtr=0x5555556f2330, encodingName=<optimized out>)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:1724
#10 0x00007ffff7c7e39c in Tcl_EvalFile (interp=0x55555560fe60, fileName=<optimized out>)
    at /home/cuz/Downloads/brlcad-7.32.2/src/other/tcl/generic/tclIOUtil.c:424
#11 0x0000555555555419 in main (argc=<optimized out>, argv=0x7fffffffddf0) at /home/cuz/Downloads/brlcad-7.32.2/src/archer/archer.c:116
(gdb) 

Are there any variations on BRLCAD_OPTIONS that might shed some light, or other steps that I can take?
THANK YOU

1 Attachments

Discussion

  • Clark Dunson

    Clark Dunson - 2021-05-18

    I see the (aboutArcher.png) splash screen, so I set archer_launch.tcl -> createSplashScreen {} -> useImage to 0. Same crash.
    I then set:
    after 1500 destroySplashScreen; # 1.5 more sec
    to
    after 7500 destroySplashScreen; # 1.5 more sec
    and there was no change in timing. Means nothing, any form of changes to createSplashScreen {}, including immediately returning, does nothing.

     

    Last edit: Clark Dunson 2021-05-18
  • Clark Dunson

    Clark Dunson - 2021-05-18

    This:
    $ mged -o
    brings up archer successfully! That is certainly a clue.

     
  • Clark Dunson

    Clark Dunson - 2021-05-18

    Attempts to source-debug archer_launch.tcl through initBgerror failed.
    But in main ():

        if {$::ArcherCore::inheritFromToplevel} {
    puts "First0 Block"
            set ::ArcherCore::application [Archer .\#auto]
    puts "First1 Block"
    

    we never get to "First1 Block". This is probably obvious to some of you. I have no idea what this line means. (yet)

     

    Last edit: Clark Dunson 2021-05-18
  • Clark Dunson

    Clark Dunson - 2021-05-19

    In /usr/brlcad/rel-7.32.2/share/tclscripts/archer/Archer.tcl, this is the bogey line:

           # HTML widget
            set docstoclist [::hv3::hv3 $docstoc.htmlview -width 250 -requestcmd Archer::html_help_display]
    
     
  • Clark Dunson

    Clark Dunson - 2021-05-19

    which traces down to: /usr/brlcad/rel-7.32.2/share/tclscripts/hv3/hv3.tcl, line 1144

        set O(myFormManager)      [::hv3::formmanager %AUTO% $me]
    
     
  • Clark Dunson

    Clark Dunson - 2021-05-19

    Execution appears to never enter the constructor for: /usr/brlcad/rel-7.32.2/share/tclscripts/hv3/hv3_form.tcl, for the class/snit defined at line 1609

    snit::type ::hv3::formmanager
    
     
  • Clark Dunson

    Clark Dunson - 2021-05-19

    The sourced path for hv3_form.tcl in: /usr/brlcad/rel-7.32.2/share/tclscripts/hv3/hv3.tcl is: /usr/brlcad/rel-7.32.2/share/tclscripts/hv3/hv3_form.tcl, and is correct.

     
  • Clark Dunson

    Clark Dunson - 2021-05-22

    I couldn't believe you guys would be captive on sourceforce. On a hunch, I guthub'd you and voila. Better. I build tag rel-7-32-2, installed in /usr/brlcad/rel-7-32-2, and ended up duplicating my problem, invalid command name "::hv3::formmanager". Consistency, blessed be.

    I also noticed a GSOC from 2014 where a built in TCL8.5 and compatibility thereof is of great concern.

    Unfortunately I am new to TCL, but I do see that the formmanager is the only one without a namespace locally defined within hv3.tcl:

    # Component objects.
    set O(myMouseManager)     [mousemanager       %AUTO% $me]
    set O(myHyperlinkManager) [hyperlinkmanager   %AUTO% $me $O(myBase)]
    set O(mySelectionManager) [selectionmanager   %AUTO% $me]
    set O(myDynamicManager)   [dynamicmanager     %AUTO% $me]
    set O(myFormManager)      [::hv3::formmanager %AUTO% $me]
    set O(myFrameLog)         [framelog           %AUTO% $me]
    

    This leads me to suspect that I am with some newer Tcl (Ubuntu 20.04) and breaking new ground. I built and diff'd rel-7-32-0, which make install'd everything into /usr/local (wished I's made a snapshot 1st). There Archer does not produce the above error, but it rather hangs and no window ever shows.

    It would be cool to know what it does successfully build on, I'll make a fresh Fedora, try that, also I have some older Debians. cheers.

     
  • Clark Dunson

    Clark Dunson - 2021-05-23

    Now for some seriously deep dukey. I can puts successfully all the way up to line 256 of hv3_form.tcl. There we find this:

    snit::widgetadaptor ::hv3::forms::checkbox {
    

    (The leading '::' has been omitted so that it will show here)
    No puts statements work after that. But what is really hard for me to quaff, is that it doesn't matter how I mangle the rest of the file after that (including changing ::snit to ::snot) there is no error message other than:

    invalid command name "::hv3::formmanager"
    

    In fact, no matter what syntax error I introduce into this file at all, that's all I get. That's quite janky man, though a proper puts works early in the file. This would place Tcl above both Make and PERL for cryptic error messages. I honestly can't believe it.

    So I tried this at the top of the file:

    puts "GGGGGGGGGGGGGGGGGGG"
    

    and it works:

    GGGGGGGGGGGGGGGGGGG
    invalid command name "::hv3::formmanager"
    

    But eliminating the close quote:

    puts "GGGGGGGGGGGGGGGGGGG
    

    gets me only:

    invalid command name "::hv3::formmanager"
    

    Conclusion: If something is going wrong inside hv3_form.tcl, then it is not being reported.
    That's something to work with, I guess.

     

    Last edit: Clark Dunson 2021-05-23
  • cbryn

    cbryn - 2021-05-27

    I have the same issue on two systems: a Thinkpad X220 with OpenBSD and a Ryzen 5 2400g system running Ubuntu 20.04. I am able to launch Archer with mged -o but if I do launch kosher Archer I get the ::hv3::formmanager error and a tcl8.6 complaint, even though I pass all tcl8.6 functionality tests on either system.

    I really do think there's probably something with this hv3_form.tcl script that needs addressing. Kudos to letting me configure and compile 7.32 on OpenBSD on the first try.

     
  • Clark Dunson

    Clark Dunson - 2021-06-11

    I finally circled around to this again. On my Ubuntu 20.04 machine I have:

    (base) cuz@ubuntu:~$ which tclsh
    /home/cuz/anaconda3/bin/tclsh
    

    Oops, anaconda might be my problem? OK:

    (base) cuz@ubuntu:~$ tclsh
    % puts $tcl_version
    8.6
    % info patchlevel
    8.6.10
    

    As I stated, I built for other Linux, in this case:

    cuz@kiko:~/src/brlcad-build$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 10 (buster)
    Release:    10
    Codename:   buster
    cuz@kiko:~/src/brlcad-build$ uname -a
    Linux kiko 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
    

    Here on Debian 10, following INSTALL.new, I got a perfect build and archer runs just fine!
    Note:

    cuz@kiko:~/src/brlcad-build$ tclsh
    % puts $tcl_version
    8.6
    % info patchlevel 
    8.6.9
    

    For those wishing to duplicate, here is a full list of packages that I installed (many are unrelated):

    sudo apt-get install open-vm-tools-desktop
    sudo apt-get install vim-nox
    sudo apt-get install minicom
    sudo apt-get install build-essential
    sudo apt-get install openssh-server
    sudo apt-get install manpages-dev
    sudo apt-get install ncurses-bin
    sudo apt-get install ncurses-dev
    sudo apt-get install patch
    sudo apt-get install mtools
    sudo apt-get install nmap
    sudo apt-get install cmake cmake-gui
    sudo apt install git libpng-dev python3-dev libboost-all-dev libgl1-mesa-dev lemon flex qt5-default ninja-build cmake
    

    Now I can proceed to learn Archer (one of my original goals).
    @cbryn what is your tcl version?

     
  • Clark Dunson

    Clark Dunson - 2021-06-12

    Removing Anaconda fixed naught:

    cuz@ubuntu:~/src/brlcadOlder$ which tclsh
    /usr/local/bin/tclsh
    cuz@ubuntu:~/src/brlcadOlder$ tclsh
    % puts $tcl_version
    8.6
    % info patchlevel
    8.6.10
    % exit
    cuz@ubuntu:~/src/brlcadOlder$ /usr/brlcad/rel-7.32.2/bin/archer 
    /usr/brlcad/rel-7.32.2/share/tclscripts/hv3/hv3_form.tcl
    invalid command name "::hv3::formmanager"
    
    Unexpected error encountered while running Archer.
    Aborting.
    cuz@ubuntu:~/src/brlcadOlder$ 
    

    but I seem to remember installing something for tcl:

      564  Sun, 2021-05-16 17:37:53  sudo apt-get install tk8.6dev
      565  Sun, 2021-05-16 17:38:16  sudo apt-get install tk8.6-dev
    

    Let me go for vanilla 20.04

     

    Last edit: Clark Dunson 2021-06-12
  • Clark Dunson

    Clark Dunson - 2021-06-12

    Quite the buildfest this morning, all successful! First I built the bare minimum, on a fresh Ubuntu 20.04:

    # For BRL-CAD build, most basic, bare Ubuntu: (cmd line only)
    sudo apt-get install build-essential make cmake git 
    git clone https://github.com/BRL-CAD/brlcad.git
    mkdir brlcad-build
    cd brlcad-build/
    # Configure
    cmake ../brlcad -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
    # Build
    make -j4
    # Check
    make check
    100% tests passed, 0 tests failed out of 118
    
    Label Time Summary:
    Regression    =  72.02 sec*proc (118 tests)
    
    Total Test time (real) =  39.08 sec
    [100%] Built target check
    # Install
    sudo make install
    cuz@ubuntu:~/brlcad-build$ /usr/brlcad/rel-7.32.3/bin/mged
    BRL-CAD Release 7.32.3  Geometry Editor (MGED)
        Sat, 12 Jun 2021 17:14:12 UTC, Compilation 0
        cuz@ubuntu
    
    attach (nu ps txt)[nu]? 
    mged> quit
    cuz@ubuntu:~/brlcad-build$ /usr/brlcad/rel-7.32.3/bin/archer
    bash: /usr/brlcad/rel-7.32.3/bin/archer: No such file or directory
    

    And no tcl of course:

    cuz@ubuntu:~/brlcad-build$ which tclsh
    cuz@ubuntu:~/brlcad-build$ 
    

    This build worked, got me mged command line.

     
  • Clark Dunson

    Clark Dunson - 2021-06-12

    Next, I built the full graphics build (sans qt)

    # Now the full build
    sudo apt-get update
    sudo apt-get upgrade
    # update-initramfs was updated so prophylactic reboot:
    sudo reboot
    # Basic from above
    sudo apt-get install build-essential make cmake git 
    # From https://brlcad.org/wiki/Compiling
    sudo apt-get install sed byacc flex xsltproc libncursesw5-dev libfontconfig-dev xserver-xorg-dev libx11-dev libxi-dev
    # But, tcl/tk not installed, so:
    cuz@ubuntu:~$ which tclsh
    cuz@ubuntu:~$ 
    # Not tcl/tk, so:
    sudo apt-get install tcl-dev
    # And:
    cuz@ubuntu:~$ which tclsh
    /usr/bin/tclsh
    # Now build
    git clone https://github.com/BRL-CAD/brlcad.git
    mkdir brlcad-build
    cd brlcad-build/
    # Configure
    cmake ../brlcad -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
    # But oops: 
    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    XOPENGL_glu_LIBRARY (ADVANCED)
    sudo apt-get install libglu1-mesa-dev
    
    # Now I get:
    Compile Tcl ........................: ON
    Compile Tk .........................: ON
    Compile Itcl/Itk ...................: ON
    Compile Iwidgets ...................: ON
    Compile libpng .....................: ON
    Compile libregex ...................: ON
    Compile zlib .......................: ON
    Compile STEPcode....................: ON
    
    OpenGL support (optional) ..........: ON
    X11 support (optional) .............: ON
    Qt support (optional) ..............: OFF
    Run-time debuggability (optional) ..: ON
    
    Build 32/64-bit release ............: 64BIT (Auto)
    Build optimized release ............: ON
    Build static libraries .............: ON
    Build dynamic libraries ............: ON
    Install example geometry models ....: ON
    Generate extra docs ................: ON (html/man)
    
    Elapsed configuration time: 55 seconds 
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/cuz/brlcad-build
    
    
    # Build
    make -j4
    # Check
    make check
    sudo make install
    

    This build launches both mged and archer just fine. Note that it works with TCL 8.6.10:

    cuz@ubuntu:~$ tclsh
    % puts $tcl_version
    8.6
    % info patchlevel
    8.6.10
    % exit
    

    So, the full brl-cad build steps on a fresh Ubuntu 20.04 are:

    sudo apt-get update
    sudo apt-get upgrade
    # update-initramfs was updated so prophylactic reboot:
    sudo reboot
    sudo apt-get install build-essential make cmake git 
    sudo apt-get install sed byacc flex xsltproc libncursesw5-dev libfontconfig-dev xserver-xorg-dev libx11-dev libxi-dev tcl-dev libglu1-mesa-dev
    git clone https://github.com/BRL-CAD/brlcad.git
    # Build outside the tree
    mkdir brlcad-build
    cd brlcad-build/
    cmake ../brlcad -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
    make -j4
    make check
    sudo make install
    

    That's it. The issue with ::hv3::formmanager did not appear here. Just for completeness, here are the breaking changes listed in TCL 8.6.9->8.6.10 release notes:

      * OSX: Stop default seeking packages under /System; those are now deprecated
            *** POTENTIAL INCOMPATIBILITY ***
    
    
       * [TIP 532] Tk event loop rewrite prevents event ring overflow
            *** POTENTIAL INCOMPATIBILITY ***
    
    
       * Refactored all MouseWheel bindings 
            *** POTENTIAL INCOMPATIBILITY ***
    
    
       * [TIP 535] Revised precision of ::scale widget tick mark values
            *** POTENTIAL INCOMPATIBILITY ***
    

    I will build qt while I am at it (next post).

     

    Last edit: Clark Dunson 2021-06-12
  • Clark Dunson

    Clark Dunson - 2021-06-12

    (OH, qt is experimental, skip.) Now that I have brl-cad build on Ubuntu 20.04 working, I will close this ticket. Ooops, don't see how, sorry.

     

    Last edit: Clark Dunson 2021-06-12
  • Jos Runarka

    Jos Runarka - 2023-03-10

    hi brl-caders,

    I compiled BRL CAD last night on Ubuntu jammy and face the same problem. Run archer -use then ENTER, will pop up the archer window.

    regards,

    Jos

     

Log in to post a comment.

MongoDB Logo MongoDB