[Magic-dev] Magic 7.2 hangs on exit (ubuntu linux)

R. Timothy Edwards tim at opencircuitdesign.com
Thu Jan 13 18:15:57 EST 2005


Dear Mark,

 > Magic seems to work as I remember it, however, upon :quit, it just
 > hangs. A 'kill' quits magic, however the command line that remains
 > needs a 'reset' to get back to 'normal'.
 >
 > Any suggestions? Upgrade to 7.3? I'm using the latest magic-7.2 as
 > of today.

Version 7.3 only differs from 7.2 in technical ways, such as the
database representation of stacked contacts.  Upgrading is not
going to help in this case.

I have kernel 2.6 and gcc-3.4.2 on my machine and have no such
problems.  It is likely a window manager thing.  I have run it
under Gnome on the Opteron machine in my basement, but it is usually
just to prove that the compile was successful, not to do any real
work.

I should first ask how magic is compiled:  Are you running under the
Tcl/Tk interpreter, are you running with the "tkcon" console or the
terminal, and are you running the GUI-wrapped version (magic -w)?
Any of these might have an effect on the behavior upon exit.

Tracking it down probably requires running the debugger, e.g., do

    ps -C wish

to get the process ID (or "ps -C magicexec" if not compiled w/Tcl),
then do

   gdb program <process ID>

with the returned value for the process ID.  When it hangs on exit,
do a control-C in the terminal to get back to gdb, and figure out
where it thinks it is.  Unfortunately, 1) gdb may prevent the
problem from showing up, 2) the program may actually have already
exited, and the terminal is somehow getting hung up because it was
reset to the wrong values, and 3) the terminal may be so hosed that
you can't do control-C to get back to the debugger.  Still, it's
worth a try.

Please tell me what the name of the terminal program is.  I use
xterm, but I think there are a number of variants out there, and
they may behave differently when their settings are forcibly
whacked, which is what magic does just before exiting (see
TxSetTerminal() and TxResetTerminal() in textio/txInput.c).

					Regards,
					Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim.edwards at multigig.com     |
| MultiGiG, Inc.	 	 | web:   http://www.multigig.com      |
| 3600 Glen Canyon Road          | phone: (831) 440-0600 ext. 20       |
| Scotts Valley, CA 95066        | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+


More information about the magic-dev mailing list