log.error("***** Gossip.run(): received invalid draw command " + comm.mode);
System.err.println("***** Gossip.run(): received invalid draw command " + comm.mode);
    public void run() {        Object tmp;        Message msg=null;        Command comm;        boolean fl=true;        Vector mbrs;        ObjectOutputStream os;        while(fl) {            try {                tmp=channel.receive(0);                // System.out.println("Gossip.run(): received " + tmp);                if(tmp == null) continue;                if(tmp instanceof View) {                    View v=(View)tmp;                    member_size=v.size();                    mbrs=v.getMembers();                    members.removeAllElements();                    for(int i=0; i < mbrs.size(); i++)                        members.addElement(mbrs.elementAt(i));                    if(mainFrame != null)                        setTitle();                    continue;                }                if(tmp instanceof ExitEvent) {                    // System.out.println("-- Gossip.main(): received EXIT, waiting for ChannelReconnected callback");                    break;                }                if(!(tmp instanceof Message))                    continue;                msg=(Message)tmp;                comm=null;                Object obj=msg.getObject();                // System.out.println("obj is " + obj);                if(obj instanceof Command)                    comm=(Command)obj;                else                    if(obj instanceof Message) {                        System.out.println("*** Message is " + Util.printMessage((Message)obj));                        Util.dumpStack(true);                    }                    else {                        if(obj != null)                            System.out.println("obj is " + obj.getClass() + ", hdrs are" + msg.printObjectHeaders());                        else                            System.out.println("hdrs are" + msg.printObjectHeaders());                        Util.dumpStack(true);                    }                switch(comm.mode) {                    case Command.GOSSIP:                        if(graphics != null) {                            colorPanel(comm.r, comm.g, comm.b);                            comm.not_seen.removeElement(local_addr);                            if(comm.not_seen.size() > 0) { // forward gossip                                Vector v=Util.pickSubset(comm.not_seen, subset);                                out.reset();                                os=new ObjectOutputStream(out);                                os.writeObject(comm);                                os.flush();                                for(int i=0; i < v.size(); i++) {                                    channel.send(new Message((Address)v.elementAt(i), null, out.toByteArray()));                                }                            }                        }                        break;                    case Command.CLEAR:                        clearPanel();                        continue;                    default:                        log.error("***** Gossip.run(): received invalid draw command " + comm.mode);                        break;                }            }            catch(ChannelNotConnectedException not) {                log.error("Gossip: " + not);                break;            }            catch(ChannelClosedException closed) {                log.error("Gossip: channel was closed");                break;            }            catch(Exception e) {                log.error(e);                continue; // break;            }        }    }