[Beepcore-java-users] More on the reply problem
Status: Beta
Brought to you by:
huston
|
From: De K. SJ <136...@su...> - 2003-01-06 14:29:40
|
Kevin,
=20
I have run the program on two other machines, a Pentium 4 1.8 Ghz =
running Windows XP and a Pentium 4 800 Mhz running Linux. All the =
machines that I have tested on have J2SDK 1.4.1 installed. I have looked =
further into the problem and am more confused now than ever. I have =
narrowed it down to one line of code, the recieveFrame method recieves a =
frame (of MSG type) and then processes it. It then calls the =
listener.recieveMSG(m) method. Just before this line is executed I =
output the message number and it is correct, but after in the message =
listener (TestBombProfile) the message recieved by recieveMSG has an =
incorrect number.
=20
The error occurs at about line 500 in the Channel.java file =
(receiveFrame method). I added three debug outputs two in the =
receiveFrame method - one at the begining of the MSG type part (it =
outputs the message number) and the other just before the =
listener.recieveMSG(m) method is called (about line 500). I also put an =
output at the begining of the recieveMSG method (Also outputs the =
message number). Here follows what output should be recieved (for =
message number 4):
recieveFrame: recieved frame no 4
Channel: removed message 4
TestBombProfile: recieved message no. 4
=20
I will attatch the results that I got as well as the example files. You =
will notice that I got very strange results, the first few messages =
don't seem to call the listener but the after a few they call the =
listener but with the wrong object (they call it the number of times =
that it was missed with the latest message object). To me it looks like =
a standard method call passing a parameter, it does not make sence to me =
that it does what it does. The error I revieved on the client side is:
SEVERE: Incorrect message number: was 3; expected 1
and then the client aborted the session.
=20
Before you think that it has something to to do with the listener not =
being registered in time, I have seen it happen where the first few =
messages are correct but then the problem occurs later on.
=20
What pc are you running, what operating system, and what version of JDK =
is installed? I connot understand how I get the same problem everytime =
but you don't.
=20
Please try the test again and let me know how it goes.
=20
Thanks,
Sean
=20
Attached files:
bombServer.java =3D> the server for the test
bombCient.java =3D> the client for the test
TestBombProfile.java =3D> the profile for the test
out_server.txt =3D> the output I recieved on the server side
out_client.txt =3D> the output I recieved on the client side
|