Hello to the XCircuit community,

   The email thread below is from someone trying to get the MacPorts
distribution of xcircuit working, without much success.  I had him
send me a stack trace, which seems to suggest that the error is coming
from Tcl/Tk, but I can't be absolutely certain that the xcircuit source
code is not somehow involved in causing the error.  Knowing that several
people who subscribe to the xcircuit-dev mailing list run the (a?)
MacPorts version, I'm hoping that someone reading this will have a clue
as to what's going on.  Any suggestions on how to get the xcircuit-3.8.72
version working under MacPorts?  Anybody else have issues like this?

                                                Thanks,
                                                Tim

-------------------------------------------------------------------------
-------------------------------------------------------------------------

From: Mark Butler
Subject: Xcircuit crash from "Format Page Output"
Date: Fri, 22 Aug 2014 01:22:12 -0700
To: Tim Edwards

Hello,

I have installed Xcircit in Mac OS X version 10.7.5 using the Macports distribution "xcircuit 3.8.72." I installed the dependency tk with the +x11 variant rather than the +quartz variant. Xcircuit seems to work fine until I try to save a file. I create a simple drawing with only a single line or library object on the page, and then I choose the menu item File->Format Page Output. Then I click "Write File," and Xcircuit crashes. In the terminal window that I used to start Xcircuit, I see an error of the following form:

alloc: invalid block: 0x7fc7cbac9800: 0 cb
Abort trap: 6

I found that a crash followed by an error of this form typically also occurs when other buttons on the dialog box for "Format Page Output" are clicked. I have not been able to save any drawings done with Xcircuit.

I think that Xcircuit could be quite useful for a journal publication that I am preparing, and any help in resolving this problem would be greatly appreciated.

Thanks,
Mark Butler

-------------------------------------------------------------------------

Hello Mark,

This is an error I've never heard of before, so I'll need you to run
under the debugger to get more information about what line of source
code caused the crash.  You can run "gdb" (or possibly OS X has its
own debugger?) on a file in the install directory for xcircuit called
"xcircexec".

The only thing I can think of is that file saving involves some
operating system calls to rename files and a save to a backup file
in location /tmp/.  There is nothing else unusual about the "Write
File" function.
                                                Regards,
                                                Tim

-------------------------------------------------------------------------

From: Mark Butler
Subject: Re: Xcircuit crash from "Format Page Output"
Date: Mon, 25 Aug 2014 10:07:22 -0700
To: Tim Edwards

I have attached a text file with a stacktrace for the crash, and the text file is also pasted in below. Included at the beginning of the text is the initial output of gdb when xcircexec was executed. What I did to generate this error after the xcircuit GUI came up was the following:

1.  Click on the  library button
2.  Click on the inverter symbol and place it on the screen
3.  Choose File->Format Page Output
4.  Type "debugTest" under Filename and click on Apply to the right side
    of Filename.  The name changed to "debugTest.ps."
5.  Click on Write File

Thanks again for your help.

Regards,
Mark

gdb xcircuit
GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb  6 22:51:23 UTC 2013)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"..."/opt/local/bin/xcircuit": not in executable format: File format not recognized

(gdb) exec-file xcircexec
Reading symbols for shared libraries ........... done
(gdb) run
Starting program: /opt/local/lib/xcircuit-3.8/xcircexec
Reading symbols for shared libraries . done
Reading symbols for shared libraries .................warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/blocksort.o" - no debug information available for "blocksort.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/huffman.o" - no debug information available for "huffman.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/crctable.o" - no debug information available for "crctable.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/randtable.o" - no debug information available for "randtable.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/compress.o" - no debug information available for "compress.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/decompress.o" - no debug information available for "decompress.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/bzlib.o" - no debug information available for "bzlib.c".

........................................ done
Reading symbols for shared libraries . done
Starting xcircuit under Tcl interpreter
Loaded font file fonts/helvetica.lps
Loaded font file fonts/times_roman.lps
Loaded font file fonts/courier.lps
Loaded font file fonts/symbol.lps
Loaded library file generic.lps
Loaded library file analog.lps
Loaded library file avlsi.lps
Loaded library file digital.lps
Loaded library file digitaltcl.lps
Loaded library file analoglib3.lps
% alloc: invalid block: 0x1029976e0: 40 1

Program received signal SIGABRT, Aborted.
0x00007fff91591ce2 in __pthread_kill ()
(gdb) backtrace
#0  0x00007fff91591ce2 in __pthread_kill ()
#1  0x00007fff8c4e57d2 in pthread_kill ()
#2  0x00007fff8c4d6a7a in abort ()
#3  0x00000001001dd826 in Tcl_PanicVA ()
#4  0x00000001001dd8ff in Tcl_Panic ()
#5  0x00000001001f5870 in Ptr2Block ()
#6  0x00000001001f57c4 in TclpFree ()
#7  0x000000010003af73 in InsertChars ()
#8  0x0000000100037e9b in EntryWidgetObjCmd ()
#9  0x000000010013e5f4 in TclNRRunCallbacks ()
#10 0x000000010013f6c2 in TclEvalEx ()
#11 0x0000000100140145 in Tcl_Eval ()
#12 0x0000000100f52a45 in XcTagCallback ()
#13 0x0000000100f6384d in xctcl_page ()
#14 0x000000010013e5f4 in TclNRRunCallbacks ()
#15 0x0000000100036b79 in ButtonWidgetObjCmd ()
#16 0x000000010013e5f4 in TclNRRunCallbacks ()
#17 0x000000010013f6c2 in TclEvalEx ()
#18 0x000000010013f0f5 in Tcl_EvalEx ()
#19 0x000000010000d370 in Tk_BindEvent ()
#20 0x00000001000125f9 in TkBindEventProc ()
#21 0x0000000100019a5c in Tk_HandleEvent ()
#22 0x0000000100019f97 in WindowEventProc ()
#23 0x00000001001da14a in Tcl_ServiceEvent ()
#24 0x00000001001da33f in Tcl_DoOneEvent ()
#25 0x000000010001a3aa in Tk_MainLoop ()
#26 0x00000001000273fa in Tk_MainEx ()
#27 0x0000000100003e74 in main ()
(gdb)

