Bug 2740

Summary: Attach redundant observer to process = exception, attach redundant obsever to thread = infinite loop
Product: frysk Reporter: Len DiMaggio <ldimaggi>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on:    
Bug Blocks: 1632    

Description Len DiMaggio 2006-06-09 13:49:13 UTC
Attach redundant observer to process = exception, attach redundant obsever to
thread = infinite loop

In frysk - as built from CVS head on 20060608 - if the user attempts to attach a
redundant observer - for example, try to attach an exec observer to a process
that already has an exec observer attached - this exception results - but no
error is reported to the user via the GUI.

If the user attempts to attach the observer to one of the process threads - the
same exception results - in an infinite loop until the Frysk GUI process is killed. 

Probably connected to the large # of threads displayed in bug 2739.

java.lang.RuntimeException: Observer [frysk.gui.monitor.ListView@1cee670] is
trying to add itself twice
   at frysk.gui.monitor.GuiObservable.addObserver (FryskGui)
   at frysk.gui.monitor.ListView.add (FryskGui)
   at frysk.gui.monitor.ListView.add (FryskGui)
   at frysk.gui.monitor.ListView$ItemAddedObserver.update (FryskGui)
   at java.util.Observable.notifyObservers (libgcj.so.7)
   at frysk.gui.monitor.GuiObservable.notifyObservers (FryskGui)
   at frysk.gui.monitor.ObservableLinkedList.add (FryskGui)
   at frysk.gui.monitor.GuiProc.add (FryskGui)
   at frysk.gui.monitor.ObserversMenu$3.menuItemEvent (FryskGui)
   at org.gnu.gtk.MenuItem.fireMenuItemEvent (libgtkjava-2.8.so)
   at org.gnu.gtk.MenuItem.handleActivate (libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main (libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.main (libgtkjava-2.8.so)
   at frysk.gui.Gui.gui (FryskGui)
   at frysk.gui.FryskGui.main (FryskGui)
Comment 1 Mike Cvet 2006-06-22 20:50:01 UTC
Len, do you still get this error? I can't seem to reproduce it with today's 
latest commit.