namgk / ambienttalk

Automatically exported from code.google.com/p/ambienttalk
0 stars 0 forks source link

java.lang.NullPointerException when retracting messages from a remote far ref #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Reproducable in interpreter/trunk 645 on with InstantMessenger application

Create 2 instant messenger peers (e.g. lisa and stijn) and once they discover 
each other, do in 
the following commands:

IM peer - command
1. stijn - network.offline()
2. lisa - chat.talk("stijn", "hallo")
wait till the message "hallo" timed out.
3. stijn - network.online()

have a look to stijn IM console messages. You should get:

java.lang.NullPointerException
    at edu.vub.at.actors.natives.ELFarReference.retractUnsentMessages(ELFarReference.java:269)
    at 
edu.vub.at.actors.natives.NATRemoteFarRef.meta_retractUnsentMessages(NATRemoteFa
rRef.java:
65)
    at edu.vub.at.objects.natives.OBJLexicalRoot.base_retract_(OBJLexicalRoot.java:653)
    at java.lang.reflect.Method.invoke(Native Method)

caused by clientleasedref.at when tries to retract the messages from far remote 
reference.

Original issue reported on code.google.com by tvcut...@gmail.com on 14 May 2008 at 8:09

GoogleCodeExporter commented 8 years ago
I did not get a similar output when trying the example. However, I got another 
strange exception on the 
console of the stijn IM after the previous steps:

Mon Jul 30 11:17:29 CEST 2007 DEBUG at.network - CommandProcessor for 
progpc26.vub.ac.be/134.184.43.76:49358[AmbientTalk]: stopping processing 
because of:
java.lang.ClassCastException: cannot assign instance of 
edu.vub.at.actors.natives.Packet to field 
edu.vub.at.actors.natives.Packet.payload_ of type [B in instance of 
edu.vub.at.actors.natives.Packet
    at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2004)
    at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1184)
        ...
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at edu.vub.at.actors.net.comm.CommandProcessor.run(CommandProcessor.java:90)

It appears a packet is deserialized and assigned to either its own payload_ 
field or the payload_ field of 
another packet, which is really really strange.

Original comment by tvcut...@gmail.com on 14 May 2008 at 8:10

GoogleCodeExporter commented 8 years ago
I partially solved this issue in interpreter/trunk r661 such that it does not 
throw the NullPointerException 
anymore.

However, now I get a new kind of error: in the lisa console, I get the 
following error (when putting Stijn online 
again):

Mon Jul 30 11:38:45 CEST 2007 DEBUG at.eventloops.actors - 
<object:13384618[<type 
tag:FuturesModule>]>: error unpacking packet[<object:16239569[<type 
tag:FutureMessage>]>]
edu.vub.at.exceptions.XObjectOffline: Asked for an object id that was taken 
offline: 
vmid[3660668824113270632]|actorid[-1047332207]|8219168321755501210

Maybe this has to do with the code for leased refs, could someone please check 
whether this error is 
reproducible?

Original comment by tvcut...@gmail.com on 14 May 2008 at 8:10

GoogleCodeExporter commented 8 years ago

Original comment by tvcut...@gmail.com on 14 May 2008 at 8:11

GoogleCodeExporter commented 8 years ago

Original comment by Botje.linux@gmail.com on 24 May 2013 at 1:12