------------------------------------------------------------------------

Hello Mark,

Unfortunately, I can't tell much from the stack trace.  The line

  #13 0x0000000100f6384d in xctcl_page ()

is presumably where it ran the command "page save", which is the
callback from pressing the "Write File" button.  From there it runs:

  #12 0x0000000100f52a45 in XcTagCallback ()

which runs the additional commands tagged to the "page" command, which
is set up in the wrapper.tcl file:

  xcircuit::tag page {xcircuit::pageupdate %1 ; xcircuit::updateparams}

After that, it runs Tcl_Eval:

  #11 0x0000000100140145 in Tcl_Eval ()

so it is executing one of those two scripts (pageupdate or updateparams).
It appears to have finished those and is trying to run a callback on the
entry widget:

#8  0x0000000100037e9b in EntryWidgetObjCmd ()
#7  0x000000010003af73 in InsertChars ()

and that's where the error occurs, so it seems like Tk is at fault here.
Because you have a packaged version of Tcl/Tk, there's no source
information, so I can't see what's going on in the Tk code.  What
version of Tcl/Tk are you using?
                                                ---Tim
------------------------------------------------------------------------

Subject: Re: Xcircuit crash from "Format Page Output"
From: Mark Butler
Date: Tue, 26 Aug 2014 10:27:35 -0700
To: Tim Edwards

Tim,

Tcl and Tk were installed using Macports, and for each, the installed version is 8.6.1. During the installation of Xcircuit, Macports automatically installed Tk 8.6.1_1 with the quartz variant. This led to the following error message:

Error: org.macports.archivefetch for port xcircuit returned: tk must be installed with +x11 and without +quartz.

Consistent with this message, the website for Xcircuit also mentions that the Macports package for Xcircuit needs Tk with the x11 variant rather than the quartz variant. So I uninstalled Tk with the quartz variant and installed Tk with the x11 variant using the following commands:

sudo port uninstall tk @8.6.1_1+quartz
sudo port install tk @8.6.1_1+x11

After that, I tried the install command for xcircuit, and everything seemed to work fine until I tried to save a drawing.

I suppose that I should install Tcl/Tk from the web site http://www.tcl.tk/ ?

Thanks,
Mark

-------------------------------------------------------------------------

Hello Mark,

That's one possibility.  I've also encountered problems before with
Tcl/Tk version 8.6.  You might also try uninstalling version 8.6 and
installing version 8.5.
                                                ---Tim

-------------------------------------------------------------------------

Subject: Re: Xcircuit crash from "Format Page Output"
Date: Wed, 27 Aug 2014 03:21:44 -0700
From: Mark Butler
To: Tim Edwards

Hi Tim,

I tried uninstalling version 8.6 of tcl and tk and installing versions 8.5 of these ports. When I then tried to install xcircuit using macports, there were multiple errors, and I concluded that the port of xcircuit probably requires version 8.6 of the ports tcl and tk. I verified that the version of the tk port installed does not have the quartz variant but does have the x11 variant.

I tried following the installation instructions on the web page for xcircuit, rather than using macports. In the unzipped and untarred folder, I used the commands:

sudo ./configure
sudo make
sudo make install

The output in response to "sudo make" included many warnings, too many to list. The command "sudo make install" did yield an executable, but when I ran it, there was immediately a segmentation fault:

/usr/bin/wish: line 2: 75100 Segmentation fault: 11 "$(dirname $0)/../../System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app/Contents/MacOS/Wish" "$@"

I tried installing without tcl as follows:

sudo ./configure --without-tcl
sudo make

and this yielded the error

ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [xcircuit] Error 1
make: *** [all-recursive] Error 1

So this did not yield an executable.


After spending several hours trying to get xcircuit running on my mac, my impression is this may not be possible with another hour or two of work. The port of xcircuit available from macports cannot be installed without the current version of ports for tcl/tk, and my attempts to install using the commands

sudo ./configure
sudo make
sudo make install

lead to a crash or to installation errors, even when I chose the --without-tcl option. I am quite interested in xcircuit, however, and so if you think that it may be possible to get it running on my mac with another hour or two or work, I would appreciate any advice you may have about how to proceed.

Thanks,
Mark

-------------------------------------------------------------------------

+--------------------------------+-------------------------------------+
| R. Timothy Edwards (Tim)       | email: t...@opencircuitdesign.com    |
| Open Circuit Design            | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-5030               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+

_______________________________________________
Xcircuit-dev mailing list
Xcircuit-dev@opencircuitdesign.com
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to