You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Aaron Kaplan <Aa...@xrce.xerox.com> on 2008/04/16 13:26:22 UTC

CVD hang

It seems like there's a race condition in the CVD interface somewhere. 
Often when I try to run it it just hangs, before the window ever 
appears.  If I kill it and run it again, it works fine... or sometimes not.

The main thread's stack looks like this when it's stuck:

> Thread [main] (Suspended)	
> 	JMenuItem(Component).enable() line: 1246	
> 	JMenuItem(JComponent).enable() line: 3563	
> 	JMenuItem(Component).enable(boolean) line: 1270	
> 	JMenuItem(Component).setEnabled(boolean) line: 1235	
> 	JMenuItem(JComponent).setEnabled(boolean) line: 2647	
> 	JMenuItem(AbstractButton).setEnabled(boolean) line: 2064	
> 	JMenuItem.setEnabled(boolean) line: 294	
> 	MainFrame.setUndoEnabled(boolean) line: 2057	
> 	UndoMgr.addEdit(UndoableEdit) line: 52	
> 	UndoMgr(UndoManager).undoableEditHappened(UndoableEditEvent) line: 596	
> 	PlainDocument(AbstractDocument).fireUndoableEditUpdate(UndoableEditEvent) line: 270	
> 	PlainDocument(AbstractDocument).handleRemove(int, int) line: 612	
> 	PlainDocument(AbstractDocument).remove(int, int) line: 576	
> 	PlainDocument(AbstractDocument).replace(int, int, String, AttributeSet) line: 652	
> 	JTextArea(JTextComponent).setText(String) line: 1693	
> 	MainFrame.setTextNoTitle(String) line: 721	
> 	MainFrame.loadFile() line: 597	
> 	MainFrame.loadTextFile(File) line: 716	
> 	CVD.main(String[]) line: 126	
> 	Gladis.main(String[]) line: 36	

Any solutions or debugging hints would be appreciated.
-Aaron


Re: CVD hang

Posted by Thilo Goetz <tw...@gmx.de>.
Adam Lally wrote:
> On Wed, Apr 16, 2008 at 8:58 AM, Thilo Goetz <tw...@gmx.de> wrote:
>>  Hm, where does the "Gladis" in your stack trace come from?  I don't
>>  remember when we removed that class, but it's a while ago.
>>
> 
> IIRC the Gladis class remains as a stub, whose main() method just
> calls CVD.main().  That way existing scripts or run configurations
> should still work.
> 
> -Adam

Ah, you're right, I see it now.  It's in a different package.

--Thilo


Re: CVD hang

Posted by Adam Lally <al...@alum.rpi.edu>.
On Wed, Apr 16, 2008 at 8:58 AM, Thilo Goetz <tw...@gmx.de> wrote:
>  Hm, where does the "Gladis" in your stack trace come from?  I don't
>  remember when we removed that class, but it's a while ago.
>

IIRC the Gladis class remains as a stub, whose main() method just
calls CVD.main().  That way existing scripts or run configurations
should still work.

-Adam

Re: CVD hang

Posted by Thilo Goetz <tw...@gmx.de>.
I have committed a fix under
https://issues.apache.org/jira/browse/UIMA-989.  If possible,
get the latest version of CVD.java and see if that fixes
your problem.

--Thilo


Re: CVD hang

