(Good bug report, thanks!)
I was going to suggest strace, then I saw it's Cygwin. So that probably wouldn't help, even if you battled to install it. I can do jstack, though the process name doesn't appear in the jps results (unlike on Linux).
$ /cygdrive/c/Program\ Files/Java/jdk1.6.0_14/bin/jps
4640 Jps
4396
4008
4992 PluginMain
$ /cygdrive/c/Program\ Files/Java/jdk1.6.0_14/bin/jstack 4396
2009-10-28 11:47:17
Full thread dump Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing):
"TerminatorServer" daemon prio=6 tid=0x1af7b400 nid=0x1778 runnable [0x1ddac000]
...
$
jps -v was more helpful - that included arguments that mentioned "terminator". Sadly, I don't think jps and jstack are included in the JRE, only the steenkin' great JDK.
If Java is still running OK but our Gui thread has locked up, then that would tell us why. If it doesn't work, then that suggests a Cygwin issue. What we do then, I don't know. Battle strace, perhaps, though it output nothing for me, just now, until I quit Terminator, then it crashed. Bonanza.
Odd. That looks just like my idle Terminator. You might think this is a stupid question but bear with me: was Terminator really frozen up at the time you took that?
$ ./jps -v | grep -i erminator
7564 -Xmx100m -Dorg.jessies.libraryDirectories=C:\Program
Files\software.jessies.org\terminator\Resources\terminator\.generated\i386_Cygwin\lib;C:\Program
Files\software.jessies.org\terminator\Resources\salma-hayek\.generated\i386_Cygwin\lib
-Dorg.jessies.binaryDirectory=C:\Program
Files\software.jessies.org\terminator\Resources\salma-hayek\.generated\i386_Cygwin\bin
-Dorg.jessies.terminator.dotDirectory=h:\.terminator
-Dorg.jessies.terminator.logDirectory=h:\.terminator\logs
-Dorg.jessies.terminator.serverPortFileName=h:\.terminator\terminator-server-port
-Dorg.jessies.terminator.optionsFile=h:\.terminator\options
-De.gui.HelpMenu.hasManual=true
-De.gui.HelpMenu.supportAddress=terminat...@googlegroups.com
-De.gui.HelpMenu.supportSite=http://groups.google.com/group/terminator-users
-De.util.Log.filename=h:\.terminator\logs\terminator-4480.log
-De.util.Log.applicationName=Terminator
-Dorg.jessies.aboutBoxIcon=C:\Program
Files\software.jessies.org\terminator\Resources\terminator\lib\terminator-128.png
-Dorg.jes
$ ./jstack.exe 7564
2009-10-28 16:12:45
Full thread dump Java HotSpot(TM) Client VM (14.2-b01 mixed mode, sharing):
"Process 6700 (/dev/tty5) Writer" daemon prio=6 tid=0x1b040000
nid=0x398 waiting on condition [0x1e06c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x20e5d0f8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"TerminatorServer" daemon prio=6 tid=0x1c076400 nid=0xe4c runnable [0x1dd9c000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x20e8d570> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at e.util.InAppServer$ConnectionAccepter.acceptConnections(InAppServer.java:145)
at e.util.InAppServer$ConnectionAccepter.run(InAppServer.java:138)
at java.lang.Thread.run(Thread.java:619)
"Process 6700 (/dev/tty5) Reader" daemon prio=6 tid=0x1c075400
nid=0x898 runnable [0x1db9c000]
java.lang.Thread.State: RUNNABLE
at org.jessies.os.PosixJNI.read(Native Method)
at org.jessies.os.Posix.read(Posix.java:394)
at terminator.terminal.PtyProcess$PtyInputStream.read(PtyProcess.java:29)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
- locked <0x20e515f8> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at terminator.terminal.TerminalControl$ReaderRunnable.run(TerminalControl.java:152)
at java.lang.Thread.run(Thread.java:619)
"Child Forker/Reaper" daemon prio=6 tid=0x1b00e400 nid=0x10a0 waiting
on condition [0x1d57c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x20e60648> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"TimerQueue" daemon prio=6 tid=0x1c0ff400 nid=0x1e44 in Object.wait()
[0x1d37c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at javax.swing.TimerQueue.run(TimerQueue.java:236)
- locked <0x20e60798> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:619)
"AWT-EventQueue-0" prio=6 tid=0x1aff8400 nid=0x186c in Object.wait()
[0x1d14c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(EventQueue.java:479)
- locked <0x20d6de88> (a e.debug.EventDispatchThreadHangMonitor)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:236)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
"AWT-Shutdown" prio=6 tid=0x1afc3400 nid=0x1870 in Object.wait() [0x1cf4c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x20d866c0> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0x20d866c0> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)
"AWT-Windows" daemon prio=6 tid=0x1b035800 nid=0x10dc runnable [0x1cb1c000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:291)
at java.lang.Thread.run(Thread.java:619)
"Java2D Disposer" daemon prio=10 tid=0x1b02dc00 nid=0x518 in
Object.wait() [0x1c71c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x20d6d950> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:125)
at java.lang.Thread.run(Thread.java:619)
"EventDispatchThreadHangMonitor" daemon prio=6 tid=0x1afe8400
nid=0x1114 in Object.wait() [0x1c51c000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Timer.java:509)
- locked <0x20d6d9e8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
"Low Memory Detector" daemon prio=6 tid=0x1afbb400 nid=0x828 runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x1afb5000 nid=0x12d4 waiting on
condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x1afb3800 nid=0xb90 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x1afb2400 nid=0xeac runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x1af70000 nid=0xc4c in Object.wait() [0x1b64c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x20d6dc30> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x1af6ec00 nid=0x19f0 in
Object.wait() [0x1b44c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x20d6dcb8> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x18da8800 nid=0x1420 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"VM Thread" prio=10 tid=0x1af6d000 nid=0x1a04 runnable
"VM Periodic Task Thread" prio=10 tid=0x1afc5c00 nid=0x6cc waiting on condition
JNI global references: 1975
On Wed, Oct 28, 2009 at 3:43 PM, Martin Dorey <mdo...@bluearc.com> wrote:
> Odd. That looks just like my idle Terminator. You might think this is a
> stupid question but bear with me: was Terminator really frozen up at the
> time you took that?
>
>
>
<< SNIP! >>
Work:
New Shell
Show Info
New Command
New Command Tab (insofar as bringing up a popup to accept the command
input. No new tab appears)
Don't Work:
Close
New Tab
Clear Scrollback
Copy
Paste
(The last two don't really apply since the terminal itself isn't
echo-ing keystrokes anyway)
> Some keyboard shortcuts still work from the
> frozen Terminator instance (!).
Well that goes some way to explaining why Java doesn't appear to be locked up. I bet double-clicking on the icon quickly gets you a new window still too, without starting a new Terminator process. Yet the "menu headers are unclickable". Weird. "Clear Scrollback" would silently do nothing if getFocusedTerminalPane() returned null:
private abstract static class AbstractPaneAction extends AbstractAction {
public AbstractPaneAction(String name) {
super(name);
}
public void actionPerformed(ActionEvent e) {
JTerminalPane terminalPane = getFocusedTerminalPane();
if (terminalPane != null) {
performPaneAction(terminalPane);
}
}
protected abstract void performFrameAction(TerminatorFrame frame);
Yet it would be disabled if getFocusedTerminatorFrame() returned null:
@Override
public boolean isEnabled() {
return (getFocusedTerminatorFrame() != null);
}
The behavior of "New Command Tab" agrees that getFocusedTerminatorFrame() can't be returning null:
public static class NewCommandTabAction extends AbstractAction {
public NewCommandTabAction() {
super("New Command Tab...");
putValue(ACCELERATOR_KEY, makeShiftedKeyStroke("T"));
}
public void actionPerformed(ActionEvent e) {
TerminatorFrame frame = getFocusedTerminatorFrame();
if (frame != null) {
JTerminalPane terminalPane = new CommandDialog().askForCommandToRun();
if (terminalPane != null) {
frame.addTab(terminalPane);
}
} else {
// There's no existing frame, so interpret "New Command Tab..." as "New Command...".
NewCommandAction.newCommand();
}
}
}
I guess we fail there in frame.addTab(), but that has no failure path:
public void addTab(JTerminalPane newPane) {
terminals.add(newPane);
addPaneToUI(newPane);
newPane.start(this);
tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);
updateFrameTitle();
}
If we've called that and we're not still stuck there and the window title hasn't changed and there's no exception in the log, then, then, then what?
-----Original Message-----
From: Dan Mazur [mailto:dan....@gmail.com]
Sent: Wednesday, October 28, 2009 15:19
To: Martin Dorey
Cc: terminat...@googlegroups.com
Subject: Re: [terminator-users] Terminator stops working
More oddness to report: Some keyboard shortcuts still work from the