-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.2
-
x86
-
windows_95
Name: skT88420 Date: 10/19/99
I recieved this error when starting a RMI server that opens the commport and
receives data from an X10 controler. The Error said to report it so here it is.
This is the error
A nonfatal internal JIT (3.10.107(x)) error 'OperTableswitch' has occurred in :
'SerialConnection.serialEvent (Ljavax/comm/SerialPortEvent;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
java -version
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
java -fullversion
JAVA.EXE full version "JDK-1.2.2-W"
Source code:
public void serialEvent(SerialPortEvent e)
{
switch (e.getEventType())
{
case SerialPortEvent.DATA_AVAILABLE:
{
while (canReceive)
{
PollReceive();
break;
}
break;
}
}
}
private void PollReceive()
{
x10class x10 = new x10class();
int newData = 0;
recData = 0;
newData = read();
while ((newData != -1) && (recData != x10.CHECKSUM))
{
try
{
System.out.println("Receiving Data\n");
newData = read();
System.out.println("After Receiving Data... data = "+newData+"\n");
switch (newData)
{
case x10.POLLSIG:
{
System.out.println("Have Poll Sig\n");
os.write(x10.POLLREADY);
int count = 0;
int function = 0;
count = read();
function = read();
function = function & 0x02; //find out if this is a function or address
System.out.println("Count = "+count+"\n");
while(( count > 0 ) && ((recData & 0x0F) != x10.STATREQ))
{
recData = read();
System.out.println("received Address = "+x10.toString(recData,0));
recData = read();
System.out.println("received Function = "+x10.toStringFunc(recData));
count--;
}
break;
}
case x10.PFPOLL:
{
System.out.println("Have Power fail Poll Sig\n");
os.write(x10.PFPOLLREADY);
int count = 0;
while( count > 41 )
{
os.write(0x00);//reset the buffer for now, will add macro stuff latter
count++;
}
break;
}
default :
{
System.out.println("other from if "+newData+"\n");
break;
}
}
break;
}
catch (IOException ex)
{
System.err.println(ex);
}
}
return ;
}
(Review ID: 96699)
======================================================================