Posted by Thilo Goetz <tw...@gmx.de>.
Thilo Goetz wrote:
> Aaron Kaplan wrote:
>> It seems like there's a race condition in the CVD interface somewhere. 
>> Often when I try to run it it just hangs, before the window ever 
>> appears.  If I kill it and run it again, it works fine... or sometimes 
>> not.
>>
>> The main thread's stack looks like this when it's stuck:
>>
>>> Thread [main] (Suspended)       JMenuItem(Component).enable() line: 
>>> 1246       JMenuItem(JComponent).enable() line: 3563       
>>> JMenuItem(Component).enable(boolean) line: 1270       
>>> JMenuItem(Component).setEnabled(boolean) line: 1235       
>>> JMenuItem(JComponent).setEnabled(boolean) line: 2647       
>>> JMenuItem(AbstractButton).setEnabled(boolean) line: 2064       
>>> JMenuItem.setEnabled(boolean) line: 294       
>>> MainFrame.setUndoEnabled(boolean) line: 2057       
>>> UndoMgr.addEdit(UndoableEdit) line: 52       
>>> UndoMgr(UndoManager).undoableEditHappened(UndoableEditEvent) line: 
>>> 596       
>>> PlainDocument(AbstractDocument).fireUndoableEditUpdate(UndoableEditEvent) 
>>> line: 270       PlainDocument(AbstractDocument).handleRemove(int, 
>>> int) line: 612       PlainDocument(AbstractDocument).remove(int, int) 
>>> line: 576       PlainDocument(AbstractDocument).replace(int, int, 
>>> String, AttributeSet) line: 652       
>>> JTextArea(JTextComponent).setText(String) line: 1693       
>>> MainFrame.setTextNoTitle(String) line: 721       MainFrame.loadFile() 
>>> line: 597       MainFrame.loadTextFile(File) line: 716       
>>> CVD.main(String[]) line: 126       Gladis.main(String[]) line: 36   
>>
>> Any solutions or debugging hints would be appreciated.
>> -Aaron
> 
> Hm, where does the "Gladis" in your stack trace come from?  I don't
> remember when we removed that class, but it's a while ago.
> 
> I can reproduce this issue with the -text option on the command
> line.  I'll take a look.  If you have any ideas how to fix this,
> let me know.

I think the way CVD is started with command line parameters is just
wrong.  The main UI is started while commands execute that already
try to set properties of the UI.  What we're seeing is a deadlock
between the UI setting up, and text being loaded (with UI side effects).
If the file has been loaded before, it's fast enough to go through.
I've been able to reliably reproduce the hang with a large enough
file.

In the short term, I can only offer the following workaround: start
CVD without command line parameters, then load the file manually.

--Thilo


Re: CVD hang

Posted by Thilo Goetz <tw...@gmx.de>.
Aaron Kaplan wrote:
> It seems like there's a race condition in the CVD interface somewhere. 
> Often when I try to run it it just hangs, before the window ever 
> appears.  If I kill it and run it again, it works fine... or sometimes not.
> 
> The main thread's stack looks like this when it's stuck:
> 
>> Thread [main] (Suspended)   
>>     JMenuItem(Component).enable() line: 1246   
>>     JMenuItem(JComponent).enable() line: 3563   
>>     JMenuItem(Component).enable(boolean) line: 1270   
>>     JMenuItem(Component).setEnabled(boolean) line: 1235   
>>     JMenuItem(JComponent).setEnabled(boolean) line: 2647   
>>     JMenuItem(AbstractButton).setEnabled(boolean) line: 2064   
>>     JMenuItem.setEnabled(boolean) line: 294   
>>     MainFrame.setUndoEnabled(boolean) line: 2057   
>>     UndoMgr.addEdit(UndoableEdit) line: 52   
>>     UndoMgr(UndoManager).undoableEditHappened(UndoableEditEvent) line: 
>> 596   
>>     PlainDocument(AbstractDocument).fireUndoableEditUpdate(UndoableEditEvent) 
>> line: 270   
>>     PlainDocument(AbstractDocument).handleRemove(int, int) line: 612   
>>     PlainDocument(AbstractDocument).remove(int, int) line: 576   
>>     PlainDocument(AbstractDocument).replace(int, int, String, 
>> AttributeSet) line: 652   
>>     JTextArea(JTextComponent).setText(String) line: 1693   
>>     MainFrame.setTextNoTitle(String) line: 721   
>>     MainFrame.loadFile() line: 597   
>>     MainFrame.loadTextFile(File) line: 716   
>>     CVD.main(String[]) line: 126   
>>     Gladis.main(String[]) line: 36   
> 
> Any solutions or debugging hints would be appreciated.
> -Aaron

Hm, where does the "Gladis" in your stack trace come from?  I don't
remember when we removed that class, but it's a while ago.

I can reproduce this issue with the -text option on the command
line.  I'll take a look.  If you have any ideas how to fix this,
let me know.

--Thilo