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()
      }
      
      1. Client.scala
        0.2 kB
        Chris Marshall
      2. message.scala
        0.0 kB
        Chris Marshall
      3. Server.scala
        0.4 kB
        Chris Marshall

        Activity

        Hide
        Aleksandar Prokopec added a comment - - edited

        Verified, using 2.9.1 to run the server and 2.9.2. to run the client results in no error message on the server. A pending test added in pending/run.

        Show
        Aleksandar Prokopec added a comment - - edited Verified, using 2.9.1 to run the server and 2.9.2. to run the client results in no error message on the server. A pending test added in pending/run.
        Hide
        Adriaan Moors added a comment -

        actors have migrated

        Show
        Adriaan Moors added a comment - actors have migrated

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development