Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5698

RemoteActors: Failure to deserialize incoming message is swallowed silently

    Details

      Description

      Sending a message to a remote actor which cannot be deserialized fails with no exception appearing in stdout or stderr. In the attached files, if you do the following:

      1. compile message.scala under 2.9.1
      2. compile and run server.scala under 2.9.1
      3. compile and run Client.scala under 2.9.2

      You will see that nothing is printed to either stdout or stderr. What is happening is that the serialized form of the case object message which is being sent by the client has a different serialVersionUID as that on the server (see https://issues.scala-lang.org/browse/SI-5697). This exception should not be swallowed.

      package client
       
      object Client extends App {
       
        val peer = actors.remote.Node("localhost", 23456)
        val a = actors.remote.RemoteActor.select(peer, 'test)
        a ! common.TestMsg
      }
      

      package common
       
      case object TestMsg
      

      package server
       
      object Server extends App {
        class ServerActor extends actors.Actor {
          def act() {
            actors.remote.RemoteActor.alive(23456)
            actors.remote.RemoteActor.register('test, actors.Actor.self)
            loop {
              react {
                case common.TestMsg => println("Yay!")
              }
            }
          }
        }
        val a = new ServerActor
        a.start()
      }
      

        Attachments

        1. Client.scala
          0.2 kB
        2. message.scala
          0.0 kB
        3. Server.scala
          0.4 kB

          Activity

            People

            • Assignee:
              phaller Philipp Haller
              Reporter:
              oxbow_lakes Chris Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: